Web stress and stress testing with jmeter. How good benchmark?

I am going to set up a load test test using jmeter. However, I cannot find on the net what a good mark is. How good is good?

My site averages around 80,000 per day.

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

The average low traffic is about 1 request / sec. The average average traffic is 30 requests / sec. Medium High traffic 60 requests / sec

I have developed the following plans for testing 8 pages and is ideal for average response time when loading a single page:

  • 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 a medium traffic scenario - 10 requests / second test

  • Simulated users: 10 threads
  • Time period: 1 sec.
  • Duration: 30 minutes

Simulate a medium traffic scenario - 30 requests / second test

  • Simulated users: 30 threads
  • Time period: 1 sec.
  • Duration: 30 minutes

Simulate a super-high traffic scenario - 100 requests / second test

  • Simulated users: 100 threads
  • Time period: 1 sec.
  • Duration: 30 minutes

Simulate an attack scenario - 350 queries / sec (based on maximum MYSQL 500 connection)

  • Simulated users: 100 threads
  • Time period: 1 sec.
  • Duration: 10 minutes

During the execution of this test, I plan to track the following:

  • Average load: (web server)
  • Average CPU Usage: (Database Server)
  • RAM Average load:
  • RAM Average load: (DB Server)
  • Average response time:

To find out how much this is related to its memory and processor, and if there is a need to increase the amount of RAM, CPU, etc. I also limited the connection of MySQL Max to 500 .

In all tests, I expect the response time to be ideally below the 10 second benchmark.

How does this sound? I do not have an SLA to follow, it is only based on a study of current web traffic and comes out with a plan. The thing is, I don’t know what the server threshold is. I believe that the hardware below should exceed what is needed to host our pages.

The web server works: 8 GB RAM, 4 cores (1 server, another backup server without load) MySQL server works: 4 GB of RAM, 2 cores.

We plan to move to the cloud, so ideally you need to find out which instance is best for our scenario with this load test.

Would really appreciate some good advice here.

+4
source share
1 answer

Read about SLA

I recommend that you determine your website performance requirements. But by default, you can use a “standard” response time period of about 10 seconds. Then find the user’s activity profile for the day, week, month. Then you can select the base load values ​​for each profile. Find the most frequent and most "heavy" user actions. Create a test scenario with these actions (remember the percentage of actions, do not use all actions with the same frequency). Limit the load with a bandwidth timer (set the required number of calls per minute). The number of threads in the thread group is selected experimentally (many of them are not required to download HTTP). Add plugins for jmeter from google code. Use the graphs "number of threads in the second", "response time" and the standard "final report" of the listener. Do not use standard graphics with high load, it is too slow. You can also save data to a file with each listener (I highly recommend this and choose the csv format). The graphs show average scores, so if you need accurate images, then create the graphs manually in excel or calc. Capturing performance indicators from the server (processor, memory, I / O, DB, network interface). Set the rise period to about 20-60 minutes and check about 1-2 hours. If everything is in order, check with a load profile of 200% or more to find the best performance. Also install the test for about 1-2 days. Thus, you will see the stability of the server.

+5
source

Source: https://habr.com/ru/post/1382648/


All Articles