how to calculate CPU Hz


I start ./video_encode sample to encode, and the top command show CPU loading of encode process is 2%.

Now i confused about how to calculate specify CPU Hz consume by 2% value, is that (2% / 600%) * (2GHz * 6) or (2% / 100%) * (2GHz * 6)?

Top by default shows load-per-CPU.
Thus, 100% means 100% of ONE CORE.
Thus, a process could use up to 600% CPU on a hexa-core system.

Note that %CPU load is a somewhat unreliable indicator for a number of reasons.
One is that you may be bound on something other than CPU use (memory, I/O, etc.)
Another is that the %CPU is “% time spent executing code” but if the CPU changes its frequency, it will be able to “do more work” even when it goes towards 100% of load.

The best way to know whether the system can actually do the work you need it to, is to develop a test suite that includes the worst case of everything, including things like network traffic, background updates (if you use those) and such, and simply measure whether it keeps up or not.

Thanks, snarky.

Your advise is really appreciated.

You might want to install package “htop” and view load that way…it’s sort of a modernized top.