New answers tagged cpu
The command that you're using to display the CPU load is running in a tight loop, so it's competing with CPUburn. If you want to observe the CPU load that CPUburn would have with no competition, add something like sleep 1 in the loop. In your test, initially the observer loop gets pretty much all the CPU, then progressively the burnP6 gain more and more CPU ...
cat doesn't use any significant CPU time (unless maybe on-disk decryption or decompression is involved and accounted to the cat process which is the one reading from disk) or memory. It just reads the content of the files and writes it to the pipe in small chunks in a loop. However, here, you don't need it. You can just do: gzip -c file1 file2 file3 file4 ...
If you want to stretch the process out without using too much resource then try modifying the scheduling priority by changing the nice value.: nice -n 19 cat file1 file2 file3 file4 | gzip > compress.gz man nice -n, --adjustment=N add integer N to the niceness (default 10) You can also regulate the gzip speed which may be worth ...
Change the number of processors that are devoted to the guest VM under its settings dialog. Doing so will definitely allocate more CPU cores to the guest VM.
The hypervisor presents a certain number of cores to the guest OS. I am not familiar with VirtualBox but I assume that it is quite similar to KVM/QEMU where you can configure the amount of cores (even above the number of physical ones). Have a look at the settings of your VM.
By default top only displays user processes (i.e. processes other than the kernel and its threads). It's possible that the kernel is busy with disk or network IO that is not showing up in top's display. You can toggle the display of kernel threads in top by pressing SHIFTs. You can use the vmstat utility to display statistics about (among other things) ...
This really seems like the kind of question you should answer yourself: keep statistics while the machine is operating normally for a while (e.g. a week), and this will give you some idea of what the parameters of normal operation should be. Your snapshot shows you more or less maxing out one of two cores. Since your main process is multi-threaded, this ...
As dfarrell07 pointed out, taskset does not affect all threads (LWPs) of a process by default. Use the "-a" option to taskset to affect all threads in the process.
if you have sysstat installed you can use sar command e.g sar -q runq-sz plist-sz ldavg-1 ldavg-5 ldavg-15 blocked 16:49:01 0 173 0.00 0.01 0.05 1 16:50:01 0 173 0.00 0.01 0.05 0 from sar 's man page -q Report queue length and load ...
I think that vmstat does what you need. From the man page: vmstat reports information about processes, memory, paging, block IO, traps, disks and cpu activity. The first report produced gives averages since the last reboot. Additional reports give information on a sampling period of length delay.
Top 50 recent answers are included