How to hobble a CPU

S

Solostian

Hi,

I need to conduct a series of performance tests. Unfortunately, my
workstation is way more powerful than the targeted workstations. I need
to design a script that will allow me to cut down the overall CPU power
by a set % value.

Does anyone knows if this is possible at all with Perl?
Where would I first need to look?

Regards,
Solostian
 
X

xhoster

Solostian said:
Hi,

I need to conduct a series of performance tests. Unfortunately, my
workstation is way more powerful than the targeted workstations.

Trade workstations.
I need
to design a script that will allow me to cut down the overall CPU power
by a set % value.

I fail to see the point. Why do you need to hobbler your workstation? If
your job is purely CPU bound, then just take the time on your workstation
and multiply it by the scaling factor.

Xho
 
T

Ted Zlatanov

I need to conduct a series of performance tests. Unfortunately, my
workstation is way more powerful than the targeted workstations. I need
to design a script that will allow me to cut down the overall CPU power
by a set % value.

Does anyone knows if this is possible at all with Perl?
Where would I first need to look?

You can use a program like `vmstat' to get the current CPU load as a
percentage, or look at the CPAN Sys::Load module (or just run
`uptime') to get the system load. System load is sometimes more
accurate that CPU usage, because it takes into account all factors
affecting performance (it's the average number of processes that are
waiting for execution at any given time during the last N minutes).

If you're using hyper-threading or multiple processors, it's hard to
load the processor with a simple idle loop. You should consider
starting multiple processes.

Also this:

http://dcs.nac.uci.edu/~strombrg/slowdown/

may be what you need, if you just want to slow down your program, not
the whole system. There may be other ways to accomplish this...

Finally, it's not very meaningful to artificially slow down a
performance test. Instead, benchmark both systems in a standard way
(which depends on what exactly you are benchmarking), and you will
have a standard scaling factor. The Perl Benchmark module may be
useful here.

Ted
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,262
Messages
2,571,058
Members
48,769
Latest member
Clifft

Latest Threads

Top