I am running Rails 3.0.5, and a page is reported on the console that it take 60ms, but if I check the Firefox Net load time chart, it takes 2.9 seconds. If I run the ab
command on Bash, it says it take 300ms.
So if remove the stand javascripts (6 of them), then it takes 1.9 seconds... but I wonder why so slow? Isn't keep-alive honored?
Also strange is Firefox shows that 4 files are downloading concurrently -- I thought Webrick supports only 1 connection as a time?
(Will changing to using mongrel or "thin" make things any different or better?)
also strange is that if I
ab -n 10 -c 5 http://www.somesite.com:8080
it takes 3 seconds, and to test how keep-alive
is supported, I used the -k
option:
ab -n 10 -c 5 -k http://www.somesite.com:8080
but now the total time changes from 3 seconds to 4.5 seconds. Isn't keep-alive
supposed to make it faster, and is keep-alive
supported by Webrick?
Also, if it supports concurrent connection, then if some code uses a class variable to handle things, then can't there be race condition happening? (since class variable content stays across requests)