Skip to content

Split View: [컴퓨터 네트워크] 03. 네트워크 지연, 손실, 처리량

|

[컴퓨터 네트워크] 03. 네트워크 지연, 손실, 처리량

본 포스팅은 James Kurose, Keith Ross의 Computer Networking: A Top-Down Approach (6th Edition) 교재를 기반으로 정리한 내용입니다.


1. 패킷 교환 네트워크에서의 지연 개요

패킷이 출발지에서 목적지까지 이동하면서 경로상의 각 노드(라우터)에서 여러 유형의 지연을 겪는다. 가장 중요한 지연은 노드 지연(nodal delay) 이며, 4가지 요소로 구성된다.

노드 지연(d_nodal) = d_proc + d_queue + d_trans + d_prop

  d_proc  : 처리 지연 (Processing Delay)
  d_queue : 큐잉 지연 (Queuing Delay)
  d_trans : 전송 지연 (Transmission Delay)
  d_prop  : 전파 지연 (Propagation Delay)

2. 4가지 지연 요소

2.1 처리 지연 (Processing Delay)

패킷 헤더를 검사하고 어디로 보낼지 결정하는 시간이다.

  • 패킷 헤더의 비트 오류 검사
  • 포워딩 테이블 조회
  • 일반적으로 마이크로초(us) 이하
패킷 도착 → [헤더 검사] → [포워딩 결정] → 큐에 진입
              처리 지연 (d_proc)

2.2 큐잉 지연 (Queuing Delay)

패킷이 출력 링크의 큐에서 전송을 기다리는 시간이다.

  • 큐에 대기 중인 다른 패킷의 수에 따라 결정
  • 마이크로초에서 밀리초 수준까지 변동
  • 4가지 지연 중 가장 복잡하고 예측하기 어려움
출력 큐:
  [pkt5][pkt4][pkt3][pkt2][pkt1] ──> 출력 링크
                                      (전송 중)
  ← 이 패킷들의 대기 시간 = 큐잉 지연 →

2.3 전송 지연 (Transmission Delay)

패킷의 모든 비트를 링크에 밀어넣는 데 걸리는 시간이다.

전송 지연 = L / R

  L: 패킷 길이 (bits)
  R: 링크 전송률 (bps)

예시: L = 10,000 bits, R = 10 Mbps

d_trans = 10,000 / 10,000,000 = 0.001초 = 1ms

전송 지연은 패킷 길이링크 전송률에 의존하며, 두 라우터 간 거리와는 무관하다.

2.4 전파 지연 (Propagation Delay)

비트가 링크를 통해 물리적으로 전파되는 시간이다.

전파 지연 = d / s

  d: 두 라우터 간 물리적 거리 (meters)
  s: 매체의 전파 속도 (약 2 * 10^8 m/s ~ 3 * 10^8 m/s)

예시: 두 라우터 간 거리 = 5,000 km, 전파 속도 = 2.5 x 10^8 m/s

d_prop = 5,000,000 / 250,000,000 = 0.02초 = 20ms

전파 지연은 거리에 의존하며, 패킷 크기와는 무관하다.

2.5 전송 지연 vs 전파 지연 비유

고속도로 톨게이트 비유:

차량 행렬 = 패킷의 비트들
톨게이트 = 라우터
고속도로 = 링크

전송 지연: 모든 차가 톨게이트를 통과하는 시간
           (차량 수 / 톨게이트 처리 속도)

전파 지연: 한 차가 톨게이트에서 다음 톨게이트까지 달리는 시간
           (거리 / 차량 속도)

3. 큐잉 지연과 패킷 손실

3.1 트래픽 강도 (Traffic Intensity)

큐잉 지연의 정도는 트래픽 강도로 판단할 수 있다.

트래픽 강도 = L * a / R

  L: 패킷 크기 (bits)
  a: 평균 패킷 도착률 (packets/sec)
  R: 링크 전송률 (bps)

트래픽 강도에 따른 큐잉 지연

큐잉 지연
  ^
  │          │
  │          │     /
  │          │    /
  │          │   /
  │          │  /
  │        __│_/
  │   ___/   │
  │__/       │
  └──────────┴──────> 트래픽 강도 (La/R)
  0          1

  La/R → 0 : 큐잉 지연 거의 없음
  La/R → 1 : 큐잉 지연 급격히 증가
  La/R > 1 : 큐가 무한히 증가 (시스템 불안정)

핵심 규칙

트래픽 강도큐잉 지연 상태
La/R 이 0에 가까움거의 없음
La/R 이 1에 가까움급격히 증가
La/R 이 1 초과무한히 증가 (실질적으로 패킷 손실)

시스템 설계의 황금률: 트래픽 강도가 1을 초과하지 않도록 설계해야 한다.

3.2 패킷 손실 (Packet Loss)

현실에서 큐(버퍼)의 크기는 유한하다.

버퍼가 가득 찬 상태에서 새 패킷 도착:

  [pkt_n][...][pkt2][pkt1] ──> 출력 링크
  ^^^^^^^^^^^^^^^^^^^^^^^^
  버퍼 용량 = n (가득 참)

  pkt_new 도착 → 드롭! (패킷 손실)
  • 손실된 패킷은 이전 노드나 출발지에서 재전송될 수 있음
  • 또는 아예 재전송되지 않을 수도 있음 (애플리케이션에 따라 다름)
  • 혼잡한 네트워크에서는 손실률이 크게 증가

4. 종단 간 지연 (End-to-End Delay)

출발지에서 목적지까지의 전체 지연을 계산해 보자.

N개의 링크를 거치는 경우 (혼잡 없다고 가정):

d_end-to-end = N * (d_proc + d_trans + d_prop)
             = N * (d_proc + L/R + d/s)

예시: 라우터 3개(링크 3개), d_proc = 0.003ms, L = 1,500 bytes, R = 2 Mbps, d = 5,000 km, s = 2.5 * 10^8 m/s

각 홉의 지연:
  d_proc  = 0.003 ms
  d_trans = (1500 * 8) / 2,000,000 = 6 ms
  d_prop  = 5,000,000 / 250,000,000 = 20 ms

한 홉 지연 = 0.003 + 6 + 20 = 26.003 ms
총 지연 = 3 * 26.003 = 78.009 ms

4.1 Traceroute

traceroute (Windows에서는 tracert) 명령으로 실제 종단 간 경로와 각 홉의 지연을 측정할 수 있다.

traceroute www.example.com
출력 예시:
  1  192.168.1.1     1.234 ms   1.123 ms   1.345 ms
  2  10.0.0.1        5.678 ms   5.432 ms   5.789 ms
  3  72.14.215.85   15.234 ms  14.987 ms  15.123 ms
  ...

각 행은 하나의 라우터(홉)를 나타내며, 3번의 RTT 측정값이 표시된다.

4.2 다른 종류의 종단 간 지연

의도적 지연

  • 미디어 패킷화 지연: VoIP에서 음성 데이터를 패킷으로 모으는 시간
  • 처리 지연: 이메일 서버에서 바이러스 검사 등

5. 처리량 (Throughput)

5.1 정의

처리량(throughput) 은 단위 시간당 출발지에서 목적지로 전달되는 비트 수다.

  • 순간 처리량(instantaneous throughput): 특정 시점의 전송률
  • 평균 처리량(average throughput): 전체 전송 시간 동안의 평균 전송률
F 비트 파일 전송에 T초 소요:

  평균 처리량 = F / T (bps)

종단 간 처리량은 경로상 가장 느린 링크에 의해 결정된다.

서버 ──Rs──> 라우터 ──Rc──> 클라이언트

  Rs = 서버 측 링크 전송률
  Rc = 클라이언트 측 링크 전송률

  처리량 = min(Rs, Rc)

예시 1: 서버 측이 병목

  서버 ──2 Mbps──> 라우터 ──10 Mbps──> 클라이언트

  처리량 = min(2, 10) = 2 Mbps
  병목 링크: 서버 측 링크

예시 2: 클라이언트 측이 병목

  서버 ──100 Mbps──> 라우터 ──1.5 Mbps──> 클라이언트

  처리량 = min(100, 1.5) = 1.5 Mbps
  병목 링크: 클라이언트 측 링크 (접속 네트워크)

5.3 다수 연결이 공유하는 링크

10개의 서버-클라이언트 쌍이 하나의 코어 링크(R)를 공유:

  서버1 ──Rs──┐                    ┌──Rc──> 클라이언트1
  서버2 ──Rs──┤                    ├──Rc──> 클라이언트2
  ...         ├── R (공유 링크) ───┤
  서버10──Rs──┘                    └──Rc──> 클라이언트10

각 연결의 처리량:

처리량 = min(Rs, Rc, R/10)

실제 인터넷에서는 코어 링크의 용량이 매우 크므로, 대부분의 경우 접속 네트워크가 병목이 된다.

일반적인 경우:
  코어 링크 >> 접속 네트워크 전송률

  → 처리량 = min(Rs, Rc)
  → 병목은 거의 항상 접속 네트워크 쪽

6. 지연과 처리량의 관계

지연(Delay)과 처리량(Throughput)은 독립적인 성능 지표:

  지연: 하나의 패킷이 도착하는 데 걸리는 시간
  처리량: 단위 시간당 전달되는 데이터의 양

  파이프 비유:
  ┌─────────────────────────────┐
  │  물(데이터)이 흐르는 파이프    │
  └─────────────────────────────┘
    ← 파이프 길이 = 지연 →
    파이프 단면적 = 처리량

7. 정리

지연 요소의존하는 변수크기
처리 지연라우터 성능us 이하
큐잉 지연트래픽 강도us ~ ms
전송 지연패킷 크기 / 링크 전송률us ~ ms
전파 지연링크 거리 / 전파 속도ms

핵심 공식:

d_nodal = d_proc + d_queue + d_trans + d_prop
트래픽 강도 = La/R (1 미만이어야 안정)
처리량 = min(경로상 모든 링크의 전송률)

8. 확인 문제

Q1. 전송 지연과 전파 지연의 차이를 설명하라.
  • 전송 지연: 패킷의 모든 비트를 링크에 밀어넣는 시간. L/R로 계산하며, 패킷 크기와 링크 전송률에 의존한다.
  • 전파 지연: 비트가 링크를 통해 물리적으로 이동하는 시간. d/s로 계산하며, 거리와 전파 속도에 의존한다.

톨게이트 비유: 전송 지연은 모든 차가 톨게이트를 통과하는 시간, 전파 지연은 한 차가 다음 톨게이트까지 달리는 시간이다.

Q2. 트래픽 강도가 1을 초과하면 어떻게 되는가?

패킷의 평균 도착률이 링크의 전송 능력을 초과하므로, 큐가 끝없이 증가한다. 실제로는 버퍼가 유한하므로 패킷 손실이 대량 발생한다. 따라서 트래픽 강도가 1을 초과하지 않도록 네트워크를 설계해야 한다.

Q3. 종단 간 처리량을 결정하는 요인은?

경로상 가장 느린 링크, 즉 병목 링크(bottleneck link) 가 종단 간 처리량을 결정한다. 실제 인터넷에서는 대부분 접속 네트워크(가정의 DSL, 케이블 등)가 병목이 된다.

[Computer Networking] 03. Network Delay, Loss, and Throughput

This post is based on the textbook Computer Networking: A Top-Down Approach (6th Edition) by James Kurose and Keith Ross.


1. Overview of Delay in Packet-Switched Networks

As a packet travels from source to destination, it experiences several types of delay at each node (router) along the path. The most important is nodal delay, which consists of four components.

Nodal delay (d_nodal) = d_proc + d_queue + d_trans + d_prop

  d_proc  : Processing Delay
  d_queue : Queuing Delay
  d_trans : Transmission Delay
  d_prop  : Propagation Delay

2. The Four Delay Components

2.1 Processing Delay

The time required to examine the packet header and determine where to direct the packet.

  • Bit-level error checking of the packet header
  • Forwarding table lookup
  • Typically on the order of microseconds (us) or less
Packet arrives -> [Header check] -> [Forwarding decision] -> Enter queue
                   Processing delay (d_proc)

2.2 Queuing Delay

The time a packet waits in the output link's queue before transmission.

  • Depends on the number of other packets waiting in the queue
  • Ranges from microseconds to milliseconds
  • The most complex and unpredictable of the four delays
Output queue:
  [pkt5][pkt4][pkt3][pkt2][pkt1] --> Output link
                                      (transmitting)
  <-- Wait time for these packets = queuing delay -->

2.3 Transmission Delay

The time required to push all of a packet's bits onto the link.

Transmission delay = L / R

  L: Packet length (bits)
  R: Link transmission rate (bps)

Example: L = 10,000 bits, R = 10 Mbps

d_trans = 10,000 / 10,000,000 = 0.001 seconds = 1ms

Transmission delay depends on packet length and link transmission rate, and is independent of the distance between routers.

2.4 Propagation Delay

The time it takes for a bit to physically propagate through the link.

Propagation delay = d / s

  d: Physical distance between two routers (meters)
  s: Propagation speed of the medium (approx. 2 * 10^8 m/s to 3 * 10^8 m/s)

Example: Distance between routers = 5,000 km, propagation speed = 2.5 x 10^8 m/s

d_prop = 5,000,000 / 250,000,000 = 0.02 seconds = 20ms

Propagation delay depends on distance and is independent of packet size.

2.5 Transmission Delay vs Propagation Delay Analogy

Highway tollbooth analogy:

Car caravan = bits in a packet
Tollbooth = router
Highway = link

Transmission delay: Time for all cars to pass through the tollbooth
                    (number of cars / tollbooth processing speed)

Propagation delay: Time for one car to travel from one tollbooth to the next
                   (distance / car speed)

3. Queuing Delay and Packet Loss

3.1 Traffic Intensity

The extent of queuing delay can be assessed using traffic intensity.

Traffic intensity = L * a / R

  L: Packet size (bits)
  a: Average packet arrival rate (packets/sec)
  R: Link transmission rate (bps)

Queuing Delay vs Traffic Intensity

Queuing
delay
  ^
  |          |
  |          |     /
  |          |    /
  |          |   /
  |          |  /
  |        __|_/
  |   ___/   |
  |__/       |
  +-----------+-------> Traffic intensity (La/R)
  0          1

  La/R -> 0 : Queuing delay nearly zero
  La/R -> 1 : Queuing delay increases dramatically
  La/R > 1  : Queue grows without bound (unstable system)

Key Rules

Traffic IntensityQueuing Delay Status
La/R close to 0Nearly zero
La/R close to 1Increases dramatically
La/R greater than 1Grows without bound (effectively packet loss)

Golden rule of system design: Traffic intensity must not exceed 1.

3.2 Packet Loss

In reality, queue (buffer) sizes are finite.

When a new packet arrives at a full buffer:

  [pkt_n][...][pkt2][pkt1] --> Output link
  ^^^^^^^^^^^^^^^^^^^^^^^^
  Buffer capacity = n (full)

  pkt_new arrives -> Drop! (Packet loss)
  • Lost packets may be retransmitted by the previous node or the source
  • Or they may not be retransmitted at all (depends on the application)
  • Loss rates increase significantly in congested networks

4. End-to-End Delay

Let us calculate the total delay from source to destination.

For N links (assuming no congestion):

d_end-to-end = N * (d_proc + d_trans + d_prop)
             = N * (d_proc + L/R + d/s)

Example: 3 routers (3 links), d_proc = 0.003ms, L = 1,500 bytes, R = 2 Mbps, d = 5,000 km, s = 2.5 * 10^8 m/s

Delay per hop:
  d_proc  = 0.003 ms
  d_trans = (1500 * 8) / 2,000,000 = 6 ms
  d_prop  = 5,000,000 / 250,000,000 = 20 ms

Per-hop delay = 0.003 + 6 + 20 = 26.003 ms
Total delay = 3 * 26.003 = 78.009 ms

4.1 Traceroute

The traceroute command (tracert on Windows) can measure the actual end-to-end path and per-hop delays.

traceroute www.example.com
Sample output:
  1  192.168.1.1     1.234 ms   1.123 ms   1.345 ms
  2  10.0.0.1        5.678 ms   5.432 ms   5.789 ms
  3  72.14.215.85   15.234 ms  14.987 ms  15.123 ms
  ...

Each row represents one router (hop) with three RTT measurements.

4.2 Other Types of End-to-End Delays

Intentional Delays

  • Media packetization delay: Time to collect voice data into packets in VoIP
  • Processing delay: Virus scanning at email servers, etc.

5. Throughput

5.1 Definition

Throughput is the number of bits per unit time delivered from source to destination.

  • Instantaneous throughput: Transmission rate at a specific point in time
  • Average throughput: Average transmission rate over the entire transfer duration
Transferring a file of F bits takes T seconds:

  Average throughput = F / T (bps)

End-to-end throughput is determined by the slowest link on the path.

Server --Rs--> Router --Rc--> Client

  Rs = Server-side link transmission rate
  Rc = Client-side link transmission rate

  Throughput = min(Rs, Rc)

Example 1: Server Side Is the Bottleneck

  Server --2 Mbps--> Router --10 Mbps--> Client

  Throughput = min(2, 10) = 2 Mbps
  Bottleneck link: Server-side link

Example 2: Client Side Is the Bottleneck

  Server --100 Mbps--> Router --1.5 Mbps--> Client

  Throughput = min(100, 1.5) = 1.5 Mbps
  Bottleneck link: Client-side link (access network)
10 server-client pairs sharing one core link (R):

  Server1  --Rs--+                    +--Rc--> Client1
  Server2  --Rs--+                    +--Rc--> Client2
  ...            +-- R (shared link) -+
  Server10 --Rs--+                    +--Rc--> Client10

Throughput per connection:

Throughput = min(Rs, Rc, R/10)

In the real Internet, core link capacity is very large, so the access network is usually the bottleneck.

Typical case:
  Core link >> Access network transmission rate

  -> Throughput = min(Rs, Rc)
  -> Bottleneck is almost always the access network

6. Relationship Between Delay and Throughput

Delay and Throughput are independent performance metrics:

  Delay: Time for a single packet to arrive
  Throughput: Amount of data delivered per unit time

  Pipe analogy:
  +-----------------------------+
  |  Water (data) flowing       |
  |  through a pipe             |
  +-----------------------------+
    <-- pipe length = delay -->
    pipe cross-section = throughput

7. Summary

Delay ComponentDepends OnMagnitude
Processing delayRouter performanceus or less
Queuing delayTraffic intensityus to ms
Transmission delayPacket size / link rateus to ms
Propagation delayLink distance / propagation speedms

Key formulas:

d_nodal = d_proc + d_queue + d_trans + d_prop
Traffic intensity = La/R (must be less than 1 for stability)
Throughput = min(transmission rates of all links on the path)

8. Review Questions

Q1. Explain the difference between transmission delay and propagation delay.
  • Transmission delay: The time to push all bits of a packet onto the link. Calculated as L/R and depends on packet size and link transmission rate.
  • Propagation delay: The time for a bit to physically travel through the link. Calculated as d/s and depends on distance and propagation speed.

Tollbooth analogy: Transmission delay is the time for all cars to pass through the tollbooth; propagation delay is the time for one car to drive to the next tollbooth.

Q2. What happens when traffic intensity exceeds 1?

The average packet arrival rate exceeds the transmission capacity of the link, causing the queue to grow without bound. In reality, since buffers are finite, massive packet loss occurs. Therefore, networks must be designed so that traffic intensity does not exceed 1.

Q3. What determines end-to-end throughput?

The slowest link on the path, the bottleneck link, determines end-to-end throughput. In the real Internet, the access network (home DSL, cable, etc.) is usually the bottleneck.