-
Couldn't load subscription status.
- Fork 180
Use Filestore over NFS to speed up and share GCS Object Storage cached slabs #955
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
# Conflicts: # packages/nomad/main.tf # packages/nomad/orchestrator.hcl # packages/nomad/template-manager.hcl # packages/orchestrator/internal/template/build/hash_index.go
|
Also not sure if https://github.com/e2b-dev/infra/blob/nfs-file-cache/packages/orchestrator/internal/server/sandboxes.go#L423 will the snapshot upload use the cached persistence and therefore the mentioned writes. |
No, it's only used in the GetTemplate function, which is called on Create (line 52 in the same file). The wrapped persistence value only gets used inside GetTemplate and in the Template instance, which isn't used to upload the snapshot. |
…-cache # Conflicts: # packages/orchestrator/internal/sandbox/template/cache.go # packages/orchestrator/internal/server/sandboxes.go # packages/orchestrator/internal/template/build/layer/layer_executor.go
Isn't this also using the |
|
Yup, it does. The surrounding code seems to use it to pull a layer from GCS, which may cause it to write some cache files to NFS. it might also read from NFS, which might speed up read operations. I'm not sure how likely that scenario is though. It doesn't look like it ever uses the |
8f79a73 to
cb92317
Compare
Early tests show that this can reduce the startup time for sandboxes by ~60% if the sandbox is starting on a fresh node.
Notes:
use-nfs-for-snapshotsanduse-nfs-for-templatescontrol whether we write slabs to NFS for snapshots and templates.Remaining tasks:
Other items worth noting:
false)make plan-only-jobsno longer errors if a change needs to be made, allowingmake plan-only-jobs && make applymake testnow tests every package in the go.work file, rather than requiring them to be listed out one at a timemake lintcan now be run to lint all the packageslifecycle_cache_test.go, revealed when running the tests with-race