claircore icon indicating copy to clipboard operation
claircore copied to clipboard

smarter disk allocation

Open hdonnay opened this issue 4 years ago • 1 comments

In our current implementation, we assume that disk space is not a problem.

In highly-tuned or tightly packed containerized deployments, using the container's ephemeral disk may result in evictions.

We should have some limit to disk usage that is reasonable by default, tunes down automatically, and can be manually increased.

A call to syscall.Statfs could help determine sizing, and then something like a golang.org/x/sync/semaphore.Weighted could be used to control requests.

There's probably a heuristic around detecting a volume dedicated for our use and just having the ephemeral root.

hdonnay avatar Aug 17 '21 18:08 hdonnay

Note for future us: there's talk in the distribution spec about handling uncompressed layers -- this would be very helpful for calculating what we need.

hdonnay avatar Jun 09 '22 21:06 hdonnay