sourcegraph / sourcegraph-public-snapshot

Code AI platform with Code Search & Cody
https://sourcegraph.com
Other
10.11k stars 1.27k forks source link

executors: Investiate cgroups for giving every VM a fair share of IOPS #41324

Open eseliger opened 2 years ago

eseliger commented 2 years ago

Currently, IOPS per executor VM are not constrained. That could lead to problems in other VMs when a single VM does a lot of IO. It would be great if we could hard cap the number of IOPS so that there will always remain some share of it for other VMs and the host itself.

eseliger commented 1 year ago

Might need to use cgroups here, which might get nasty. We can instead use the firecracker rate limiter (if it works as I expect): https://github.com/firecracker-microvm/firecracker/blob/main/src/api_server/swagger/firecracker.yaml#L818

There is also a rate limiter for network rx/tx, so that might be better than relying on CNI there. (Makes the setup simpler).

eseliger commented 1 year ago

Needs an ignite change.