It's not clear what he's trying to measure and 'latency' means a lot of
things...
Latency for a network device typically means the delay that network
introduces. Say you bounce a signal off a simple mirror (zero processing)
on the moon. If you were looking (via an oscilloscope, say) at the voltage
peak that represents the 1st bit of the signal coming and going, there is
latency due to the speed of light. If the remote end does any kind of
processing to regenerate the signal, there's further delays introduced that
way.
The problem with a point to point link (network) is that you can't put that
imaginary oscilloscope in place to measure the signal at both ends.
People frequently use 'network latency' to mean the network component of the
time it takes to process an application request.
A problem with this is the time synchronization of the hosts. Even if you
use ntp, there's still some difference/lag and drift over time, so you can't
just subtract the time the packet was seen on B (using B's clock) from the
time it was sent by A (using A's clock).
Instead, people often use an application request (ping, echo, whatever) to
approximate the mirror bouncing the signal back and divide the measured time
by 2. This uses only one clock (so synchronization and drift aren't
issues). But, it assumes symmetric delays (which is frequently a bad
assumption), and also that the remote processing is truly trivial.
Sometimes people compensate for that by subtracting out the time a similar
local request takes. But since the ping 127.0.0.1 or whatever doesn't go
through the network card, it's still only an approximation - especially if
the request involves the creation and tear-down of a network connection.
This isn't WRONG, it's just making assumptions - such as that ping has
near-zero processing, and that an ICMP packet is routed the same as other
kinds of packets. etc.
ntop's measurement is DIFFERENT. Not WRONG, just DIFFERENT, and you need to
understand what is being measured. The reported value is a static
measurement of the time it took to setup the tcp connection, based on the
3-way tcp/ip handshake. Since you can't depend upon the endpoints to be
synchronized closely enough for their timestamps to give you the resolution
you need... ntop uses the time IT sees the packets as an approximation -
something like this:
Site A --------- SYN -------|--------------------------> Site B
<--------------------|-------------ACK+SYN-------
--------- ACK -------|-------------------------->
|
(hub)
|
ntop
So if ntop sees the SYN at 20031010-11:00:00.000000 and the SYN-ACK at
20031010-11:00:00.000030 and the SYN at 20031010-11:00:00.000061, ntop calls
the 'latency' 0.000061 (ACK - SYN)
If the network delays are consistent from packet to packet over time, then
this is a pretty good approximation of the time that A would see for B's
latency (how long it takes a message to get to B, B's processing time and
then the time it takes for the reply to be received). But beware of the key
assumptions in here:
* If you use ntop's latency as more than a measure of what it was at a
point in (past) time, you're ignoring the chaotic nature of network traffic.
* We're also assuming that the setup processing on B is minimal vs. the
time it takes over an existing connection.
* Other items of network topology - such as a load distribution
appliance, firewall, etc. can all affect 'latency'.
* That the path a packet takes to reach the ntop host really is a subset
of the path the packet takes to reach site b. If your network looks like
this, that's a bad assumption:
(switch)
(switch)-------/ \------(switch)
| |(span) |
A ntop B
While in this configuration ntop will see all of relevant traffic, there's
no assurance how the switch is going to prioritize traffic out the spanned
port, especially as network traffic levels increase.
-----Burton
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of
Paulick, Jim
Sent: Friday, October 10, 2003 10:56 AM
To: '[EMAIL PROTECTED]'
Subject: RE: [Ntop] measuring latency
the quickest and best way would be
ping for an entire day and pull in the results and do an excel graph.
you're better off trying different sized packets for ping though...
-----Original Message-----
From: Luca Deri [mailto:[EMAIL PROTECTED]
Sent: Friday, October 10, 2003 11:00 AM
To: [EMAIL PROTECTED]
Subject: Re: [Ntop] measuring latency
[EMAIL PROTECTED] wrote:
>I did find a latency column on the 'Active TCP Sessions' section of the
'Info about host X.X.X.X' - but don't really understand what this is
showing, and at what point in time.
>
It shows the network latency measures using the 3-way handshake of TCP
>
>All I am trying to achieve is a graph or table of latency between the
server (where ntop is running) and a remote host. Is this achievable with
ntop, or do I need some other tool...?
>
All ntop does is to show it on a web page. You can change the code and
what you like (e.g. save it on a file).
Enjoy, Luca
>
>Gareth
>
>
>"Burton M. Strauss III" <[EMAIL PROTECTED]> wrote ..
>
>
>>There are latency measurements in the ntop tcp session information - but
>>you
>>would have to do some research to figure out precisely what's being
>>reported.
>>
>>
>
>
>
>>>Is it possible to measure network latency using intop?
>>>
>>>
--
Luca Deri <[EMAIL PROTECTED]> http://luca.ntop.org/
Hacker: someone who loves to program and enjoys being
clever about it - Richard Stallman
_______________________________________________
Ntop mailing list
[EMAIL PROTECTED]
http://listgateway.unipi.it/mailman/listinfo/ntop
_______________________________________________
Ntop mailing list
[EMAIL PROTECTED]
http://listgateway.unipi.it/mailman/listinfo/ntop
_______________________________________________
Ntop mailing list
[EMAIL PROTECTED]
http://listgateway.unipi.it/mailman/listinfo/ntop