-
-
Notifications
You must be signed in to change notification settings - Fork 757
Open
Labels
Description
Motivated by a desire for reduced latencies on the workers for Actors (we found that 1ms things were taking 5ms) we added a thread that statistically profiles the event loop. This showed overhead from a couple surprising sources:
psutiland theSystemMonitor- Tornado's
write_to_fdwhich apparently isn't entirely non-blocking, see this stack overflow question - Tornado's
add_callbackoverhead, see this stack overflow question
I'm not sure how best to address these. There are probably a few approaches:
- Check that we're using psutil appropriately, and that there isn't some better way to regularly poll system use at high-ish frequency (currently we poll every 500ms)
- Quantify the cause of
add_callback, and see if there aren't some occasions where we can reduce our use of Tornado - Investigate other concurrency frameworks, like asyncio + uvloop. This sounds neat, but is likely expensive for many reasons. I did try using uvloop + asyncio + tornado but it wasn't very effective. The overhead appears to be higher in this stack so that uvloop doesn't seem to do much good.
Reactions are currently unavailable