Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Simulating 100 or more users  RSS feed

 
Barry Andrews
Ranch Hand
Posts: 529
C++ Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I have a test application with a GUI interface that stresses a server and verifies the data coming back from the server. Then I have another small program that uses the reflection API to create multiple instances of this application (say 100 or so) in separate threads and controls each instance automatically. My question is, is this an accurate representation of 100 users since they are in separate threads or would each instance need to be started in it's own JVM? I would really like some good feedback on this one. I really need to stress this server hard. Many thanks!!!

Barry
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I'd probably put all 100 user threads in a separate JVM from the server itself, for starters. If possible, putting them on a separate machine entirely would be preferable. If you're stressing the server, it's not really fair to also load it with all those user threads. My guess is that it will be OK to put all the user threads on one machine. To be more sure, you could check some things, like total memory and CPU usage. You could start a few threads which do nothing but Thread.sleep(1000) and print a timestamp, in a loop. Looking at the output from this will give you an idea if the environment for the user threads is overstressed or not - are there significant delays, or do the timestamps generally occur one per second? I assume the user threads don't require any synchronization relative to each other, they just fight for attention from the server. If there are any other synchronized resorces they compete for, you might have to put them in separate JVMs, but in general that seems like it would just take more machine resources unnecessarily.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!