4

I am designing a non commercial open source client app which needs to download data of exactly 100 KB from server on regular interval and show an alert in client app based on the data changes. Now I need to trade off between the user bandwidth and download interval.

Analysis,

  1. If I set the interval = 1 hour. That means within 1 month app will download 30*24*100KB = 72MB.
  2. If I set the interval = 30 mins. That means within 1 month app will download 30*48*100KB = 144MB.
  3. And so on.

Now, I am considering only the file size where in practice there will be some portion of bandwidth used for control flow apart from data flow. For downloading file of exactly 100 KB from server, how much overhead bandwidth of control flow should I consider in my analysis for TCP communication? Is there any guideline/reference or research on that topic?

Assume, if 10KB is used for control flow, total monthly usage will include 14.4MB extra data which needed to be identified in my analysis.


Note: (1) I am limited to analyse only the client app part. (2) No changes in server side can be done at that moment (i.e. pull based to push based, partial data change api etc. cannot be applied). (3) I am limited to download the file using TCP. (4) Although, that much granularity is not often be considered in practice, let's assume, for my case the analysis required to be that much granular that I need to know the data vs control bandwidth ratio.

Sazzad Hissain Khan
  • 37,929
  • 33
  • 189
  • 256
  • Might be suitable for https://softwareengineering.stackexchange.com but unfortunately, I have not much reputation to ask the question in that site. Someone can move if possible. – Sazzad Hissain Khan Mar 14 '20 at 12:16
  • 1
    There is a paper written in the 1980s by I think Vern Paxson that shows TCP is maximally 83% efficient. – user207421 Mar 14 '20 at 12:18
  • 2
    I believe it is [this one](https://www.icir.org/vern/papers/WAN-TCP-models.pdf) or one of its successors. – user207421 Mar 14 '20 at 12:34
  • Maybe also helpful: https://stackoverflow.com/questions/3613989/what-of-traffic-is-network-overhead-on-top-of-http-s-requests – B--rian May 12 '20 at 13:40

1 Answers1

3

If you are asking only for the TCP/IP part, the payload/PDU ratio is 1460/1500 for IPv4 and 1440/1500 for IPv6, assuming an MTU of 1500 bytes (sources: this already mentioned discussion, this other discussion, this other article).

I also found this really nice page that allows you to see all the header sizes for an arbitrary protocol stack and this academic paper.

However besides the protocol headers, there are more effects that reduce the bandwidth:

  • TCP will send additional messages, e.g. for performing a handshake when establishing the connection,
  • Retransmission of data may occur,
  • Actual frame sizes are negotiated on the lower communication layers, so TCP segments might be smaller than assumed.

In summary, this is not easy to answer precisely, because there are influences in the transmission process that are beyond your control.

Have you considered to measure the actual amount of data needed for transmitting one (or more) 100KB chunk(s) of payload rather than performing a theoretical analysis?

Gerd
  • 2,568
  • 1
  • 7
  • 20