Latency

Source: Wikipedia: Latency


Latency (engineering)

From Wikipedia, the free encyclopedia
Jump to: navigation, search

Latency is a measure of time delay experienced in a system, the precise definition of which depends on the system and the time being measured.
Contents
[hide]

* 1 Communication latency
o 1.1 Packet-switched networks
o 1.2 Satellite transmission
* 2 Operational latency
o 2.1 Consumer view
o 2.2 Producer view
* 3 Mechanical latency
* 4 Computer hardware and operating system latency
* 5 Latency in simulators and simulation
* 6 See also
* 7 References

[edit] Communication latency
[edit] Packet-switched networks
Main article: Lag

Latency in a packet-switched network is measured either one-way (the time from the source sending a packet to the destination receiving it), or round-trip (the one-way latency from source to destination plus the one-way latency from the destination back to the source). Round-trip latency is more often quoted, because it can be measured from a single point. Note that round trip latency excludes the amount of time that a destination system spends processing the packet. Many software platforms provide a service called ping that can be used to measure round-trip latency. Ping performs no packet processing; it merely sends a response back when it receives a packet (i.e. performs a no-op), thus it is a relatively accurate way of measuring latency.

Where precision is important, one-way latency for a link can be more strictly defined as the time from the start of packet transmission to the start of packet reception. The time from the start of packet transmission to the end of packet transmission at the near end is measured separately and called serialization delay. This definition of latency depends on the throughput of the link and the size of the packet, and is the time required by the system to signal the full packet to the wire.

However, in a non-trivial network, a typical packet will be forwarded over many links via many gateways, each of which will not begin to forward the packet until it has been completely received. In such a network, the minimal latency is the sum of the minimum latency of each link, plus the transmission delay of each link except the final one, plus the forwarding latency of each gateway. In practice, this minimal latency is further augmented by queuing and processing delays. Queuing delay occurs when a gateway receives multiple packets from different sources heading towards the same destination. Since typically only one packet can be transmitted at a time, some of the packets must queue for transmission, incurring additional delay. Processing delays are incurred while a gateway determines what to do with a newly received packet. The combination of propagation, serialization, queuing, and processing delays often produces a complex and variable network latency profile.

Latency is largely a function of the speed of light, which is 299,792,458 meter/second in scientifically controlled environment; which would equate to a latency of 4.8 microseconds for every kilometer. But when measuring latency of data we need to account for the fiber optic cable,though it seems pure, it is not a vacuum so refraction of light needs to be accounted for. For measuring latency in long haul networks the calculation is actually 4.9 microseconds for every kilometer. In shorter metro networks, the latency performance rises a bit more due to building risers and cross-connects and can bring the latency as high as 5 microseconds per kilometer. It follows that to calculate latency of a connection, one has to know the distance traveled by the fiber, which is rarely a straight line, since it has to traverse geographic contours and obstacles, such as roads and railway tracks, as well as other rights-of-way. Due to imperfections in the fiber, light degrades as it is transmitted through it. For distances of greater than 100 kilometers, either amplifiers or regenerators need to be deployed. Accepted wisdom has it that amplifiers add less latency than regenerators, though in both cases it can be highly variable, and so needs to be taken into account. In particular, legacy spans are more likely to make use of higher latency regenerators.
[edit] Satellite transmission

Although intercontinental television signals travel at the speed of light, they nevertheless develop a noticeable latency over long distances. This is best illustrated when a newsreader in a studio talks to a reporter half way around the world. The signal travels from the newsreader via communication satellite situated in geosynchronous orbit to the reporter and then goes all the way back to geosynchronous orbit and then to the studio, resulting in a journey of over one hundred thousand kilometers . This time lag is easily noticeable. Even though the signal travels at the speed of light, it still requires about half a second to travel that distance (not including the much smaller latencies inside the communications equipment).

Low-Earth orbit is sometimes used to ameliorate this delay, but at the expense of more complicated satellite tracking on the ground, and the expense of requiring more satellites in the satellite constellation to ensure continuous coverage.
[edit] Operational latency

Any individual workflow within a system of workflows can be subject to some type of operational latency. It may even be the case that an individual system may have more than one type of latency, depending on the type of participant or goal-seeking behavior. This is best illustrated by the following two examples involving air travel.
[edit] Consumer view

From the point of view of a passenger, latency can be described as follows. Suppose John Doe flies from London to New York. The latency of his trip is the time it takes him to go from his house in England to the hotel he is staying at in New York. This is independent of the throughput of the London-New York air link – whether there were 100 passengers a day making the trip or 10000, the latency of the trip would remain the same.
[edit] Producer view

From the point of view of flight operations personnel, latency can be entirely different. Consider the staff at the London and New York airports. There are only a limited number of planes able to make the transatlantic journey, so when one lands they must prepare it for the return trip as quickly as possible. It might take, for example:

* 30 minutes to clean a plane
* 15 minutes to refuel a plane
* 10 minutes to load the passengers
* 35 minutes to load the cargo

Assuming the above are done one after another, minimum plane turnaround time is:

30+15+10+35 = 90

However, cleaning, refueling, loading passengers and loading the cargo can be done at the same time, reducing the latency to:

30
15
10
35
Minimum latency = 35

And if loading the passengers must happen after cleaning, but can happen during cargo loading:

