ArticleslgStudy

computer science

Lag (computing)

Lag (computing) is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Lag (computing) rather than just read about it. In short: In computing, lag is a design and performance characteristic of a telecommunications network. It specifies the latency for a bit of data to travel across the network from one communication endpoint to another.

Lag (computing) — main illustration
Lag (computing) — illustration

Key takeaways

  • Lag (computing) belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Lag (computing) to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Lag (computing) from memory before moving on to harder problems.

Reference excerpt

In computing, lag is a design and performance characteristic of a telecommunications network. It specifies the latency for a bit of data to travel across the network from one communication endpoint to another. It is typically measured in multiples or fractions of a second. Delay may differ slightly, depending on the location of the specific pair of communicating endpoints. Engineers usually report both the maximum and average delay, and they divide the delay into several parts:

Processing delay – time it takes a router to process the packet header Queuing delay – time the packet spends in routing queues Transmission delay – time it takes to push the packet's bits onto the link Propagation delay – time for a signal to propagate through the media The player's ability to tolerate lag depends on the type of game being played. For instance, a strategy game or a turn-based game with a slow pace may have a high threshold or even be mostly unaffected by high lag. A game with twitch gameplay such as a first-person shooter or a fighting game with a considerably faster pace may require a significantly lower lag to provide satisfying gameplay. Lag is mostly measured in milliseconds (ms) and may be displayed in-game (sometimes called a lagometer). The most common causes of lag are expressed as ping time (or simply ping) and the frame rate (fps). Generally a lag below 100 ms (10 hz or fps) is considered to be necessary for playability. The lowest ping physically possible for a connection between opposite points on Earth crossing half of the planet is 133 ms. Other causes of lag result commonly in a lag below a playable 20 ms (50 Hz or fps), or in the loss, corruption or jitter of the game. A certain minimum level of delay is experienced by signals due to the time it takes to transmit a packet serially through a link. This delay is extended by more variable levels of delay due to network congestion. IP network delays can range from a few milliseconds to several hundred milliseconds. For example, the hop count between two communication endpoints (such as server and client), may affect network delay.

Causes

While a single-player game maintains the main game state on the local machine, an online game requires it to be maintained on a central server in order to avoid inconsistencies between individual clients. As such, the client has no direct control over the central game state and may only send change requests to the server, and can only update the local game state by receiving updates from the server. This need to communicate causes a delay between the clients and the server, and is the fundamental cause behind lag. While there may be numerous underlying reasons for why a player experiences lag, most common reasons are poor connection between the client and server, or insufficient processing in either the client or the server.

Connection Perhaps the most common type of lag is caused by network performance problems. Losses, corruption or jitter (an outdated packet is in effect a loss) may all cause problems, but these problems are relatively rare in a network with sufficient bandwidth and no or little congestion. Instead, the latency involved in transmitting data between clients and server plays a significant role. Latency varies depending on a number of factors, such as the physical distance between the end-systems, as a longer distance means additional transmission length and routing required and therefore higher latency. Routing over the Internet may be extremely indirect, resulting in far more transmission length (and consequent latency) than a direct route, although the cloud gaming service OnLive has developed a solution to this issue by establishing peering relationships with multiple Tier 1 network Internet Service Providers and choosing an optimal route between server and user.

Ping time Ping time, or simply ping, is the main measure of connection lag. Ping time is the network delay for a round trip between a player's client and the game server as measured with the ping utility or equivalent. Ping time is an average time measured in milliseconds (ms). The lower one's ping is, the lower the latency is and the less lag the player will experience. High ping and low ping are commonly used terms in online gaming, where high ping refers to a ping that causes a severe amount of lag; while any level of ping may cause lag, severe lag is usually indicated by a ping of over 100 ms. This usage is a gaming cultural colloquialism and is not commonly found or used in professional computer networking circles. Some factors that might particularly affect ping include: communication protocol used, Internet throughput (connection speed), the quality of a user's Internet service provider and the configuration of firewalls. Ping is also affected by geographical location. For instance, if someone is in India, playing on a server located in the United States, the distance between the two is greater than it would be for players located within the US, and therefore it takes longer for data to be transmitted, resulting at 20,000 km (halfway around the Earth) in a ping of 133 ms. However, the amount of packet-switching and network hardware in between the two computers is often more significant. For instance, wireless network interface cards must modulate digital signals into radio signals, which is often more costly than the time it takes an electrical signal to traverse a typical span of cable. As such, lower ping can result in faster Internet download and upload rates.

Interface

Input-lag Input-lag or input latency is the lag produced by the input device, such as a mouse, keyboard or other controller, and its connection. Wireless devices are particularly affected by this kind of lag. Some people claim to notice extra lag when using a wireless controller, while other people claim that the 4–8 milliseconds of lag is negligible. The refresh rate is a type or part of input-lag that is the rate of a display to produce distinct picture, measured in Hz (e.g. 60, 240 or 360, that is 16.7, 4.2 or 2.7 ms respectively).

Display lag

… excerpt ends here. Continue reading the full article.

Illustrations

Lag (computing): A simplified game architecture
A simplified game architecture

Worked examples

Example 1 — a first encounter with Lag (computing)

Start with the simplest possible case. Write down what Lag (computing) claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Lag (computing) before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Lag (computing) ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Lag (computing)

In research
Lag (computing) appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Lag (computing) in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Lag (computing) is common in secondary-school and first-year university syllabi. It links to neighbouring topics Multiplayer video games, Online games, Video game terminology, so understanding it makes those chapters shorter.
In everyday life
Look for Lag (computing) outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Lag (computing)” →

How to study Lag (computing) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Lag (computing) means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Lag (computing) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Lag (computing) in simple terms?

In computing, lag is a design and performance characteristic of a telecommunications network. It specifies the latency for a bit of data to travel across the network from one communication endpoint to another.

Why does Lag (computing) matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Lag (computing)?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Lag (computing).

Tags

  • Multiplayer video games
  • Online games
  • Video game terminology

Keep exploring