LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > External Applications > Ruby/Rails > RubyLsapi vs. PHPLsai performance

Reply
 
Thread Tools Display Modes
  #1  
Old 09-12-2006, 12:51 PM
amalik amalik is offline
Member
 
Join Date: Aug 2006
Posts: 18
Question RubyLsapi vs. PHPLsai performance

I have noticed that when I lightly load my rails virtual host with a simple 'ab -n 30 ', the railsrunner seems to take about 40-70% of the user cpu, while when I load my php vhost hitting the title page of my blog, it hovers around maybe 15-30% of user CPU.


could it be that the rubylsapi library "spins" while ruby goes off to get stuff from the database. I can only see that it is using usleep(), so it shouldn't really be spinning.

question is, is this the rubylsapi or is it because ruby is a cpu hog?

how can I determine which part is being the cpu hog?
Reply With Quote
  #2  
Old 09-12-2006, 02:01 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
Rails framework causes the high CPU usage.
We believe rubylsapi is the fastest IPC implementation for ruby. just take a look at our comparison between LSAPI and FCGI on our blog. http://blog.litespeedtech.com/.
ruby itself is pretty fast, should be comparable to PHP, it will become pretty slow once Rails framework is used. You also can get some idea about the slow down if you compare the results of our benchmark of "hello world" implemented in pure LSAPI and LSAPI + Rails published on our blog.

You can make Rails runs a little bit faster by turning off logging and session for part of the application don't need them.
Reply With Quote
  #3  
Old 09-12-2006, 02:24 PM
amalik amalik is offline
Member
 
Join Date: Aug 2006
Posts: 18
Quote:
Originally Posted by mistwang View Post
Rails framework causes the high CPU usage.
We believe rubylsapi is the fastest IPC implementation for ruby. just take a look at our comparison between LSAPI and FCGI on our blog. http://blog.litespeedtech.com/.
ruby itself is pretty fast, should be comparable to PHP, it will become pretty slow once Rails framework is used. You also can get some idea about the slow down if you compare the results of our benchmark of "hello world" implemented in pure LSAPI and LSAPI + Rails published on our blog.

You can make Rails runs a little bit faster by turning off logging and session for part of the application don't need them.
I suspected as much. I'm running it in production mode so logging is minimal. Truth be told the 3rd party app I'm using could use some query tuning because right now its a super-hog.

I'll take a look at the benchmarks you mentioned.. I'm loving LSWS btw, I think I'm gonna go with enterprise when I get to deploy this little piggy

-Amr
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
performance sofatime PHP 8 06-29-2007 03:15 AM
Performance tuning - php 4/apc/lsapi bazza PHP 3 08-22-2006 06:21 AM
Best performance - which technique? fryk Install/Configuration 6 06-01-2005 07:54 PM
Bug ? or low performance ?..... MagicMike Bug Reports 9 03-11-2005 09:57 AM
performance feles Install/Configuration 1 09-25-2004 08:30 PM


All times are GMT -7. The time now is 01:44 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.