Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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'd like to run some minimum-expectation benchmarks on EC2, but I'm having an issue of high variability in my output data. Specifically, they keep giving me more CPU than I'm minimally entitled to, which is killing my ability to evaluate minimum performance when I'm only receiving my minimal CPU allocation.

So the question is...does anyone know a way to limit the CPU cycles available to the entire OS? I'm looking at Debian-based systems, so primarily Ubuntu. I've tried modifying the governor (no luck) and there's no access to Xen config (not that it would help) or the BIOS. All other solutions are either percentage (cpulimit, cgroups) or time (ulimit) based and therefore won't work.

share|improve this question
I don't think there's a way to do this for the entire system. – slm Dec 12 '13 at 5:57
the cpulimit program seems to do this manually using interrupts - my only solution may be to modify this program to use the total cycle count – Hamy Dec 14 '13 at 18:55
your claims are not fitting to use for EC2 and if you limit the CPU power then your benchmarks will be wrong. I believe that only benchmarks are correct that measure the whole system resources over time and yield an average value of CPU/NET/DISK IO. – user55518 Mar 10 '14 at 21:37
"claims are not fitting"? Not sure what you mean, but what I'm describing here is essentially a system under load. The only difference is that typically load originates from outside the system, but in EC2 it can originate from inside the system. I'm not sure what you mean believe correct - the benchmarks I propose are not intended to be "the best benchmark" but are instead intended to address a real scenario I'm facing that no other benchmarks provide metrics on – Hamy Mar 11 '14 at 3:18
What I mean is to be firstly aware that a VM as the name says virtual and that means even if you get your CPU's limited you'll never get reliable results. BTW: aws offers extended statistics for EC2. Perhaps it is something for you? – user55518 Mar 11 '14 at 7:53

Your Answer


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

Browse other questions tagged or ask your own question.