Open acatangiu opened 6 years ago
This is a good performance investigation that we might want to do but we will not do it in the short term.
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.
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.