Posted by rokape on January 19, 2010 at 3:52pm
Should i use both those?Or use only one like xcache is better?
So for best per: D6+apache2+xcache+memcached+boost?
Should i use both those?Or use only one like xcache is better?
So for best per: D6+apache2+xcache+memcached+boost?
Comments
Ideally, both ...
Ideally, you need two different things: a code cache and a data cache.
For a code cache, you need one of these: APC, Xcache, or eAccelerator. APC is often the most stable. eAccelerator is the most performance, but is less stable on newer PHP versions.
For data cache, memcached is the best there is, and the most scalable. It can work across servers even. While APC and cacherouter can do what memcached does, make sure that if you do that, you have PHP running as mod_php. You will not be able to get that configuration to work across servers though.
You need lots of RAM for a data cache to be effective.
Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.
When you say lots of RAM how
When you say lots of RAM how much do you mean?
I use APC as an opcode cache
I use APC as an opcode cache instead of Xcache. It's not perfect, but it's actively developed by the php devs.
For a user cache, I tried cacherouter module and apc as user cache but ran into a bit of weirdness. Now I switched to memcache module and memcached for the user cache.
I also use Boost but with Pressflow and with nginx.
Nginx + pressflow? (on project mercury-based Ami)
Brian - you mentioned you are using nginx + pressflow. Did you see a significant performance boost over the standard apache pressflow implementation? How difficult was the setup? I am experimenting with the project mercury Ami and considering trying to use nginx in lieu of apache. Any pointers would be greatly appreciated.
Andy
I can't speak to high-traffic
I can't speak to high-traffic performance because I have a low traffic site. I have few visitors, but they're very important to me. I have a 360MB Xen VPS on Linode. My traffic could easily be handled by a shared host but then I wouldn't have the flexibility to do things the way I want and not the way the host must do them for user security.
I began using nginx+php-cgi because it uses less memory than apache+mod_php. For Boost, nginx is going to be faster than stock apache+mod_php because it serves the Boost static files faster. However, if you can devote the RAM and configuration time to Varnish instead of Boost, then Varnish seems to be faster. Varnish also has a very powerful configuration language.
Now using nginx for the past several months I've really come to like the way it works. It's very logical and flexible and I've found it does many things with minimal configuration. It can be a reverse proxy like Varnish or a load balancer like HAProxy. I've been able to set up listening on various ports, with various ssl certs, with redirects, and connection limiting and everything else I want. All with minimal configuration and memory footprint. As for ease of setup, it's like anything else: easy once you know how it works. Unfortunately, the documentation is limited so it takes some time. I know Igor has started to write some better docs in english.
My only concern is that new innovations for Drupal might be developed with apache or Varnish in mind. The patch for reverse proxy caching developed for D7 and backported by Four Kitchens into Pressflow is for Varnish and I had to create a tiny module for the same reverse proxy cache in nginx (although I've personally decided to keep using Boost instead of nginx native caching). Then I wanted Xsend support so I had to mess with the xsend module. http://groups.drupal.org/node/36892
I'm not a professional dev and so my skills are limited. I'm worried that there's not enough interest in nginx support for Drupal that some really handy things will be developed for Drupal but not for nginx. On the other hand, I'm encouraged that both of the efforts to support edge side includes mention nginx ssi along with Varnish ESI. (http://drupal.org/node/651902 and http://drupal.org/node/634746)
You can check out the http://groups.drupal.org/nginx group for some of the configuration discussions.
Small note
Unless proven by serious benchmark, I would call them on par. They are both very well designed and fast
True. I conducted a less
True. I conducted a less than serious benchmark and found Varnish faster. I haven't seen (or done) any really good benchmarks.
Varnish vs Boost
Varnish (or any reverse proxy) and Boost don't really do the same thing. A reverse proxy will often skip the entire Drupal bootstrap, etc. for anonymous traffic, but Boost cache hits can happen after Drupal is partially loaded. This means Boost sometimes has more overhead but can be applied to different situations.
I've had trouble with Boost on a few sites (lots of nodes + FeedAPI in particular) so I recommend using a reverse proxy instead (if it fits your site).
Ken Winters
I don't believe that is the
I don't believe that is the case. Boost creates static files. The webserver is configured to check to see if the static file exists and if the user is anonymous, and if both conditions are true, the webserver serves the static file without a Drupal bootstrap.
Yup that is correct. Where
Yup that is correct. Where Varnish beats out boost is in the fact the Varnish will cache the files in memory and totally bypass Apache all together. With Boost you still hit Apache, which includes parsing .htaccess rules (unless you moved them to the config file). That's where you start seeing the performance gain in Varnish as compared to Boost. Also, depending on server setup, Apache can be a memory hog for each page request.
HollyIT - Grab the Netbeans Drupal Development Tool at GitHub.
Yes, though Boost with nginx
Yes, though Boost with nginx serves pages much faster than Boost with Apache-prefork+mod_php, on the order of 400% faster, approaching Varnish speeds and without the memory issues. (I never tested Apache-worker+php-cgi so I can't speak to speed.)
Still Varnish beat out nginx by about 18% in my personal quick and dirty testing. Off the top of my head, and without looking up my numbers, it was:
Boost with Apache-prefork: about 500 req/s;
Boost with Nginx: about 2000 req/s; and
Varnish: about 2400 req/s.
It's not totally black and white when it comes to caching in memory. Varnish caches on disk and then interacts with the OS to keep as much of that disk file in OS virtual memory as prudent, flushing the least requested pages. Our modern OSes do the same thing for all files though, including nginx serving Boost cached files.
Now, I wouldn't be surprised if Varnish does it better, since that is one of its principal functions. But if you have tons of free RAM, the OS will cache the most accessed Boost cache files in memory for use by any process or webserver.
You will usually be able to
You will usually be able to skip Drupal for anon with Boost (hence can), but the point is that they still operate at different levels and one is much more strongly integrated into Drupal than the other. If you do a cache clear on a huge boost site this becomes readily apparent.
The reverse proxy is also much easier to split off onto a separate server, IMO.
Ken Winters
Strange to compare drupal module and proxy software
Don't compare Boost and Varnish. Instead, compare server setups i.e. (Boost with Nginx as webserver) vs (any web server with Varnish as reverse proxy). Biggest advantage of Nginx is it allows you to get rid of Apache. I use Nginx + php in FastCGI mode and don't need to care about Apache or Varnish at all, because my configuration is fast enough. Actually, Boost with Nginx as webserver is probably fastest configuration for serving static + anonymous content ever.
So what' new php ver can work
So what' new php ver can work good with eAccelerator?how about php ver 5.29?
And how can i config apache PHP running as mod_php on centos 5,cpanel?
I wonder how to install
I wonder how to install varnish on my VPS centos 5?
Bumpppp
Bumpppp
Did you try the instructions
Did you try the instructions in http://groups.drupal.org/node/25425 but altered for Centos/RH instead of Ubuntu/Debian?
And how about per of Nginx as
And how about per of Nginx as reverse proxy for apache(Mod-php) at back-end?Anyone have benmark?