New Update BottleNeck

Installed BN 2.02 over the top of BN 1 and it is running good as expected.

Regards Eck:)
Thank you, I appreciate that! BTW, I forgot to uncomment the code where there computer beeps twice when it wakes the drives. It might be good to leave it in for this version, and remove it next version, that way everyone will get an idea of when WakeAllDrives method is called. It really should not beep that often at all, but if it does, just use 2.01 instead for now.
 
Hi Dan,

I've noticed a difference in RAM usage values in the Bottleneck app and Task Manager

1746093546161.png
 
I think it's a great little tool, but the discrepancies between Task Manager and BottleNeck had me scratching my head, so I uninstalled it.
 
I think it's a great little tool, but the discrepancies between Task Manager and BottleNeck had me scratching my head, so I uninstalled it.

Yes, it does seem handy, so I am trying it out for now. But should I notice I hardly look at it, then I will remove it. (Sorry danb. (y))
 
Here is an explanation from ChatGPT... In short, Windows Task Manager is "More user-friendly and higher-level, showing smoothed and normalized values." and BottleNeck is more accurate for any given moment in time / real-time results. We can try the new ETW method (it was not available when I first developed BottleNeck several years ago), but we definitely want to skip the WMI method (for a lot of reasons). I have not researched this yet, but I believe the ETW method will have very similar results to the PerformanceCounters method we currently use, although, it might have some advantages, like even less resource usage or something. So when I get a chance, I will play around with the ETW method.

I actually like that the values are different, that way you can see both perspectives... over time and real-time. But I am curious how good ETW is.

Here is the ChatGPT conversation...

You said:​

I have a C# app that utilizes PerformanceCounters to track CPU, RAM and HDD usage. It works, but the results do not necessarily align with the Windows Task Manager utilization. What could account for the discrepancy? Which one is more accurate overall?

ChatGPT said:​

Discrepancies between PerformanceCounter readings and Task Manager values in Windows are common and can be due to several factors. Here's a breakdown of potential reasons and which one is more "accurate" depending on context:

🔍 Why the Discrepancy?​

  1. Sampling Rate and Timing
    • PerformanceCounters measure usage over a short interval, and your code determines when the samples are taken.
    • Task Manager smooths data and averages usage over time (typically 1-second or more intervals), which can cause differences, especially during CPU/RAM spikes or dips.
  2. Processor Time Calculation
    • % Processor Time from PerformanceCounter is based on total elapsed time across all cores, so on a multi-core CPU, it can exceed 100% (e.g., 400% on a quad-core). Task Manager usually shows a normalized average (0–100%) unless you break it down by logical processor.
  3. Measurement Scope
    • Task Manager includes more detailed internal logic and may exclude or include certain processes (like system or idle time) differently.
    • PerformanceCounter may not always perfectly represent system-wide or process-specific usage, especially if incorrectly scoped (e.g., _Total, specific instance, or per core).
  4. Virtualization and Measurement Overhead
    • On virtual machines or systems with hyperthreading, the counters may report differently than Task Manager, which integrates additional metrics from the OS scheduler and hardware abstraction layer.
  5. Disk Usage Differences
    • Task Manager shows Active Time (percentage of time the disk is active), while PerformanceCounter might report Disk Bytes/sec or similar. These are different metrics.
  6. RAM Usage Definitions
    • Task Manager differentiates between used memory, available, cached, committed, etc., whereas PerformanceCounter might only show Available MBytes or % Committed Bytes In Use.

✅ Which One is More Accurate?​

Task Manager is generally:
  • More user-friendly and higher-level, showing smoothed and normalized values.
  • More in line with what end users expect when interpreting "CPU usage" or "RAM usage".
  • Uses additional internal Windows APIs and heuristics that may not be directly available to PerformanceCounter.
PerformanceCounters are:
  • Accurate for low-level telemetry, if used correctly.
  • Better for customized, automated, or programmatic monitoring where exact raw values are needed over time.
  • Subject to greater implementation variance, meaning it’s easier to get misleading values if not interpreted carefully.

✅ Best Practice​

  • If you want your app to closely match Task Manager, consider using WMI (e.g., Win32_PerfFormattedData_*) or PDH APIs (Performance Data Helper) with proper normalization.
  • For modern or more precise monitoring, consider using Windows Performance Recorder/Analyzer APIs or ETW (Event Tracing for Windows).
Would you like help comparing your specific PerformanceCounter code with Task Manager's metrics for accuracy?
 
Last edited by a moderator:
After doing some quick research, it looks like PerformanceCounters still might be our best bet overall... we might just need to include an option to normalize the data if the user wants it to more closely match the Windows Task Manager. It looks like ETW and PDH might have higher CPU utilization / overhead, and the last thing we want to do is to slow down the computer, just to get the hardware metrics.

But the question is... do we normalize all three CPU, RAM and SSD? I will play around with it this week and figure out what works best. I will also try the ETW and PDH methods, because now I am curious ;). Thank you guys!
 
After doing some quick research, it looks like PerformanceCounters still might be our best bet overall... we might just need to include an option to normalize the data if the user wants it to more closely match the Windows Task Manager. It looks like ETW and PDH might have higher CPU utilization / overhead, and the last thing we want to do is to slow down the computer, just to get the hardware metrics.

