Hey all,
I have been reading the last couple of months this drupal group and learned a lott of caching and performance.
Specifications:
Now i'm running Apache with Boost,memcache and Drupal6
VPS with 1GB RAM but we can boost this up if we like to 4GB.
The project will have high number of anonymous users and high number of articles. The articles/pages aren't static because users can add comments or rate the article, so the pages changes time to time. (perhaps i should consider to make this not possible, but for now it's) Preference for boost cache 1 hour, and only change if "Check database timestamps for any site changes. Only if there has been a change will boost flush the expired content on cron."
So with this in mind i have been looking for the best performance.
(i got this from a site and it was linked from a drupal comment HERE: http://groups.drupal.org/node/45514#comment-119868)
Setup Approx requests/s
Boost with Apache-prefork 500
Boost with Nginx 2000
Varnish 2400
With these numbers i thought.. mmh what kind of machine is this and is that importend to deliver the requests/s?
Boost:
All sites, especially big, infrequently changing, high traffic: Big gains. Easy setup.
Varnish:
High Traffic: Big gains when performance critical. But than i need to change to Pressflow, because i now use Drupal .. or patch drupal.
Also changing from Apache to Nginx.. I guess this isn't eassy. I installed everything with Webmin and SSH, i see there is Webmin module for Nginx also, but not sure if this will mean a nother weekend inside to understand this new kind of software.. i already undestand Nginx does not work with htaccess and i guess there is much more that i should understand and takes much time.
So the main problem is can i use Varnish, because i will have 500.000 nodes or more.. not big nodes but small ones.. not sure if that matters. So this means it will need much RAM... I guess boost is the best option for me with a machine that can only go to 4GB ram eventually. But if my content changes a lott would boost not eat up my machine because it has to change content every 1 hour for .. a few 10000 nodes?
Your opinion is more than welcome!
I imagine the best option would be Pressflow+Nginx+Varnish, but not sure if this also counts for large database and less RAM.
And can i change from Drupal to Pressflow even if i have already 20 installed modules? (aha.. i just googles this i will read about that now)
Greatings,
Klaas
Comments
Depends on your server
According to this article
http://www.chadcf.com/blog/drupal-performance-and-scaling-part-1-anonymo...
5,549 requests per second with Apache+boost.
2,000 requests per second with Nginx+boost.
Server is on EC2. You won't know what works best on your server until you test it out. Author of that blog post admits that he didn't compile Nginx from source so it could be a fairly old version of Nginx.
The big difference between boost and varnish is cache flush times. Removing files from the hard drive is slow; purging cache objects from memory is fast. If you have 10k "active" nodes within a 5 minute window, varnish is the right fit. If you have less then 100 "active" nodes within a 5 minute window then either boost or varnish will be a good fit. Numbers above are ballpark numbers, but you get the general idea.
With 500k nodes I would get the latest dev of Boost (if your not running it) and use the views and panels cache expiration logic and crank up the expiration time to 52 weeks. Testing is needed but it should work surprisingly well.
2 modules to help with long cache lifetimes:
http://drupal.org/project/views_javascript_random
http://drupal.org/project/ajaxblocks
If Performance and
If Performance and scalability are a concern you really should be running Pressflow. Installation is very simple as long as you haven't hacked core (and you haven't right?) - just swap out Drupal core for Pressflow.
I wouldn't recommend nginx or other Apache alternatives since you aren't familiar with them. The gains are minimal. Most of your performance and scalability challenges will be with PHP and MySQL, not with whatever web-server is invoking PHP.
More RAM can always help, but only if you know how to distribute it between Apache/MySQL/Memcache/Varnish etc.
I would start with Pressflow + Boost and know that you have options to move up from there in the future if need be. No sense in doing pre-mature optimization when you don't know where exactly your pain points will be until you get there.
--
Dave Hansen-Lange
Director of Technical Strategy, Advomatic.com
Pronouns: he/him/his