-
Notifications
You must be signed in to change notification settings - Fork 293
CA-409482: Using computed delay for RRD loop #6458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CA-409482: Using computed delay for RRD loop #6458
Conversation
a289be7 to
35dcd13
Compare
|
LGTM! |
|
Can we updraft this? |
You mean 'undraft'? I'm making more testing for it. If it works well, I will undraft it. |
35dcd13 to
3bc9fae
Compare
3bc9fae to
c08ac31
Compare
c6f4781 to
dac7a66
Compare
psafont
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think with Timer is both shorter, and easier to understand, let me know what you think
dac7a66 to
b0631f5
Compare
psafont
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really good
RRD loop is executed each 5 seconds. It delays fixed 5 seconds between each loop. But the loop self also consumes time (The time consuming depends on CPU's count. If there are many CPUs, the time consuming may be hundreds milliseconds). This implementation leads RRD will take an offset after several loops. Then one of RRD data lose and a gap can be observed on XenCenter performance graph. The solution is to use a fixed deadline as each iteration start time and to use a computed delay (timeslice - loop time consuming) instead of fixed delay. Signed-off-by: Bengang Yuan <[email protected]>
b0631f5 to
b947e1e
Compare
RRD loop is executed each 5 seconds. It delays fixed 5 seconds between each loop. But the loop self also consumes time (The time consuming depends on CPU's count. If there are many CPUs, the time consuming may be hundreds milliseconds). This implementation leads RRD will take an offset after several loops. Then one of RRD data lose and a gap can be observed on XenCenter performance graph.
The solution is to use computed delay (timeslice - loop time consuming) instead of fixed delay.