Why is my rails app so friggin fast????

Seriously. I ditched Rails a while back (on a different provider…a respectable vps provider) because it was SOOO slow.

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: http://64.22.71.122/

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 http://64.22.71.122/

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 http://64.22.71.122/

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

I noticed a profound difference between my previous VPS provider and Linode that I believe is simply because they used Virtuozzo instead of Xen. I don't care what anyone else says, Virtuozzo has the WORST performance hit of any VM technology - and having swap space DOES help. I think it's moronic to say that swap isn't necessary when the baseline amount of memory with other providers is as low as 32MB with an upper limit generally around 256MB for the cheapest (and usually most popular) service plans.

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.

Good points. :-)

I have to admit, I'm loving Linode.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct