Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

web stress and load testing with jmeter - How good is good? benchmark guide?

I am going to set up some load testing test with jmeter. However, I can't find on the net what is a good bench mark. How good is good?

My site hit is about 80,000/day on average.

After mining out some data from access log for 1 month, I manage to find out:

Average low traffic is about 1 requests / sec Average Medium traffic of 30 requests / sec Average High traffic of 60 requests / sec

I came out with the following plans to test 8 kind of pages and it's ideal respective average response time on a single page load :

  • Page 1 - 409ms
  • Page 2 - 730ms
  • Page 3 - 1412ms
  • Page 4 - 1811ms
  • Page 5 - 853
  • Page 6 - 657ms
  • Page 7 - 10ms
  • Page 8 - 180ms

Simulate average traffic scenario - 10 requests / second test

  • Simulated Users: 10 threads
  • Ramp Period: 1 sec
  • Duration: 30 min

Simulate medium traffic scenario - 30 requests / second test

  • Simulated Users: 30 threads
  • Ramp Period: 1 sec
  • Duration: 30 min

Simulate super high traffic scenario - 100 requests / second test

  • Simulated Users: 100 threads
  • Ramp Period: 1 sec
  • Duration: 30 min

Simulate an attack scenario - 350 requests / sec (based on MYSQL max connection of 500)

  • Simulated Users: 100 threads
  • Ramp Period: 1 sec
  • Duration: 10 min

While running these test, I plan to monitor the following:

  • CPU Load average: (Webserver)
  • CPU Load average: (DB Server)
  • RAM Load average:
  • RAM Load average: (DB Server)
  • Average Response time:

To see how much it's its memory and cpu utilisation and if there's a need to increase RAM, CPU etc... Also I capped MySQL Max connection at 500.

In all testing, I expect response time should be ideally below a capped benchmark of 10secs.

How does this sound? I've no SLA to follow, this is just based on research on current web traffic and coming out with the plan. The thing is I don't know how what is the threshold of the server. I believe with the hardware below it should already exceed what's needed for hosting our pages.

Webserver is running: 8GB RAM, 4 Core ( 1 server, another cold backup server No load balancer ) MySQL Server is running: 4GB RAM , 2 Core.

We are planning to move to cloud so ideally need to find out what kind of instance best fit our scenario through this load testing as well.

Would really appreciate any good advice here..

like image 285
flyclassic Avatar asked Nov 23 '11 07:11

flyclassic


People also ask

Is JMeter good for load testing?

It is used to test load testing functional behavior and measuring performance. JMeter makes it possible by creating a huge number of concurrent users that simulate a heavy load. Initially, JMeter was developed to test applications but now has expanded to other test functions.

Can JMeter be used for stress testing?

Below are some of the most commonly used stress/web testing tools: Apache JMeter – Jmeter is an Open Source testing tool. It is a pure Java application for stress and Performance Testing. LoadRunner – LoadRunner from HP is a widely-used Testing tool.

What is benchmark testing in JMeter?

JMeter Performance Testing is Testing method performed using Apache JMeter to test the performance of a web application. JMeter for performance testing helps to test both static and dynamic resources, helps to discover concurrent users on website and provides variety of graphical analysis for performance testing.

Is JMeter the best performance testing tool?

JMeter is a highly capable tool that can handle load and performance testing for different products, irrespective of the server or protocol. Be it HTTP or HTTPS web services, database, FTP, LDAP, MOM (Message-oriented Middleware) through NoSQL (MongoDB) and JMS.


1 Answers

Read about SLA

I recommend you to determine your requirements of web-site performance. But by default you can use "standard" response time limit about 10sec. Next, find user activity profile during day, week, month. Then you could choose base values of load for each profile. Find most frequent and most "heavy" user actions. Create test scenario with this actions (remember about percent ratio of actions, don't use all actions with one frequency). Limit load by throughput timer (set needed value of hits per minute). Number of threads in thread group select experimentally (for http load not needed many of them). Add plugins for jmeter from google-code. Use graphs "number of threads in second", "response time" and standard listener "summary report". Don't use standard graphs with high load, it's too slow. You can also save data to file from each listener (I strongly recommend this, and select csv format). Graphs show average points, so if you want precision pictures then build graphs manually in excel or calc. Grab performance metrics from server (CPU, memory, i/o, DB, net interface). Set ramp up period about 20-60 minutes and test about 1-2 hours. If all right, then test with 200% load profile or more to find the best performance. Also set test about 1-2 days. So you'll see server stability.

like image 78
Zernike Avatar answered Oct 29 '22 17:10

Zernike