GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Lock monitoring overhead/accuracy · Issue #805 · async-profiler/async-profiler Closed Labels DescriptionI noticed in my application that It also attributed a large amount of time in an area I believe is mostly uncontended, and comparing with e.g. I have a guess as to how the overhead leads to inaccurate results - the time taken to record the sample by the lock holder is not included in the acquire time reported by that thread, which is good, but thread 2 sees a longer acquire time because thread 1 is recording the sample while still holding the lock. So lock tracing actually increases contention, which is bad for performance but also messes with the result accuracy because it's not accounted for. I suggest at least increasing the default threshold, in my test 10us is enough to remove the undue overhead while still catching the most interesting cases. As far as I can tell, the overhead is from: a) getting the thread id via gettid syscall I'm wondering if there's any way to move these outside the lock. I suppose you could do them pre-emptively in As I mentioned, I saw this in a real application, but I also tried to create a simple repro: Attaching async-profiler after startup shows the overhead. Using And you can compare a wall profile (doesn't show significant contention) to the results shown by a lock profile (suggests high contention) to show the inaccuracy I was talking about. Thanks for reading! Let me know what you think, I'm happy to help with implementation (even just changing the default threshold) if you think any of the ideas are good. Activity
MetadataMetadataAssigneesLabelsTypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |