Delays in a computer network refer to the time it takes for a data packet to travel from the sender to the receiver. This delay is caused by several factors at different stages of data transmission and is commonly called network latency.
Main Types of Delays in Computer Networks:
1. Transmission Delay
It is the amount of time needed to send all the bits of a data packet from the sender onto the communication medium. It starts when the first bit is sent and ends when the last bit is transmitted onto the link. This delay depends on how fast the link can transmit data, not on how far the data travels.
Example: If a link has a bandwidth of 1 bps, it can transmit 1 bit per second.
To transmit a packet of 20 bits, it will take 20 seconds, because only one bit is sent each second.
If:
- L = packet size (in bits)
- B = bandwidth (in bits per second)
Transmission Delay (Tt) = L / B
This delay depends upon the following factors:
- If there are multiple active sessions, the delay will become significant.
- Increasing bandwidth decreases transmission delay.
- MAC protocol largely influences the delay if the link is shared among multiple devices.
- Sending and receiving a packet involves a context switch in the operating system, which takes a finite time.
2. Propagation Delay
It is the time taken by a data signal to travel through the transmission medium from the sender to the receiver after it has been transmitted. It starts when the first bit enters the medium and ends when that bit reaches the destination. This delay depends on the distance between the devices and the speed of signal propagation in the medium, not on the packet size or bandwidth.
Example: If a signal travels at a speed of 2 × 10⁸ m/s and the distance between sender and receiver is 200 km, then the propagation delay is 0.001 seconds (1 ms).
If:
- D = distance between sender and receiver (in meters)
- S = propagation speed of the signal (in meters per second)
Propagation Delay (Tp) = D / S
This delay depends upon the following factors:
- Distance: Greater distance increases propagation delay.
- Transmission Medium: Different media (fiber, copper, wireless) have different propagation speeds.
- Signal Speed: Higher propagation speed reduces delay.
- Physical Path: Longer or indirect paths increase propagation delay.
3. Queueing Delay
Queueing delay is the time a packet spends waiting in a queue (buffer) before it can be processed or transmitted. When a packet reaches a router or destination, it is not processed immediately if other packets are already waiting. The waiting time in the buffer is called queueing delay.
In practical networks, queueing delay varies based on traffic conditions. However, it can be mathematically modeled using queueing theory, such as the M/M/1 model.
This delay depends upon the following factors:
- Queue Size: Larger queues can cause longer waiting times, while an empty queue results in little or no delay.
- Arrival Rate of Packets: If many packets arrive within a short time, queueing delay increases.
- Number of Servers/Links: Fewer processing servers or output links lead to higher queueing delay.
4. Processing Delay
Processing delay is the time taken by a network device (such as a router or switch) to process a received packet. This includes examining the packet header, checking for errors, updating fields like TTL, and determining the next forwarding path.
There is no fixed formula for processing delay because it depends on the speed and efficiency of the processor, which varies across devices.
This delay depends upon the following factors:
- Processor Speed: Faster processors result in lower processing delay.
- Packet Processing Complexity: More complex processing increases delay.
Total Delay
Total delay is the overall time taken by a data packet to travel from the sender to the receiver in a computer network. It is the sum of all delays experienced by the packet at different stages during transmission.
Ttotal = Tt + Tp + Tq + Tpro
Where:
- Tt = Transmission Delay
- Tp = Propagation Delay
- Tq = Queueing Delay
- Tpro = Processing Delay
If queueing and processing delays are negligible, then:
Ttotal = Tt + Tp