All Topics  
Latency (engineering)

 

   Email Print
   Bookmark   Link






 

Latency (engineering)



 
 
Latency is a time delay between the moment something is initiated, and the moment one of its effects begins or becomes detectable. The word derives from the fact that during the period of latency the effects of an action are latent, meaning "potential" or "not yet observed". Even within an engineering context, latency has several meanings depending on the engineering area concerned (i.e. communication, operational, simulation, mechanical, or biomedical fiber stimulation latencies).

Packet-switched networks 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
Round-trip delay time

In telecommunications, the term round-trip delay time or round-trip time has the following meanings:# The elapsed time for transit of a signal processing over a closed circuit, or time elapsed for a message to a remote place and back again....
 (the one-way latency from source to destination plus the one-way latency from the destination back to the source).






Discussion
Ask a question about 'Latency (engineering)'
Start a new discussion about 'Latency (engineering)'
Answer questions from other users
Full Discussion Forum



Encyclopedia


Latency is a time delay between the moment something is initiated, and the moment one of its effects begins or becomes detectable. The word derives from the fact that during the period of latency the effects of an action are latent, meaning "potential" or "not yet observed". Even within an engineering context, latency has several meanings depending on the engineering area concerned (i.e. communication, operational, simulation, mechanical, or biomedical fiber stimulation latencies).

Communication latency


Packet-switched networks

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
Round-trip delay time

In telecommunications, the term round-trip delay time or round-trip time has the following meanings:# The elapsed time for transit of a signal processing over a closed circuit, or time elapsed for a message to a remote place and back again....
 (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
Ping

Ping is a computer network tool used to test whether a particular Host is reachable across an Internet protocol suite network; it is also used to self test the network interface card of the computer, or as a speed test....
 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
NOP

In computer science NOP or NOOP is an assembly language instruction, sequence of programming language statements, or protocol command that effectively does nothing at all....
), 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 reception to the end of packet reception is measured separately and called "Serialization Delay". This definition of latency is independent of the link's throughput and the size of the packet, and is the absolute minimum delay possible with that link.

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
Queuing delay

In telecommunication and computer engineering, the queuing delay is the time a job waits in a Queue until it can be executed. It is a key component of network 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 delay
Processing delay

In a computer network based on packet switching, processing delay is the time it takes routers to process the packet header. Processing delay is a key component in network delay....
s 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.

Satellite transmission

Although intercontinental television
Television

Television is a widely used telecommunication mass-media for transmitting and receiving moving , either monochrome or color, usually accompanied by sound....
 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
Geosynchronous orbit

A geosynchronous orbit is an orbit around the Earth with an orbital period matching the Earth's sidereal day rotation period. This synchronization means that for an observer at a fixed location on Earth, a satellite in a geosynchronous orbit returns to exactly the same place in the sky at exactly the same time each day....
 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
Lag

In computing and especially computer networks, lag is a term used where the computer freezes and then continues some time later when an action is performed, for example clicking a mouse button....
 is easily noticeable. Even though the signal travels at the speed of light, it still requires about half a second to travel that distance
Geosynchronous orbit

A geosynchronous orbit is an orbit around the Earth with an orbital period matching the Earth's sidereal day rotation period. This synchronization means that for an observer at a fixed location on Earth, a satellite in a geosynchronous orbit returns to exactly the same place in the sky at exactly the same time each day....
 (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
Satellite constellation

A group of Electronics satellites working in concert is known as a satellite constellation. Such a constellation can be considered to be a number of satellites with coordinated ground coverage, operating together under shared control, synchronised so that they overlap well in coverage and complement rather than interfere with other satelli...
 to ensure continuous coverage.

Operational latency

Any individual workflow
Workflow

A workflow is a depiction of a sequence of operations, declared as work of a person, work of a simple or complex mechanism, work of a group of persons, work of an organization of staff, or machines....
 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
Air travel

Air travel is a form of travel using an airplane.The comfort experienced when traveling by air depends on several factors starting with the airport, the choice of the airline and the travel class....
.

Consumer view

From the point of view of a passenger, latency can be described as follows. Suppose John Doe flies from London
London

London is the capital of both England and the United Kingdom, and the most populous municipality in the European Union. An important settlement for two millennia, History of London goes back to its founding by the Roman Empire....
 to New York
New York

The State of New York is a U.S. state in the Mid-Atlantic States and Northeastern United States regions of the United States and is the nation's List of U.S....
. 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.

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
  • 40 minutes to load the cargo


Assuming the above are done one after another, minimum plane turnaround time is:
30+15+10+40 = 95


However, cleaning, refueling, and loading the cargo can be done at the same time, reducing the latency to:
40+10=50
30
15
Minimum latency = 50


And if loading the passengers must happen after cleaning, but can happen during cargo loading:
30+10 = 40
40
15
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, as in this case, 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.

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
Rotational delay

Rotational delay is one of the three delays associated with reading or writing data on a Disk storage, and somewhat similar for CD or DVD drives....
 since the term latency is also applied to the time required by a computer's electronics
Electronics

Electronics refers to the flow of charge through nonmetal electrical conductor , whereas electrical refers to the flow of charge through metal electrical conductor....
 and software to perform polling
Polling (computer science)

Polling, or polled operation, in computer science, refers to actively sampling the status of an external device by a client program as a synchronous activity....
, interrupt
Interrupt

In computing, an interrupt is an asynchronous communication signal from hardware indicating the need for attention or a synchronous event in software indicating the need for a change in execution....
s, and direct memory access
Direct memory access

Direct memory access is a feature of modern computers and microprocessors that allows certain hardware subsystems within the computer to access system Computer storage for reading and/or writing independently of the central processing unit....
.

Computer hardware and operating system latency

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 actual transitioning the voltage from high to low or low to high.

On Microsoft Windows
List of Microsoft operating systems

The following is a list of Microsoft operating systems. For the codenames that Microsoft gave their operating systems, see Microsoft codenames....
, 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. This can have serious ramifications for discrete-time algorithms that rely on fairly consistent timing between updates such as those found in control theory.

Linux
Linux

Linux is a generic term referring to Unix-like computer operating systems based on the Linux kernel. Their development is one of the most prominent examples of free and open source software collaboration; typically all the underlying source code can be used, freely modified, and redistributed by anyone under the terms of the GNU GPL license...
 may have the same problems with scheduling of hardware I/O. 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.

Latency in simulators and simulation
Simulation

Simulation is the imitation of some real thing, state of affairs, or process. The act of simulating something generally entails representing certain key characteristics or behaviors of a selected physical or abstract system....

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
    Vehicle dynamics

    Vehicle dynamics refers to the Dynamics of vehicles, here assumed to be ground vehicles.For two-wheeled vehicles see Bicycle and motorcycle 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


See also

  • Memory latency
  • Throughput
    Throughput

    In communication networks, such as Ethernet or packet radio, throughput is the average rate of successful message delivery over a communication channel....
  • Comparison of latency and bandwidth
  • Lead time
    Lead time

    A lead time is the period of time between the initiation of any process of production and the completion of that process. Thus the lead time for ordering a new car from a manufacturer may be anywhere from 2 weeks to 6 months....