0

Just after any quick easy suggestions about where I should try tweaking my web server to use some of the spare memory and reduce CPU usage. Sorry if I'm a bit vague, but this isn't really my area.

I run Apache 2 with MySQL 5 and most websites are PHP - either bespoke or usual Wordpress / Drupal etc.

I already have some MySQL cahcing and optimizing going on along with APC object caching, but am wondering whether to crank up the settings on these. I also set my PHP memory limit right up to 512mb, but I still don't seem to be running out of memory.

Any ideas?

Thanks, Chris

2 Answers2

2

Assuming you've done basic tuning for your APC cache, and have Apache's memory/worker settings appropriately sized (most common error here is to overdo it), the best approach for the rest is to leave it alone and let Linux do its thing. It will use that spare memory for caching and buffering.

And, if your site suddenly becomes popular, you're not already overcommitted and have room to handle thta. (In fact, for that reason, I'd suggest putting the PHP memory limit back down to a smaller number.)

mattdm
  • 6,550
  • 1
  • 25
  • 48
1

As I explained in my answer to How do I improve the performance of my Drupal site with a lot of concurrent users?, you need to tune Apache to your site (or in this case, your server). Ever server is unique, and you should never use a stock, out-of-the-box config. It takes time.

That said, I imagine that you've misinterpreted the amount of memory you have (and how your memory is handled on your server). Take a look at this Question (and the answers) on Meaning of the buffers/cache line in the output of free.

David W
  • 3,405
  • 5
  • 34
  • 61