If we:
1) Count bytes/bits at the network adapter level (raw # of bits through the NIC) and,
2) Count bytes in all HTTP/S request/responses.
Assuming only HTTP/S traffic is on the box, and assuming a statistically relevant amount of "typical" web traffic:
I want to know about how much more traffic will be counted at the NIC level than at the HTTP/S level (counting http headers and all) because of the extra network overhead.
HTTP headers allow additional information to passed between servers and clients in addition to "the data" (i.e., request or response) and thus may be considered to be overhead bits. Such bits are not counted as part of the goodput.
To calculate an application's network overhead using NetstatRetrieve the current interface statistics using Netstat. Execute the application. Get the interface statistics, again using Netstat. Calculate the number of bytes received between the two Netstat measurements.
So, as demonstrated, for data payloads in excess of the common TCP payload maximum segment size (the MSS) of 1460 Bytes, the TCP over IP bandwidth overhead is approximately 2.8%.
At Transport Layer, 20 Bytes overhead is added by TCP for each data segment. Down at Network Layer, 20 Bytes overhead is added by IP for each TCP Segment. Once at Data Link Layer, Ethernet would add its own overhead of 26 Bytes to each Network Layer PDU (nothing but IP Packet).
You have zero knowledge about the layers below HTTP. You can't even assume the HTTP request will be delivered over TCP/IP. Even if it is, you have zero knowledge about the overhead added by the network layer. Or what the reliability of the route will be and what overhead will be due to dropped/resent packets.
Update: Based on your comment, here are some back-of-the-napkin estimates:
The maximum segment size (which does not include the TCP or IP headers) is typically negotiated between the layers to the size of the MTU minus the headers size. For Ethernet MTU is usually configured at 1500 bytes. The TCP header is 160 bits, or 20 bytes. The fixed part of the IPv4 header is 160 bits, or 20 bytes as well. The fixed part of the IPv6 header is 320 bits, or 40 bytes. Thus:
overhead = TCP + IP = 40 bytes
payload = 1500 - 40 = 1460 bytes
overhead % = 2.7% (40 * 100 / 1460)
overhead = TCP + IP = 60 bytes
payload = 1500 - 60 = 1440 bytes
overhead % = 4.2% (60 * 100 / 1440)
Here are the assumptions:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With