firecracker-microvm / firecracker

Secure and fast microVMs for serverless computing.
http://firecracker-microvm.io
Apache License 2.0
26.14k stars 1.81k forks source link

Investigate epoll performance when IO ratelimiting is in effect #410

Open acatangiu opened 6 years ago

acatangiu commented 6 years ago

When IO rate limiting is in effect, requests don't get serviced for a while (by design). This translates to the FD(s) in epoll not being drained for a while. During this time the epoll loop spams the Firecracker IO thread with events that are simply ignored down the line.

All that context switching incurs a performance penalty that we could eliminate by temporarily deregistering the rate-limited FD(s) from epoll while limiting is in effect.

We need to investigate whether de-registering and re-registering the FD(s) is overall more or less expensive than the spam of useless context switching.

AlexandruCihodaru commented 2 years ago

This is a good performance investigation that we might want to do but we will not do it in the short term.

pb8o commented 5 months ago

If we go ahead with this investigation, we would want to test it under different scenarios: 1) just above the limit, 2) a lot above the limit (50%+) and see if it regresses some common cases.