I’m working on an application which we’re going to use to simulate users working on a system. One of the goals is to stress test the application by letting a lot of users perform tasks.
A user is simply a backgroundworker at this point. Now, no matter how many ‘users’ I spawn, the CPU load of the cores never gets through the roof.
Now, I’m pretty new to threading, but my best guess is this is due to the hardware limit of, in this case, 4 cores. The cores get set to work and after that it’s just a matter of timeslicing.
Are there any ways to work around this? I’d like to stress all cores as much as possible.
VS2010 has a pretty good Load Test functionality. One of my co-workers wrote a blog post on simulationg multiple users here. The basis for this is to write a few unit tests around the most common operations your users perform and then let the VS Load Test do the multi user work for you.