Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject:
PostPosted: Tue Jan 25, 2011 3:20 pm 
Offline
Senior Newbie

Joined: Fri Feb 19, 2010 8:50 pm
Posts: 5
Just my 2 cents....

This week I've bought a new linode to test a new server and put cherokee (similar to nginx or lighttpd) as web server and done some tests with loadimpact.com and ab.

I've tuned a lot my apache config (to not eat my ram, was using 20 maxclients) and was getting miserable results when more than 20 clients at that test, even the 10 clients test was bad compared with cherokee, got 3-4sec page load for 10 clientes and climbimg to 10sec with 30 clients, more than 20sec with 50 clients, using php-fcgi/apc. (this with Joomla and a working site)

Now, with cherokee, the same site, and php-fpm, It does in 1.2sec the 10 client, the 50 client does in 1.4sec!!!!! Absolutely no changes in configurations (only php-fpm), and memory consumed is abysmal low, ~150mb with mysql/cherokee/php-fpm/apc on the 50 client test and ~100mb idle.

The apache server with same apps uses 350mb when 50client test and ~150mb idle!

Just my 2cents, but I'll won't come back soon to apache2 anymore...


Top
   
 Post subject:
PostPosted: Tue Jan 25, 2011 3:51 pm 
Offline
Senior Member
User avatar

Joined: Tue May 26, 2009 3:29 pm
Posts: 1691
Location: Montreal, QC
hybinet wrote:
Guspaz wrote:
Properly configured, with mpm_worker and fastcgi, a huge load spike will not consume more RAM than is available, leading to a slow but accessible website.


Just out of curiosity, what are the default settings like for mpm_worker and fastcgi? Are they more reasonable than the default settings for mpm_prefork and mod_php? Are they just as prone to OOM if used on a Linode 512? Or does the setup require so much manual tweaking that it's pointless to talk about the defaults anyway?


It's not pointless to talk about defaults, because most people don't change them. Out of the box, Apache will explode under load on anything but an enterprise-grade server (and a high-end one at that). Out of the box, the default settings for lighttpd/php will work perfectly fine with 512MB of RAM under heavy load.

My point is that the same thing can be achieved with Apache, but not without manual tweaking. Apache's defaults are not sane.

To answer your other question, mpm_worker defaults to 16 processes with up to 25 threads each. Decoupled from PHP, the memory requirement here is pretty low.

As for the default php fcgi settings, I couldn't tell you for Apache, as I've not set that up. For lighttpd, it's 2 parent processes with 4 children each. I'll admit that the theoretical memory usage there is probably about 1200MB, but that's an order of magnitude lower than Apache. PHP memory load is determined by what you run, not how much of it you run, so typical memory usage for PHP is going to fit inside that 512MB.

Tweaking either Apache or lighttpd can reduce memory usage farther, obviously.


Top
   
 Post subject:
PostPosted: Tue Jan 25, 2011 8:39 pm 
Offline
Senior Member

Joined: Wed Jul 21, 2010 8:04 pm
Posts: 119
It's too bad Apache can't scale itself up/down based on the amount of RAM available and the amount of RAM each process requires. Although, I'm sure even if it did, a lot of people would want to limit it manually.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group