Packet Size, Payload, and Headers

A packet contains addressing or protocol information alongside data. The usable payload depends on the layers and their headers.

Source
Anbloq
Language
English
Created
Updated
Chapters
4
Reading time
1 min
In this article4 chapters
  1. Calculate a conceptual budget
  2. Check constraints per path
  3. Calculate useful fraction under a stated toy framing model
  4. State which bytes your measurement counts

Calculate a conceptual budget

If a selected packet budget is 1000 bytes and its headers use 60, up to 940 remain for the payload under that example. Explicit size units keep the subtraction correct.

Check constraints per path

Different links can support different maximum packet sizes, and a protocol can add options or encapsulation. The application should use documented transport and path MTU behavior rather than assume one constant fits every path.[1][2]

Calculate useful fraction under a stated toy framing model

If a packet contains one thousand payload bytes and forty header bytes at the stated layer, useful content accounts for \(1000/1040\approx96.2\%\). With one hundred payload bytes and the same headers, that fraction falls to roughly 71.4 percent. See measuring useful throughput.

Payload 1000: total 1040, useful 96.2%
Payload 100: total 140, useful 71.4%
Other layers or retransmissions can add more bytes

State which bytes your measurement counts

Packet captures at different layers can include different headers. Application goodput uses accepted payload in the numerator. When comparing settings, keep accounting boundaries and observation duration fixed.

References

  1. Larry Peterson and Bruce Davie, Computer Networks: A Systems Approach ↩
  2. IETF, RFC 9110: HTTP Semantics ↩