cirruslabs / orchard

Orchestrator for running Tart Virtual Machines on a cluster of Apple Silicon devices
Other
194 stars 16 forks source link

Enable a auto shrinking cache for the worker #168

Closed eecsmap closed 5 months ago

eecsmap commented 5 months ago

Right now the worker pulls image and cache them locally. Yet in a prod environment, I would like to set a cap to the cache storage. And the cache could be running LRU to retire images.

For example, I have a couple of mac studio with 512GB SSD as workers, each running two VM instances. Every VM instance will take 100GB disk. And I would like to reserve about 100GB for the worker host itself. It makes sense to have a 200GB cap for the cache storage. And I don't want to manually manage the cache in the prod env. This auto shrinking cache feature will be very useful.

fkorotkov commented 5 months ago

This is already implemented in Tart itself. Before cloning Tart will check if there is enough space and will remove as many old images as needed. You should not worry about SSD space management already.

eecsmap commented 5 months ago

Ah. good to know. thanks!