But the question is... do we normalize all three CPU, RAM and SSD? I will play around with it this week and figure out what works best. I will also try the ETW and PDH methods, because now I am curious ;). Thank you guys!
well my experience going back a few years ago when you first coded it, I thought Bottleneck was somewhat heavy even though that was not your intent, since you asked. If Bottleneck could be optimized for lightness, for me that would be more important than exactly matching taskmanager, as long as Bottleneck is a true accurate measure (my 2 cents fwiw).
 
Here is an explanation from ChatGPT... In short, Windows Task Manager is "More user-friendly and higher-level, showing smoothed and normalized values." and BottleNeck is more accurate for any given moment in time / real-time results.
Thank you @danb as that was what I was wondering when I posted this:
Does BottleNeck show truer CPU and Memory use than Task Manager?

With what you are doing to improve this app, and when I installed TaskbarPlus, the thought came to mind that you should bundle these two together and suggest price for both of them. I would gladly consider paying for them. And thank you for not taking my uninstall badly, sometimes I'm not very considerate and didn't have to say a thing considering all that you've been doing to improve this app :)
 
well my experience going back a few years ago when you first coded it, I thought Bottleneck was somewhat heavy even though that was not your intent, since you asked. If Bottleneck could be optimized for lightness, for me that would be more important than exactly matching taskmanager, as long as Bottleneck is a true accurate measure (my 2 cents fwiw).
We can make BottleNeck as light as you want... all we have to do is adjust the frequency of the polling, or we can make it user adjustable. That is the only component that has any overhead at all. It runs great on my i3 8100... 1% CPU or less all the time. What CPU's are you guys using where it is higher than that? It might be slower on a VM as well, I have not checked, just a thought.

But yes, it would be silly to destroy performance, while monitoring performance. It will just take a little time to optimize everything and get everything just the way we want it. I am still optimizing the wake drive feature... getting close.
 
Thank you @danb as that was what I was wondering when I posted this:


With what you are doing to improve this app, and when I installed TaskbarPlus, the thought came to mind that you should bundle these two together and suggest price for both of them. I would gladly consider paying for them. And thank you for not taking my uninstall badly, sometimes I'm not very considerate and didn't have to say a thing considering all that you've been doing to improve this app :)
No problem at all ;). That is kind of the point of MT... to try different software and see what works best for you. Yeah, I was going to bundle BottleNeck into TaskbarPlus, but we have already add way too many hardware type features to BottleNeck, and besides, they both need their own tray icon and having a separate executable is probably wise. Having said that, we could bundle the executables together in a package, and one can start the other. Something like that?
 
Hey guys, here is a version where the metrics are normalized to match the Windows Task Manager as closely as possible. On my 3900X and i3 8100, they match perfectly, so I am curious how well they match on your systems. I am also getting 1% or less CPU utilization for BottleNeck.exe on my 8100 system, and 0% on my 3900X system... if these values are higher for anyone, we can back off on the polling a little and the number should still be accurate. Also, the wake drives feature should be working great now as well. Thank you guys!

BottleNeck 2.03
SHA-256: 33e72c2a8ed14416932421e5b2eb8847590e99f10a8a7082031f077f00a9a468

BottleNeck 2.03 Portable
SHA-256: 2cf89bd0013170ae9b59951271f3a1022b1cc8952ed4d6aef3faa33dd92c997a
 
Hey guys, here is a version where the metrics are normalized to match the Windows Task Manager as closely as possible. On my 3900X and i3 8100, they match perfectly, so I am curious how well they match on your systems. I am also getting 1% or less CPU utilization for BottleNeck.exe on my 8100 system, and 0% on my 3900X system... if these values are higher for anyone, we can back off on the polling a little and the number should still be accurate. Also, the wake drives feature should be working great now as well. Thank you guys!
I installed Bottleneck 2.03 on win10_VM (VMware WS 17) -- prior to the install Taskmanager memory was reading 23% -- I also had process_explorer 17.04 open and its commit charge was 23.14% I assume that's the same thing? Then closed procexp, installed Bottleneck and Taskmanager is reading 24% and bottleneck RAM is reading 24.8%. Then closed Taskmanager so only it is running and Bottleneck reading RAM dropped a 24.5%
 
@danb your latest revision has been very close to Task Manager, and at this point, it has now surpassed Task Manager in accuracy. As you mentioned...
In short, Windows Task Manager is "More user-friendly and higher-level, showing smoothed and normalized values." and BottleNeck is more accurate for any given moment in time / real-time results.
It is now sitting in the System Tray more quietly, not as noticeable (bar heights) as before with some of its previous, occasional higher numbers. This is a different notebook (below image) than the other 8GB RAM notebook I was using, which will show a higher RAM graph by default. BottleNeck is only using 20.8MB of Memory :)

Thank you for your time and effort in dialing it for us (y) :)
system.png

bottleneck.png
 
Last edited:
Interesting software.

This different number between Task Manager and BottleNeck that some member see remember me something about task manager that have found weird years ago:

task manager process panel number are more accurate in low loading usage and as the load increase this degrade more and more( especially cpu usage and even more the more core a processor have) but the detail panel is more accurate in general especially in heavy load compared to process panel.
performance panel in task manager show the same story because the graph is more accurate than the number to answer about the general load of the computer.

So yes task manager show number for a load usage by using 2 different measure

I wonder how this have changed(in good or bad ) now.