Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am running an Ubuntu 12.04 server via a virtual machine (it is running on vmware's ESXi hypervisor) but I am not convinced it has full access to the 8 CPUs that I have assigned to it. My physical server has 2 phyiscal chips with 4 physical cores. I assigned this same configuration to my virtual server. Unfortunately I have never seen any single process get above 12.5% CPU load and I am thinking there might be an issue with my config.

TL:DR - What is the easiest way to max my CPU usage via CLI for testing purposes?

share|improve this question
up vote 3 down vote accepted

Use the stress utility to generate a CPU load on your system.

Something like:

[root@xt ~]# stress --cpu 8
stress: info: [1009156] dispatching hogs: 8 cpu, 0 io, 0 vm, 0 hdd

enter image description here

What exactly are you interested in testing?

share|improve this answer
This is prefect. It maxed out all my CPU cores just like I wanted it to. (I wanted to confirm that the vm had access to all the cores assigned). – Scott Oct 4 '12 at 18:35

100% / 8 = 12.5. You're maxing out only one of your 8 possible cores. Run a multi-threaded program.

share|improve this answer

It's not possible for a single process to get above 12.5% CPU usage in a system with 8 CPUs.

More specifically, a single-threaded process cannot do more than one thing at a time. If a processes on a system with 8 processors is doing relentless back-to-back calculations on CPU 0, then it is consuming 12.5% of the available CPU resources on that system. In order to load multiple cores, you need to run multiple processes, or write a piece of software that will thread to multiple cores.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.