What is considered fast performance for a single server request?
I understand there are several factors involved when making db calls and internet, but开发者_JAVA百科 i am referring strictly to the methods processing the requests, not the roundtrip to the client. I am using stopwatch to get an average range but i do not know what is generally considered fast or decent performance. 10ms 500ms?
It is really subjective question, but I think it is valid. All of us know that 4 MPH is slow for the car, while 150 MPH - very fast. Now lets back to servers. The fast (indexed) call to the DB takes about 20 ms. Let say we need 5 of them. Storage latency is also about a 5-10 milliseconds with data dozens of megabytes per second throughput. Let say we need to read 1Mb. It should take let say 50 milliseconds. 10 milliseconds of CPU is enough to make dozens of searches in the various maps. 10-20 is enough to efficiently fill some template of the result. So we get to sum 20*5 (for DB) + 50 (file system) + 10 (in memory searches)+20 (template filling). 180 milliseconds. So very very roughly we can assume that efficient server, not overloaded, not doing excessive scans over data should have around 200 milliseconds respond time. From above we can also assume that get less then 50 - is very challenging. Of course all above is depends on many factors, but the goal of the post - to give some feeling what is fast and what is slow.
精彩评论