Tell me more ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

For testing purposes I need to generate high CPU load on a Windows Server 2003. I cannot install any software but have to make do with what Windows provides.

What would be the best way to achieve that?

share|improve this question
1  
I usually just launch a bunch of cmd.exe instances with dir /s C:. Get 10 or so of those running at once and you get very high CPU use (70%+ across all cores of my i7-2600k) in addition to lots of disk I/O. Not perfect, but it gets the job done. – Amazed Mar 4 '12 at 10:59

9 Answers

consume.exe from the Windows Server 2003 Resource Toolkit can do this easily.

C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\x64>consume -cpu-time -time 5
Consume: Message: Time out after 5 seconds.
Consume: Message: Successfully assigned process to a job object.
Consume: Message: Attempting to start 256 threads ...
................................................................................
................................................................................
................................................................................
................
Consume: Message: Sleeping...

Uses 100% CPU time on all cores as long as it runs. It can also consume other resources (as the name implies).

share|improve this answer
5  
The Resource Toolkit isn't installed by default. – HaydnWVN Mar 9 '12 at 13:44

IntelBurnTest and Prime95 are known for doing just this. They don't really require installation, as they can be run by unpacking their respective zips, but it doesn't fulfill your "must be native" requirement. I'm an overclocker, and these are the tools I use to ensure absolute system stability, they will generate the utmost load from your computer.

As for your want for it to be a native piece of software - windows doesn't really come with the tools to do such a thing, except for maybe the above batch file, which is going to be a mess to handle if it goes haywire. (Infinite loops can be messy.)

share|improve this answer
11  
+1 for Prime95. – Shiki Mar 3 '12 at 15:51

A tight loop in VBS with no I/O will do it. You'll need as many processes as cores. The following will use 100% on my Win2k3 VM, or 50% on my dual-core host (100% if I launch 2)

c:\test\>copy con thing.vbs
While True
Wend
^z
c:\test\>thing.vbs

You'll have to kill wscript.exe in the task manager to end it.

share|improve this answer

The following batch file does it:

@echo off
:loop
goto loop

However, if you have multiple cores, you have start multiple instances.

To stop, press Ctrl+C in the console.

share|improve this answer

I usually open an Internet Explorer window for each logical CPU, navigate to http://www.fossiltoys.com/cpuload.html, and set 100% load. This doesn't require any installation, and can effectively generate 100% CPU load on a machine.

share|improve this answer

HyperPi (GUI to run SuperPi on multiple cores) can be run without installing just copy it to the server and run it from any location. Even on something fast you can load up all the cores for few hours doing say 16 simultaneous 32M place calculations.

share|improve this answer

The way most people do it is to run something that does a load of processing - I was recommended superpi, though hyperpi might work better for a modern system. Calculate absurdly large value of pi, and it'll effectively run the processor at full load.

Alternatively you can run StressCPU which is based off folding@home

If you need to keep high loads for longer periods of time, consider something like folding@home

share|improve this answer

Running for /l %a in (0,0,1) do echo a in a command prompt (infinite loop printing a) has the observed effect of starting a conhost.exe running at 10-20% CPU load on Windows 7 on a low-end mobile i5. You could try running several of these in parallel, for example the following in a batch file:

start for /l %%a in (0,0,1) do echo a
start for /l %%a in (0,0,1) do echo a
start for /l %%a in (0,0,1) do echo a
start for /l %%a in (0,0,1) do echo a
start for /l %%a in (0,0,1) do echo a
start for /l %%a in (0,0,1) do echo a
start for /l %%a in (0,0,1) do echo a
start for /l %%a in (0,0,1) do echo a
start for /l %%a in (0,0,1) do echo a
start for /l %%a in (0,0,1) do echo a

That could have your CPU running at 100%. Lines can be added/removed to adjust.
Warning: Those are infinite loops, which you may have trouble closing. The numbers inside the parentheses can be replaced, e.g. (0,1,10000), for a finite loop. The last number (in the finite loop) can be adjusted to adjust the running time. In case you are wondering, it basically means "start at number 0, increment by 1 until it reaches 10000", which translates to 10000 loop cycles.

share|improve this answer
Have you tested this? This is IO bound so I think it probably won't reach 100% CPU utilization, no matter how many instances you launch. – Ben Richards Mar 3 '12 at 16:18
It could very well be system dependent. For me, it was consistently above 97% total, though with dwm.exe at 25% and all the conhosts hovering about 5-10%. In any case, mgjk's vbscript solution is more elegant. – Bob Mar 3 '12 at 16:29
The windows console is exceptionally slow when it comes to flooding the console. It also cause significant GUI lag that might not allow you to kill it with task manager. Note that Ctrl-C or Ctrl-Break won't work because of the data that's already out. – xiaomao Jul 12 '12 at 15:38

use the built-in "calc" to calculate 10000! (10000 factorial). Use two or three instances to max out a multicore

share|improve this answer
Actually it will overflow calc.... there is a maximum value that calc would calculate, it is less than 10000 but more than 1000. – Diogo Mar 6 '12 at 22:19
@DiogoRocha Didn't overflow: I got 2.8462596809170545189064132121199e+35659. However, did it in less than a second on my computer. – xiaomao Apr 8 '12 at 20:39
hmmm. Mine did overflow, actually a factorial on a digital calc is made matemathically reducing to a truncated series... it is an aproximation that will reduce cpu loads. this is thee reason because you left less than 1 sec of processing.. – Diogo Apr 9 '12 at 0:50

Your Answer

 
discard

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.