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
os/filestore: fix journal logger #12099
Conversation
779639b
to
0d68aaa
Compare
@athanatos this was introduced by f54e563 ... it does look like the dec shouldn't be there; can you confirm? |
No, the decrements should be right. Those counters are supposed to be at any moment equal to throttle values, thus, we decrement them when we release the throttle. If you like, you could restructure it to a pair of _taken and _released throttles, but I think it would be harder to read the code. In the current code, it should never go negative. If you saw it underflow, that's a bug and you should find where we are taking throttle without incrementing the counters. |
These two items (journal_ops/bytes) were used to count the journal total value according to description. And from the document about perf counters: If bit 8 is set (counter), the reader may want to subtract off the previously read value to get the delta during the previous interval. We may have two ways to fix it?
|
Actually, the decrements are still there. Flush is called and I only remove the logger dec. |
the metric type should be changed to u64 then (not u64_counter).
|
Using u64 intsead of u64_counter for journal_ops/bytes. These two items are used to metric active journal entry/size, active means data in journal queue and journal disk, which will be applied soon and then become inactive or useless. Signed-off-by: Wei Jin <wjin.cn@gmail.com>
0d68aaa
to
4fdf401
Compare
Updated. As for dynamic throttling, I think people are care more about the active journal data instead of total data written to journal for monitoring. |
lgtm |
counter type (value 10) shouldn't be decreased in that it may generate
negative value when monitoring.
Signed-off-by: Wei Jin wjin.cn@gmail.com