[
https://issues.apache.org/jira/browse/CASSANDRA-8341?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14219174#comment-14219174
]
Robert Stupp edited comment on CASSANDRA-8341 at 11/20/14 11:04 AM:
--------------------------------------------------------------------
Yea - that {{TheadMXBean.getCurrentThread...()}} hopefully directly accesses
the CPU registers for that.
Not sure about that since the implementations are very OS specific (in
{{hotspot/os/\*/vm/os_\*.cpp}} in OpenJDK source) and as such also specific to
the CPU model.
If all the implementations access the CPU registers for that, it definitely
better than {{System.nanoTime()}, which is consistent over CPU codes (-> NUMA -
expensive).
Note: I don't want to make this ticket more complicated as necessary - just
want to mention that metrics have their own overhead and should be used with
care in sensitive areas like thread scheduling.
was (Author: snazy):
Yea - that {{TheadMXBean.getCurrentThread...()}} hopefully directly accesses
the CPU registers for that.
Not sure about that since the implementations are very OS specific (in
{{hotspot/os/*/vm/os_*.cpp}} in OpenJDK source) and as such also specific to
the CPU model.
If all the implementations access the CPU registers for that, it definitely
better than {{System.nanoTime()}, which is consistent over CPU codes (-> NUMA -
expensive).
Note: I don't want to make this ticket more complicated as necessary - just
want to mention that metrics have their own overhead and should be used with
care in sensitive areas like thread scheduling.
> Expose time spent in each thread pool
> -------------------------------------
>
> Key: CASSANDRA-8341
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8341
> Project: Cassandra
> Issue Type: New Feature
> Components: Core
> Reporter: Chris Lohfink
> Priority: Minor
> Labels: metrics
> Attachments: 8341.patch, 8341v2.txt
>
>
> Can increment a counter with time spent in each queue. This can provide
> context on how much time is spent percentage wise in each stage.
> Additionally can be used with littles law in future if ever want to try to
> tune the size of the pools.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)