Best way to measure percentage of time spent doing IO #1252
AlliBalliBaba
started this conversation in
General
Replies: 1 comment 6 replies
-
Maybe we should do something like this: https://www.usenix.org/conference/nsdi24/presentation/wydrowski? Basically, we can know the average rif and duration. Scale accordingly to maximize rif and minimize duration. |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've been doing some testing with automatically scaling threads at runtime. This generally works pretty well by just creating a new thread if a request has been stalled for long enough.
The only problem with that approach is that it can not distinguish if requests are stalled because threads are doing IO or because all CPU cores are already busy. If CPU's are busy, we obviously don't want to spawn additional threads.
My question then would be: What's the best (cross platform compatible) method to measure how much CPU is being used? Does prometheus expose this metric somehow reliably (@withinboredom)? Or would it be better to manually calculate the cpu time of each thread via
clock()
?Beta Was this translation helpful? Give feedback.
All reactions