Skip to content

Commit

Permalink
reduce cpu and memory minimums (hail-is#4966)
Browse files Browse the repository at this point in the history
We want to pack four notebooks per 8-core machine with extra space
for k8s jobs and daemon sets that in practice do not utilize their
required CPU. To prevent a fifth notebook we should set CPU
requirement to x such that:

    8 - 4x < x

ergo: x > 8/5 = 1.6, x = 1.6 + 0.001
  • Loading branch information
danking authored Dec 13, 2018
1 parent dd34aa3 commit 8c6b388
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion notebook/notebook/notebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def start_pod(jupyter_token, image):
image=image,
ports=[kube.client.V1ContainerPort(container_port=8888)],
resources=kube.client.V1ResourceRequirements(
requests={'cpu': '3.001', 'memory': '4G'}),
requests={'cpu': '1.601', 'memory': '1.601G'}),
readiness_probe=kube.client.V1Probe(
http_get=kube.client.V1HTTPGetAction(
path=f'/instance/{svc.metadata.name}/login',
Expand Down

0 comments on commit 8c6b388

Please sign in to comment.