Why is my rails app so friggin fast????
My app was taking forever to load up. I was using mod_rails (passenger).
Anyway, I just setup passenger on my new linode 360 (ubuntu 8.10 32bit).
The address is:
The "welcome to rails" starter page load friggin instantly! Granted, I'm sure there is some caching, passenger is fully loaded, etc.
But what really amazed me is when I run ab.
ab -n 10000 -c 100
Server Software: Apache/2.2.9
Server Hostname: 64.22.71.122
Server Port: 80
Document Path: /
Document Length: 7385 bytes
Concurrency Level: 100
Time taken for tests: 2.608 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
Total transferred: 76908435 bytes
HTML transferred: 73886925 bytes
Requests per second: 3834.83 [#/sec] (mean)
Time per request: 26.077 [ms] (mean)
Time per request: 0.261 [ms] (mean, across all concurrent requests)
Transfer rate: 28801.86 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 1 2.3 1 61
Processing: 4 25 17.4 18 146
Waiting: 3 23 17.0 17 143
Total: 5 26 17.5 19 147
Percentage of the requests served within a certain time (ms)
50% 19
66% 23
75% 30
80% 34
90% 47
95% 54
98% 78
99% 110
100% 147 (longest request)
Now, is this because of major caching or is rails/passenger really fast? LMAO.
I mean, seriously….this is flying.
Tonight, I'm going to get some more going just to see how the thing performs but I have to admit, everything about linode seems to scream too.
BTW, I'm a rails/php newbie.
cbmeeks
EDIT:
OK, I'm an idiot. After doing some reading I realized that the default welcome page is pure html from apache…which is why it is so fast.
However, now I have a real rails page rendering Hello World.
Now, ab gives me:
ab -n 10000 -c 10
Server Software: Apache/2.2.9
Server Hostname: 64.22.71.122
Server Port: 80
Document Path: /
Document Length: 24 bytes
Concurrency Level: 10
Time taken for tests: 34.914 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
Total transferred: 5880352 bytes
HTML transferred: 240000 bytes
Requests per second: 286.42 [#/sec] (mean)
Time per request: 34.914 [ms] (mean)
Time per request: 3.491 [ms] (mean, across all concurrent requests)
Transfer rate: 164.48 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 1 4.4 0 110
Processing: 3 34 42.1 19 840
Waiting: 0 33 41.2 18 840
Total: 3 35 42.4 20 840
Percentage of the requests served within a certain time (ms)
50% 20
66% 36
75% 47
80% 56
90% 82
95% 107
98% 147
99% 187
100% 840 (longest request)
Still respectable I think. Not to get into a flame war, I just wonder how Codeigniter would rate (which is what I was using).
2 Replies
Of course when you start using that virtual memory you're still at a loss because it's incredibly slow, but at least you have a chance to get in your VPS and fix the problems rather than just having your processes killed.
I have to admit, I'm loving Linode.