google / UIforETW

User interface for recording and managing ETW traces
https://randomascii.wordpress.com/2015/04/14/uiforetw-windows-performance-made-easier/
Apache License 2.0
1.55k stars 201 forks source link

I see an issue #69

Closed jeffstokes72 closed 8 years ago

jeffstokes72 commented 8 years ago

How do I contribute an idea/fix without doing a coding fix?

jeffstokes72 commented 8 years ago

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ./ It’s a trap! \ . . . . . . . . . . . . . . . . ,,,--~~~~--, . . . .\ ./ . . . . . . . . . . . . . . ,-‘ : : : :::: :::: :: : : : : :º ‘-, . . \/. . . . . . . . . . . . . . . . . . . . . . .,-‘ :: : : :::: :::: :::: :::: : : :o : ‘-, . . . . . . . . . . . . . . . . . . . . . ,-‘ :: ::: :: : : :: :::: :::: :: : : : : :o ‘-, . . . . . . . . . . . . . . . . . . .,-‘ : :: :: :: :: :: : : : : : , : : :º :::: :::: ::’; . . . . . . . . . . . . . . . . .,-‘ / / : :: :: :: :: : : :::: :::-, ;; ;; ;; ;; ;; ;; ;\ . . . . . . . . . . . . . . . . /,-‘,’ :: : : : : : : : : :: :: :: : ‘-, ;; ;; ;; ;; ;; ;;| . . . . . . . . . . . . . . /,’,-‘ :: :: :: :: :: :: :: : ::,-~~,’-, ;; ;; ;; ;; | . . . . . . . . . . . . / :,’ :/ :: :: :: : : :: :: ,-‘/ : ,-‘;’-‘’’’’~-, ;; ;; ;;,’ . . . . . . . . . . . ,-‘ / : : : : : : ,-‘’’ : : :,--‘’ :|| /,-‘-‘--‘’’,’’’ \ ;; ;,-‘ . . . . . . . . . . . \ :/,, : : : ,-‘ --,, : : \ :\ ||/ /,-‘-‘x### ::\ \ ;;/ . . . . . . . . . . . . . . \/ /---‘’’’ : \ #\ : :\ : : \ :\ | | : (O##º : :/ /-‘’ . . . . . . . . . . . . . . . /,’__ : :\ ‘-#\ : \, : :\ :\ \ \ : ‘-,__,-‘,-`-,, . . . . . . . . . . . . . . . ‘ ) : : : :’’’’--,,--,,,,,,¯ \ \ :: ::--,,’’-,,’’’¯ :’- :’-, . . . . . . . . . . . . . .) : : : : : : ,, : ‘’’’~~~~’ \ :: :: :: :’’’’’¯ :: ,-‘ :,/\ . . . . . . . . . . . . . .\,/ /|| | :/ / : : : : : : : ,’-, :: :: :: :: ::,--‘’ :,-‘ \ \ . . . . . . . . . . . . .\’|\ |/ ‘/ / :: :--,, : , | )’; :: :: :: :,-‘’ : ,-‘ : : :\ \, . . . . . . . . . . ./¯ :| \ |\ : |/\ :: ::----, :\/ :|/ :: :: ,-‘’ : :,-‘ : : : : : : ‘’-,, . . . . . . ..| : : :/ ‘’-(, :: :: :: ‘’’’’~,,,,,’’ :: ,-‘’ : :,-‘ : : : : : : : : :,-‘’’\ . . . . . ,-‘ : : : | : : ‘’) : : :¯’’’’~-,: : ,--‘’’ : :,-‘’ : : : : : : : : : ,-‘ :¯’’’’’-, . ./ : : : : :’-, :: | :: :: :: ,,-‘’’’¯ : ,--‘’ : : : : : : : : : : : / : : : : : : :’’-, / : : : : : -, :¯’’’’’’’’’’’¯ : : _,,-~’’ : : : : : : : : : : : : : :| : : : : : : : : : : : : : : : :¯’’~~’’’ : : : : : : : : : : : : : : : : : : | : : : : : : : : :

Not really. I see a bug I think in buffering.

randomascii commented 8 years ago

By creating an issue, like this one, only with more details.

jeffstokes72 commented 8 years ago

Ah cool, thanks Bruce, how you doing?

So, in large memory systems, say, 1-4TB, ETW tracing by default will consume a high amount of buffer memory in NPP (I believe). If you note in WPRUI there is a large memory profile to run. I didn't see that as an option here in your UI. Is this done automatically (I don't have a high RAM system to test with right now sadly) or could you add it maybe? I looked around (not a coder) and didn't see this in your code as a condition, but i'm open to having missed it and this being a non-issue.

Anyway first time caller, long time listener on your blog.

Best, Jeff

randomascii commented 8 years ago

I don't think UIforETW hits this problem. wpr and wprui both default to using a percentage of memory for buffers, with no cap, but UIforETW does not do that. It does boost the buffer sizes used on large-memory machines, but it doesn't boost them arbitrarily high. Therefore the large-memory profile fix needed for wprui doesn't apply because the problem doesn't exist.

In the most extreme case UIforETW uses BufferCountBoost(1000) buffers. Each buffer is 1 MB and on high-memory machines BufferCount will double the requested number of buffers, so this gives 2 GB of buffers. This is pretty huge, but it only happens when doing heap tracing, and is only about 0.1% of the memory on a 1-4 TB machine.

I keep meaning to add some user control over this but the values are in the right ballpark so there has been little incentive.

jeffstokes72 commented 8 years ago

Ok cool. this explains it well thanks. And yeah, I agree, the values you pick seem reasonable. Cool sorry to bug ya then sir :) Code on!