33

I was running a test on my HTTP server and the transfer speed went really slow when I switched the server from localhost(used a laptop) to a AWS EC2 t.micro server.

I want to know the difference between latency and load time(or sample time) when testing with JMeter. Load time is in "View results tree", and sample time is in "View results in table".

Here's my question.

  1. When sending a zip file that's about 3.5mb, it takes about 0.5 seconds when tested in localhost. However, when I was testing it on EC2 server, it takes about 6~8 seconds. I know that 3.5mb is quite big, but isn't 8 second too slow?

  2. During my tests, JMeter shows that the latency is about 0.5~1 second when the load time is 6~8 second. What is the difference between those two?

Jee Seok Yoon
  • 4,716
  • 9
  • 32
  • 47

3 Answers3

86

Latency is a difference between time when request was sent and time when response has started to be received.

Response time (= Sample time = Load time = Elapsed time) is a difference between time when request was sent and time when response has been fully received.

So Response time always >= latency.

The larger file is, the larger difference between response time and latency will be.

Andrei Botalov
  • 20,686
  • 11
  • 89
  • 123
  • Is it normal that it takes about 6 seconds to transfer 3.5mb file? – Jee Seok Yoon Aug 30 '13 at 01:26
  • 2
    @JeeSeokYoon Try it in browser. If it takes 6 seconds, then it's not an issue of JMeter – Andrei Botalov Aug 30 '13 at 07:29
  • So Is it ok to say latency = Server Processing Time because this is the time just before sending the request and fetching the first response PLUS the time for connection. So Server Processing Time = Latency - Connect time. – Ankit Bansal Dec 18 '15 at 07:04
  • @AnkitBansal From what I can gather, the answer is yes if you are reffering "Connect time" to as difference between when the server starts sending first response to when the client starts recieveing it. – Jee Seok Yoon Jun 12 '16 at 09:08
12

Latency = 922 ms means that it takes 922 ms as the first response of the request from when the request has been made.

Sample Time(or Response Time) = 1232 ms means that it takes 1232 ms to process the request from when it has been made.

Therefore, Response Time = Latency + Processing Time

Md. Masudur Rahman
  • 1,028
  • 12
  • 30
  • 1
    Note that the Processing time can even be related to network traffic and not neccessary to actual time to process the request and send the response. – Shai Alon Jul 11 '16 at 13:46
0

Fast forward 8 years later and a 3.5 MB file is quite small.

Latency is the time between when a request was sent and when the first byte of response was received.

Loading time is the time between when a request was sent and when all byte responses (full response) were received.

Joker
  • 119
  • 6