30+10 = 40
15
35
Minimum latency = 40

All of the people involved in the turnaround are only interested in the time it takes for their respective task, not the whole. However when different tasks are done at the same time it might be possible to reduce the latency to the longest task.

However, the more prerequisites every step has, the harder it is to perform the steps in parallel. In the above example, if cleaning a plane took 35 minutes, then the minimum latency would be 35 (cleaning) + 10 (passenger loading) = 45, which is longer than the time of any single task.
[edit] Mechanical latency

Any mechanical process encounters limitations modeled by Newtonian physics. The behaviour of disk drives provides an example of mechanical latency. Here, it is the time needed for the data encoded on a platter to rotate from its current position to a position adjacent to the read-write head. This is also known as rotational delay since the term latency is also applied to the time required by a computer's electronics and software to perform polling, interrupts, and direct memory access.
[edit] Computer hardware and operating system latency
Further information: Access time

Computers run on a set of instructions called an executable. On operating systems, the execution of the executable can be postponed if other executables (a.k.a. processes) are also executing. In addition, the operating system can schedule when to perform the action that the executable is commanding. For example, suppose a process commands that a computer card's voltage output be set high-low-high-low..etc at a rate of 1000 Hz. The operating system may choose to adjust the scheduling of each transition (high-low or low-high) based on an internal clock. The latency is the delay between the executable instruction commanding the transition and the hardware actually transitioning the voltage from high to low or low to high.

On Microsoft Windows, it appears that the timing of commands to hardware is not exact. Empirical data suggest that Windows (using the Windows sleep timer which accepts millisecond sleep times) will schedule on a 1024 Hz clock and will delay 24 of 1024 transitions per second to make an average of 1000 Hz for the update rate.[citation needed] This can have serious ramifications for discrete-time algorithms that rely on fairly consistent timing between updates such as those found in control theory. It should be noted that the sleep function or similar windows API were at no point designed for accurate timing purposes. Certain multimedia-oriented API routines like timeGetTime() and its siblings provide better timing consistency. However, consumer and server grade Windows (currently those based on NT kernel) were not to be real-time operating systems. Drastically more accurate timings could be achieved by using dedicated hardware extensions and control-loop cards.

Linux may have the same problems with scheduling of hardware I/O.[citation needed] The problem in Linux is mitigated by the fact that the operating system kernel's process scheduler can be replaced by a real-time scheduler.

On embedded systems, the real-time execution of instructions is expected from the low-level embedded operating system.
[edit] Latency in simulators and simulation

In simulation applications, 'latency' refers to the time delay, normally measured in milliseconds (1/1,000 sec), between initial input and an output clearly discernible to the simulator trainee or simulator subject. Latency is sometimes also called transport delay.

* Some authorities distinguish between latency and transport delay by using the term 'latency' in the sense of the extra time delay of a system over and above the reaction time of the vehicle being simulated, but this requires a detailed knowledge of the vehicle dynamics and can be controversial.

* Importance of Motion and Visual Latencies. In simulators with both visual and motion systems, it is particularly important that the latency of the motion system not be greater than of the visual system, or symptoms of simulator sickness may result. This is because in the real world, motion cues are those of acceleration and are quickly transmitted to the brain, typically in less than 50 milliseconds; this is followed some milliseconds later by a perception of change in the visual scene. The visual scene change is essentially one of change of perspective and/or displacement of objects such as the horizon, which takes some time to build up to discernible amounts after the initial acceleration which caused the displacement. A simulator should therefore reflect the real-world situation by ensuring that the motion latency is equal to or less than that of the visual system and not the other way round

[edit] See also

* Memory latency
* Response time
* Throughput
* Comparison of latency and bandwidth
* Lead time
* Interrupt latency

[edit] References
Text document with red question mark.svg
This article includes a list of references, related reading or external links, but its sources remain unclear because it lacks inline citations. Please improve this article by introducing more precise citations where appropriate. (June 2009)

* M. Brian Blake, "Coordinating Multiple Agents for Workflow-Oriented Process Orchestration", Information Systems and e-Business Management Journal, Springer-Verlag, December 2003.

Retrieved from "http://en.wikipedia.org/wiki/Latency_(engineering)"
Categories: Engineering concepts
Hidden categories: All articles with unsourced statements | Articles with unsourced statements from April 2008 | Articles with unsourced statements from July 2009 | Articles lacking in-text citations from June 2009 | All articles lacking in-text citations
Personal tools

* New features
* Log in / create account

Namespaces

* Article
* Discussion

Variants

Views

* Read
* Edit
* View history

Actions

Search
Search
Navigation

* Main page
* Contents
* Featured content
* Current events
* Random article

Interaction

* About Wikipedia
* Community portal
* Recent changes
* Contact Wikipedia
* Donate to Wikipedia
* Help

Toolbox

* What links here
* Related changes
* Upload file
* Special pages
* Permanent link
* Cite this page

Print/export

* Create a book
* Download as PDF
* Printable version

Languages

* Català
* Česky
* Dansk
* Español
* Italiano
* עברית
* 日本語
* Português
* Simple English
* Српски / Srpski
* Suomi
* Svenska

* This page was last modified on 29 June 2010 at 00:39.
* Text is available under the Creative Commons Attribution-ShareAlike License; additional terms may apply. See Terms of Use for details.
Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.
* Contact us

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License