Improve Drupal Performance

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

I have a Drupal site with many modules enabled (CCK, views, rules, etc). The site will be used by several hundred people so I want fast page loads and the server to be able to withstand a large load. Everyone using the site is going to be a authenticated user so modules like Boost aren't going to help. The server's really good, dual-core and 6 gigs of RAM. I've installed APC, and it is awesome, but I have no idea how to put the rest of all this RAM to use.

I was thinking of using Authcache but afraid because a) I never want a user to see old content and b) my site has many views and pages which are specific to each particular user. I am now thinking more towards Memcached, but have no idea where to start.

So I am turning to all your expert advice as to how to put all this RAM to use.

Comments

JMeter

jmccaffrey's picture

1) Load test your site. (http://jakarta.apache.org/jmeter/)
2) Find out what you need based on the results of your load test simulating your projected user base + some % of padding.
3) ???
4) Profit

pantheon

sreyas's picture

You should try pantheon for your drupal. It do have memcache, varnish pressflow etc which would give a real performance for you.
http://groups.drupal.org/pantheon

If you have APC installed,

Jamie Holly's picture

If you have APC installed, then I would use that for object caching instead of memcache (use the cacherouter module). APC is much faster than memcached and better suited for a single server installation.

Also check to make sure all your queries are executing quick enough. One thing with views is its easy to get queries that aren't indexed and can slow things down, so use the devel module with query logging and check any queries that seem to be taking to long.

Finally tune MySQL. There are scripts to help with that (MySQLTuner, Tuning Primer, etc.). Those will help set things like sort buffer and query cache sizes, things that all can benefit from extra ram.


HollyIT - Grab the Netbeans Drupal Development Tool at GitHub.

MySQL tuner for drupal

mikeytown2's picture

This does wonders for your views queries
http://drupal.org/project/dbtuner

haha , I really need to know

thomas4019's picture

haha , I really need to know that step 3. I've installed JMeter and am playing around with it. It looks like it will be pretty good a diagnosing performance.

I'm afraid to move completely away from a LAMP stack as I'm working in a group and the other's are very familiar with Apache. I have heard that other server's (nginx, varnish, etc) are much faster but haven't tried them out yet.

I installed cache router and got it running with APC. I noticed a small improvement in page performance (not nearly as much as I was hoping). Also it's starting fragmenting my perfect APC memory. Here's a link to screenshot of my APC statistics, http://cid-a6d67e8e5d35ba2c.office.live.com/self.aspx/Public/Untitled.png.

I also installed DB Tuner and added the core indexes it recommended.

Thanks for all the help, I'm going to look into tuning the mysql using mysqltuner as you suggested.

Thomas Hansen
www.ThomasHansen.me

Looks like APC needs more

dalin's picture

1.74% fragmentation doesn't really seem like a lot. Are there a lot of low memory prunes?

And before you move away from Apache, make sure that your Drupal house is in order. If your current bottleneck is either in your PHP code or MySQL queries, then switching away from Apache will do next to nothing for you.

Find the problem before you start surgery.

--


Dave Hansen-Lange
Director of Technical Strategy, Advomatic.com
Pronouns: he/him/his