1

I am trying to do load testing on my php site that I have built and I have found jMeter but I am concerned that when i try to simulate 1000 users its not actually simulating them accurately due to a max in the number of requests i can make at the same time on my mac. Is there any way to get around this potential problem or do I need to find another way to load test?

I am aware that windows limits the number of connections you can make so I assume mac does the same.

Currently I have simply downloaded jMeter and created a thread group with 1000 threads (users) and added a listener to view the response times.

user3916570
  • 780
  • 1
  • 9
  • 23

3 Answers3

1

You can increase the number of max connections on mac by following this

Diego Fu
  • 410
  • 2
  • 10
  • And will the max number of threads that mac allows affect this load test as well? – user3916570 Aug 11 '15 at 23:43
  • It certainly does. http://stackoverflow.com/questions/765101/what-is-the-highest-number-of-threads-that-is-reasonable-to-simultaneously-run-in – Diego Fu Aug 11 '15 at 23:50
  • So then there is no way to actually load test my site because this will always interfere with the data. – user3916570 Aug 11 '15 at 23:52
  • Say your site has a 20 millisecond response time and say there is 5ms (which seems very high) to process that response by jmeter: 1 thread will hit your site with 40 requests/second. According to the link people easily achieve 100 threads in jmeter, some manage 1000 - so with 20ms response and 5ms processing you're looking at 4000-40000 requests/second. Obviously this is all guesstimating, but if jmeter can't load test your site I'd be suprised – beresfordt Aug 12 '15 at 00:11
  • Well, when I run it on my mac as the request number gets higher the response time gets higher and this must be because it cannot send all these 1000 requests at once. Even if I create an HTTP Request for google.com. The response time increases with sample#. – user3916570 Aug 12 '15 at 01:24
1

As per this:

There are many things you need to chech:

  • Xmx

  • System limits for user

  • Tcp settings

  • ....

For JMeter tuning read this:

But anyway it's a bad practice to load test a target system from the machine where it is running, your results will be inconsistent.

Setup another machine following best practices and load test your system this way

Community
  • 1
  • 1
UBIK LOAD PACK
  • 33,980
  • 5
  • 71
  • 116
0

MacBooks are quite hi-end machines, it shouldn't be a problem to simulate 1000 users with JMeter.

  1. Make sure that you run JMeter in command-line non-GUI mode as

    ./jmeter -n -t /path/to/your/testplan.jmx -l /path/to/resultsfile.jtl
    

    After test completion you can open JMeter GUI, add Listener of your choice, using "Browse" button locate "resultsfile.jtl" and open it - this way you'll see test results

  2. Make sure that you have all the listeners removed or disabled during test run
  3. Locate the following line in jmeter startup script in /bin folder of your JMeter installation:

    HEAP="-Xms512m -Xmx512m"
    

    and change minimum and maximum values to be 60-80% of your total physical RAM

  4. Make sure that you run your PHP application and JMeter on different machines.

See JMeter Performance and Tuning Tips guide for other JMeter configuring tips and tricks.

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
  • They are running on two different machines but I am still confident that not all 1000 requests are being sent at one time as I can see jmeter processing them in groups – user3916570 Aug 13 '15 at 20:34
  • If you need to kick off all 1000 requests at the same moment you need to add [Synchronizing Timer](https://blazemeter.com/blog/using-jmeter-synchronizing-timer). – Dmitri T Aug 14 '15 at 07:11