Max CPU: Another one for your developer toolbox...
For various reasons, mostly related to my day job, I often find it useful to simulate excessive CPU usage. I’m sure every developer that has been coding for a while has at one point written the following program.
(For the C# programmers out there, this is in fact a perfectly valid C++ program.) Of course today it is common to have multi-processor computers, or at least multi-core or hyper-threaded processors in which case the program above will only max out one of the logical processors on the computer.
For this reason I wrote the Max CPU program to provide a simpler and more convenient way of maxing out my processors.
Single 64-bit dual-core Intel Pentium
Max CPU will determine how many logical processors are currently available and allow you to stress any number of them.
Dual Intel Xeon with Hyper-Threading
The program creates one thread for every processor and each thread will automatically spin or sleep depending on the position of the slider control.
Of course you can set the processor affinity thus limiting the processors that the threads can get executed on but that would be cheating.
And just in case you accidentally raise the process priority, I have lowered the relative priority of the “processor threads” so that they won’t starve your computer.
It doesn’t minimize and defaults to being a top-most window to avoid you forgetting to stop it since you don’t want to be running this little guy in the background just for fun.
Anyway, I find this little tool useful. I have no idea if it will interest anyone else but I thought I’d share it anyway.
Download the executable and save it to a local drive before running it. It requires the .NET Framework 2.0 and will run natively as either a 32-bit or 64-bit process depending on your operating system.
© 2005 Kenny Kerr