I got some conclusions but need more verification before posting those here but between some tests I decided to check what is the minimum cpu time usage when starting cold, so I creating a brand new application I uploaded a plain "Hello World application, with a bare minimum configuration.
Just a single yaml handler and a print statement for output no import whatsoever.
I was amassed to see in in the logs that a cold start would cost around 100 cpu_ms or more with successive requests consuming around 10 cpu_ms and request time latency of more than 100 ms in the hot start.
So if we have a proper application with cpu consuption and latencey close enough to above values we are doing wanders.
One more remark on the aftermath of these tests today, do not forget to include a favicon to the handler since most of the browsers will request for it any way and the cost of this request and the denial is probably greater than provide one in the first place.
And ... here are the real logs where you can see a Cold % Start and successive Hot Starts :
08-16 10:37AM 50.074 /Hot%20Start 200 8ms 8cpu_ms 0kb Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.198.1 Safari/532.0,gzip(gfe)
08-16 10:37AM 48.149 /favicon.ico 200 11ms 14cpu_ms 0kb Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.198.1 Safari/532.0,gzip(gfe)
08-16 10:37AM 47.616 /Hot%20Start 200 37ms 55cpu_ms 0kb Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.198.1 Safari/532.0,gzip(gfe)
08-16 10:37AM 37.885 /favicon.ico 200 24ms 16cpu_ms 0kb Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.198.1 Safari/532.0,gzip(gfe)
08-16 10:37AM 37.340 /Cold%20Start 200 229ms 168cpu_ms 0kb Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.198.1 Safari/532.0,gzip(gfe)
No comments:
Post a Comment