Every once in a while you would want to stress a VM or multiple VMs to test the working of for instance VMware DRS. There are multiple tools available but most of them only focus on CPU and are usually not multithreaded. My colleague Andres Mitchell developed a cool tool which will load a multithreaded CPU load and will generate memory load.
Andrew tweeted about this tool this week and I tested it today. It looks great and it works great.
Saw some tweets wanting ways to generate load in a VM. Here’s one I prepared earlier: http://bit.ly/9A39Xh (multithreaded CPU and mem load). I exchanged a couple of emails with Andrew after this tweet and asked him to write a short explanation of what the tool does:
It’s a pretty simple utility to generate CPU and/or memory load within a virtual machine (or a physical server if you are still living in the dark ages). You can specify the number of threads to generate for CPU load and the approximate load each thread generates. You can also specify how much memory you want the application to consume. There’s a timer so you can configure it to only generate the specified load for a set period of time, and system memory utilisation and system/per core CPU utilisation indicators within the application.
Here’s a screenshot of the app:
Chris Waltham says
For Linux/UNIX users, stress (http://weather.ou.edu/~apw/projects/stress) is a good program to stress-test CPU, RAM, or both.
kopper says
nice tool
by the way even when I set RAM to MAX I don’t see the RAM overloaded…
Andrew Mitchell says
@kopper re: RAM not being overloaded – That’s something I’ve noticed too. If you fire up task manager you’ll see that it’s caused by Windows paging out the data rather than placing it in RAM. The only real way for me to address that it to flag that thread as ‘real-time’ which places it at a higher priority than Windows itself. I considered that but decided not to because it’s not really a safe thing to do.
I’ll have another look at it over the next few weeks and see what I can do.
Jitterz says
RAM load not working for me either, but I have noticed it’s offloaded to the paging file but only if I specify available RAM. If I do any more it does nothing, if that makes sense.
Nice tool.
thanks
YP Chien says
Thanks for sharing this great tool.
Actually, I am in the middle of preparing a white paper on memory sizing in virtualization for our group. I am trying to find something to generate memory load until today.
The reason I needed something to generate memory load is I keep on finding situations where VM memory get reclaimed by balloon memory during memory shortage. However, this balloon memory never seems to “deflate” even the ESX is in high memory state with tones of free memory. So I would like to see if I could use this tool to force an “active” memory load to get rid of the balloon memory. But looks like the balloon memory still won’t deflate even I tried to generate high memory load. any ideas?
Andrew Mitchell says
@YP Chien
Have you checked for memory limits being applied to the VM or a resource pool in which the VM resides?
Can you run esxcfg-info -r > resource.log and mail the resulting file (resource.log) to me – amitchell_at_vmware.com
wilson says
cpustress.exe shipped with the windows resource kit many years ago. usually i use that to put load on a single VM.
MattG says
Andrew,
Right now I use:
MaxCPU
Leakyapp
IOMeter
For my ESX/DRS stress testing. If you could add a disk IO generator, then I could go down to a single tool.
Good job.
Doug Davis says
Good tool. If it was possible to take this tool outside of the single VM & get it to do the same thing to multiple VMs at the same time, that would be brilliant.
Michelle says
Thanks for sharing this great tool.
Actually, I am in the middle of preparing a white paper on memory sizing in virtualization for our group. I am trying to find something to generate memory load until today.
The reason I needed something to generate memory load is I keep on finding situations where VM memory get reclaimed by balloon memory during memory shortage. However, this balloon memory never seems to “deflate” even the ESX is in high memory state with tones of free memory. So I would like to see if I could use this tool to force an “active” memory load to get rid of the balloon memory. But looks like the balloon memory still won’t deflate even I tried to generate high memory load. any ideas?
Andrew Mitchell says
NOTE: New version posted at http://www.mediafire.com/download.php?zmljhmvma3n. Now takes command line arguments.
cpu=
threads=
mem=
timer=
auto=
e.g To start the app with a 20% CPU load per thread running 2 threads, a memory load of 200MB and have it run for 5 minutes, starting automatically you would run:
loadstorm cpu=20 threads=2 mem=200 timer=5 auto=true
Andrew Mitchell says
@Michelle
What you are seeing is expected behavior. The balloon driver will cause pages to swap but those pages won’t be brought back into physical memory until the application that has reserved those pages tries to access them. Generating more load within the VM will just allocate new memory pages and won’t cause the old swapped pages to come back in. The only way to do that is to get the application that has reserved those pages to access them again.
Thrazzle says
Andrew,
How can I make loadstorm exit after a scripted run? I’d like to use loadstorm in a script but it doesnt exit.
thanks
Thrazzle
Doug Davis says
Does anyone have the updated zip file? I can’t seem to get hold of it from Mediafire, and could really do with being able to run from the command line.
Andrew Mitchell says
Hi Doug.
I just tried the link at it failed with IE9, but worked ok with FireFox. It might be worth trying another web browser.
JB says
Is there any way to lift the 120 minute max automatic load generation?