Carlo V. Dango
Carlo V. Dango

Reputation: 13902

Rough estimastes for roundtrip time in a client-server system

I want to know your rules of thumb regarding the roundtrip times for the different entities in a client-server environment. The timings are to bring an understanding of how expensive it is to make a request in different parts of the call chain. That is, get a feeling of the impact of a SELECT N+1 PROBLEM that may arise i the system. Assume we have the following entities

client <-> server <-> dbserver <-> disc access (on db server)

Assume

The timings probably consists of sending data, processing on the other side, and returning new data.

My gut tells me that

client <-> server is 1-2 seconds

Server <-> dbserver 200 milliseconds

dbserver <-> harddrive 15-40 milliseconds

what are your experiences?

Upvotes: 1

Views: 594

Answers (1)

Louis Ricci
Louis Ricci

Reputation: 21106

  • Clinet ping to server ~100ms (round trip time)
  • Client connection ~512KB/s UP ~1MB/s DOWN (cheap broadband/DSL)
  • Server ping to DB ~1ms
  • Server connection (to DB) ~10MB/s UP ~10MB/s DOWN (cheap LAN connection)
  • DB hard drive "random" read/write ~2MB/s READ ~1MB/s WRITE (HDD)
    • But DB will likely be cached in RAM ~6GB/s bandwidth

Sending 4KB from client to server ~57ms ((4KB / 512KB/s) + 0.050s) Processing time for server ~1ms Sending 4KB from server to db ~1ms ((4KB / 10MB/s) + 0.001s) Processing time for db ~1ms RAM read for db ~1ms OR Hard Disk read for db ~2ms (4KB / 2MB/s) Sending 4KB from db to server ~1ms Sending 4KB from server to client ~54ms ((4KB / 1MB/s) + 0.050s)

Total Round Trip ~117ms (57ms+1ms+1ms+1ms+2ms+1ms+54ms)


The question is asinine on a lot of levels. Most IT professions wouldn't try to estimate a value that they can gain from a simple timed test. Different hardware will vary results greatly.

Upvotes: 2

Related Questions