Pixi environments in the home make shared-storage homes slow to move and first-start
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- aws, docker, go, kubernetes
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Go
- スター
- 5
- フォーク
- 0
- 平均マージ
- 21時間 13分
- マージ済み PR(30日)
- 53
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
nebari-dev/tapas のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
nebari-dev/tapas#124 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
nebari-dev/tapas#121 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
nebari-dev/tapas#32 ·
メンテナーはふだん 1 日以内に返信
-
Suggest saving a memory when a chat message holds something worth remembering対応中かも @jbouder が今日担当しました。 オープン
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
nebari-dev/tapas#137 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 54/100
nebari-dev/tapas#136 ·
メンテナーはふだん 1 日以内に返信
nebari-dev/tapas の issue をすべて見る
似ている issue
-
area: pipeline priority: low type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
prime-radiant-inc/evener#8335 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
ui: OnTextKey on SearchField never sees keys (it does not reach the inner input)対応中かも @szluyu99 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100