user3920295
user3920295

Reputation: 909

How close is Jmeter average response time to real world average response time for a page

I am running a simple Jmeter test with 10 users and ramp up time of 30 seconds - which means 1 user on a page every 3 seconds. I get an average response time of ~8 seconds per page whereas in real time, how much ever I try, the page loads within 2 seconds. I don't how I should use Jmeter results for measurement. Any help here highly appreciated.

Upvotes: 1

Views: 447

Answers (1)

Dmitri T
Dmitri T

Reputation: 168082

Given correct JMeter configuration results are pretty much close to the real user experience.

In order to make your test more realistic consider the following:

  1. Add HTTP Cookie Manager to enable cookies support and deal with cookie-based authentication
  2. Add HTTP Header Manager - it might be the case when server is capable of sending compressed data and i.e. browser sends the relevant header, and JMeter doesn't resulting in more data to transfer -> longer response time
  3. Real browsers download embedded resources like scripts, styles and images. But real browsers do it only once, on subsequent requests resources are being returned from cache. JMeter re-downloads the resources each time. In order to simulate browser's behavior you need to add HTTP Cache Manager
  4. "10 users and 30 seconds ramp-up" doesn't necessarily mean "1 user each 3 seconds". In order to ensure that JMeter produces desired hits/s rate add Constant Throughput Timer to your test plan and set desired throughput there.

Upvotes: 2

Related Questions