我们将JupyterHub部署到Kubernetes(特别是AWS托管的kubernetes“ EKS”)我们通过头盔进行部署。我们运行JupyterHub的0.8.2版本。
我们想知道:
((1)笔记本服务器的默认内存分配是什么?
(2)是否可以增加?怎么样?
供参考,这是我们的头盔图:
auth:
admin:
access: true
users:
- REDACTED
type: github
github:
clientId: "REDACTED"
clientSecret: "REDACTED"
callbackUrl: "REDACTED"
org_whitelist:
- "REDACTED"
scopes:
- read:org
singleuser:
image:
# Get the latest image tag at:
# https://hub.docker.com/r/jupyter/datascience-notebook/tags/
# Inspect the Dockerfile at:
# https://github.com/jupyter/docker-stacks/tree/master/datascience-notebook/Dockerfile
# name: jupyter/datascience-notebook
# tag: 177037d09156
name: REDACTED
tag: REDACTED
pullPolicy: Always
storage:
capacity: 32Gi
lifecycleHooks:
postStart:
exec:
command: ["/bin/sh", "-c", "touch ~/.env && chmod 777 ~/.env"]
hub:
# cookie_max_age_days - determines how long we keep the github
# cookie in the hub server (in days).
# cull_idle_servers time out - determines how long it takes before
# we kick out an inactive user and shut down their user server.
extraConfig: |
import sys
c.JupyterHub.cookie_max_age_days = 2
c.JupyterHub.services = [
{
"name": "cull-idle",
"admin": True,
"command": [sys.executable, "/usr/local/bin/cull_idle_servers.py", "--timeout=3600"],
}
]
每个jupyterhub v0.8.2 charts容器/容器的singleuser
默认内存资源请求是1G
中的chart values。请注意,这是一个resource request
,它通知kubernetes调度程序容器在节点上需要什么。如果需要,容器可以自由使用节点上的可用内存。 Kubernetes仅应在整个节点处于内存压力之下时才开始逐出Pod,这基本上少于100MiB的可用内存总量
要更改此名称,请覆盖request
值以设置其他请求(不确定为什么更改名称)。
singleuser.memory.guarantee
另一个选项是设置一个硬singleuser:
memory:
guarantee: '1024Mi'
,可以在该处杀死容器。默认情况下,掌舵limit
中没有设置限制。要强制执行限制,请在运行头盔时覆盖chart default values值。
singleuser.memory.limit
[如果要管理整体使用情况,则可能要查看正在运行jupyterhub的名称空间上的singleuser:
memory:
limit: '1024Mi'
,因为上述任何设置似乎都是针对每个用户/单个用户实例的。