Pixi environments in the home make shared-storage homes slow to move and first-start
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- aws, docker, go, kubernetes
- Área
- infrastructure, performance
Línea de trabajo
Start by reading internal/pixienv and tracing how environment directories and the pixi cache are chosen and installed. The issue describes node-local storage keyed by the environment's sha256, but says the location for Nebi-selected and repository environments still needs design work. Done means environments can be reused per node and home moves can skip the rebuildable environment and cache.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Moving one person's home to shared storage on a NIC cluster on AWS took 24 minutes, and almost all of it was the pi environment, not their files. Their home was nearly empty apart from that.
internal/pixienv installs each app's pixi environment into the owner's home, under ~/.javo/envs/<sha256 of the environment's files>, with pixi's package cache beside it (pixi-cache). On a node-local disk that is fast, and the first start pays for the install once. On network storage it is the slow path every time:
- Home moves copy it. The move to
shared(EFS over NFS 4.1 through csi-driver-nfs) copied 25,959 files and 1.17 GB for one person: 19m22s to copy (16:06:57 to 16:26:19 UTC), then about 4 minutes checking the copy before it switched. The other person, whose agent app had never started, so had no environment installed, was switched under two minutes after the move began. The owner's apps are stopped for the whole move. - First starts write it file by file. A new person's first agent app installs tens of thousands of small files onto NFS. I did not time it, but it is the same pattern EFS was slowest at during the copy.
Shared storage is how a person's apps get to run on any node (per-person EBS disks pin all of a person's apps to one node in one zone), so on AWS this cost lands on exactly the setup we need.
Why shared homes on AWS at all: it is CPU on one node, not disk
With per-person homes (perUser, one gp3 volume each) nothing ran out of storage. The disks had room and attached fine. What ran out was CPU on the one node the disks could attach to:
0/2 nodes are available: 1 Insufficient cpu, 1 node(s) didn't match PersistentVolume's node affinity
- gp3 volumes are created where the first pod lands (
WaitForFirstConsumer). Both people's first pods landed on the us-east-1b node, so both homes were created in us-east-1b. - An EBS volume attaches to one node at a time and only in its own zone, so every app of both people had to run on that node. The us-east-1a node was idle for them.
- That node is a t3.xlarge with 3920m CPU to hand out. System pods and one medium pi app (2 CPU) left about 680m, so the next pi app (1 CPU) stayed Pending.
So there are two setups that hold together, and only one of them needs this issue:
| Homes | Environments | Where a person's apps can run | |
|---|---|---|---|
| A | per-person gp3 (today's perUser) |
in the home, as now | one node, the one holding their disk. Needs nodes added in that zone when it fills: a cluster autoscaler with a node group per zone (NIC) |
| B | shared RWX (EFS over NFS 4.1) | per-node cache, this issue | any node |
A per-person EBS volume for environments alongside shared homes would bring the one-node limit back, since every app of that person would have to run where that volume is attached. EBS multi-attach is io2 block-only and needs a cluster-aware filesystem, so it is not a way around that. The per-node cache proposed below is not per person: one copy per node per environment, shared by everyone on that node who uses it.
Both directories are rebuildable from the pinned pixi.lock: the env folder by pixi install --frozen, the cache by downloading again. Nothing in them is the person's work.
What I think we should do
- Keep environments off the home. Install them on node-local storage keyed by the same sha256, shared by every pod on that node that uses the same environment, so the first start on a node installs once and later starts on that node reuse it. A read-only image layer or a per-node cache volume would both do it. The marker-file logic in
internal/pixienvalready handles a half-written folder. - Until then, don't copy what can be rebuilt. The home move could skip
~/.javo/envsand the pixi cache and let the next start reinstall them. That cuts a move to the size of the person's own files.
We need to work out where an environment picked from Nebi, or one from an app's repository, should live under the first option, since today they share the same folder.
- Lenguaje dominante
- Go
- Estrellas
- 5
- Forks
- 0
- Merge medio
- 21 h 13 min
- PR fusionados (30 d)
- 53
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de nebari-dev/tapas
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
nebari-dev/tapas#124 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
nebari-dev/tapas#121 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
nebari-dev/tapas#32 ·
Los mantenedores suelen responder en 1 día
-
Suggest saving a memory when a chat message holds something worth rememberingPosiblemente ocupada @jbouder la tomó hoy. Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
nebari-dev/tapas#137 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 54/100
nebari-dev/tapas#136 ·
Los mantenedores suelen responder en 1 día
Todos los issues de nebari-dev/tapas
Issues similares
-
--auto-tier: hashing, dedup, resume validation and DVC/git reads still update atime on LinuxAbiertoarea: pipeline priority: low type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
prime-radiant-inc/evener#8335 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
-
ui: OnTextKey on SearchField never sees keys (it does not reach the inner input)Posiblemente ocupada @szluyu99 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100