applying high performance tools to vps.

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
socialtalker's picture

This weekend I have wiped my vps clean and am starting all over. i want to put about 18 drupal sites and a couple of wordpress sites on account. i have linode 760 plan. i want to use ubuntu 10.04 lts, i think thats what its called. i am using nginx as the server. but its so confusing trying to know the right tools to add. i believe i can add memcache on the nginx server, but how do i add varnish and apc, or do i need to add all three of those? the documents and different pages i am finding totally confusing. do i use modules to install these tools or do i do i install them at the server? are the instructions for drupal 6 applying to drupal 7?

Comments

Start with APC

ghankstef's picture

Then ask yourself what do these sites need - look at traffic logs. Is most of the traffic anoymous ? If so Boost module is pretty straight forward or you can go with Varnish.
For logged in users memcache can make a big difference

Still remember this is caching so if the same page is not requested over and over - it doesn't help much.

Ask your self what problem you are trying to solve? Which sites are slow, if any? Benchmark it. If a site is slow, what part is slow? DB queries, front-end CSS/JS, php processing ? Hit the site with the Apache a/b binary and measure the results for anonymous and then authenticated users. It may be that Linode, Nginx and APC more than do the job. If you see a problem. I would suggest once performance tweak at a time, like add Boost or Varnish and see what the impact is. Then if you need to go further - take the next step.

thanks for responding, these

socialtalker's picture

thanks for responding, these are all new sites, how much traffic they will get i cant say. see, i thought if you install varnish and other tools at the server configuration, you wont have to rebuild your vps to install them later if you need them. I confess I am not sure how that works.

Have you taken a look at

geekgirlweb's picture

Have you taken a look at Barracuda?
http://drupal.org/project/barracuda

It has all of the tools you need to get a high performance setup on a VPS. I tried the manual route of Ubuntu 10.04/11.04, Nginx, Apache, etc. This is basically like having your own sys admin install everything in one go.

barracuda is what i had on

socialtalker's picture

barracuda is what i had on my vps. aegir-barracuda-octopus it's a beautiful system, omega seems to have put all of these fast tools in the script. but it kept crashing on me.

cothrun's picture

768 MB memory is not much for a complete high performance stack. You're going to want to pay close attention to the amount of memory allocated to each layer. Look for ways to measure memory usage, cache usage (hits, percentages, etc) and benchmark everything, tuning as necessary.

Many of these items are going to be installed at the operating system level, the Drupal modules exist to aid configuration and performance while using them.

Don't skip your database cache tuning, default MySQL caches can be a little off and it will benefit from a tuning cycle.

thanks for the advice, i am

socialtalker's picture

thanks for the advice, i am going to have to learn how to do this "database cache tuning", i have never heard of it before. is there a tutorial somewhere? i also appreciate you explaining how the modules work with the system.

Make sure that you're on a

jcisio's picture

Make sure that you're on a multi-site setup. If not, APC will be useless with a large number of site in your limited 768 MB memory.

Your statement is confusing.

mrwhizkid's picture

Your statement is confusing. When it comes to Drupal and caching PHP, APC is never useless. In fact, I would highly recommend it for a 768mb memory server to help get the most out of that limited memory.

he is saying that when you

ddorian's picture

he is saying that when you have multiple separate drupal installs the codebase of all the sites will be too large (why shared hosting dont enable apc)

l didnt know 768mb was

socialtalker's picture

l didnt know 768mb was considered so limited. the thing is, I am planning one network of 10 sites and the other sites are separate. perhaps if i sign up for 1024MB or 1536MB account, that will be sufficient?

Note that BOA system is using

omega8cc's picture

Note that BOA system is using shared code heavily, so its APC cache is tuned for best results, and the system can work even on 512 MB VPS (tested on Linode many times), however depending on the size of your contrib space (the platform in the Aegir terminology), for best results you need at least 1 GB RAM (or more).

I guess it depends on the

mrwhizkid's picture

I guess it depends on the size of the sites, then. I have quite a few separate Drupal + Wordpress installations running on my modest server and APC has done wonders for performance.

It is just my guess. There is

jcisio's picture

It is just my guess. There is an article with a case where an incorrect APC shm_size does not increase the speed, but even slow it down 3x (only PHP files loading time is measured).

The OP has 18 Drupal sites. I guess that a normal Drupal site uses something around 30 MB of APC shared memory. And in this case, it is not a good idea to enable opcode cache (or just cache only extremely popular files).

The thing to watch with apc

stewsnooze's picture

The thing to watch with apc is the full count. Install the apc.php file and make sure you never or at least rarely get a full cache. If you aren't hitting full cache then apc is always faster

Full Fat Things ( http://fullfatthings.com ), my Drupal consultancy that makes sites fast.