Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Current set up;

I have a single dedicated server running a web site (it's a lamp stack forum)

  • OS : CentOS
  • CPU : Dual 3.2Ghz Quad-core Xeons
  • RAM : 40GBs (10x4GB DIMMs)
  • Storage : Software RAID1 with 2x 7.2k SATAII 500GB HDD
    • The forum MySQL DB is around 10GBs
    • The web root is around 1.5GBs (mostly user uploaded pictures)

I want to tune the server as much as I can to use the hard disks as little as possible. I feel they are the Achilles heal here. No funds are available for any hardware changes so I have been exploring software performance enhancing options.

Proposed additions;

I have done some reading about Varnish and memcached. The PHP forum has support for memcached (The vendors provide instructions for enabling it in the configuration files) so I should be able to install and use that. I figure I can bind Apache2 to the loopback/127.0.0.1 interface instead of its public facing interface and install varnish binding it to the public facing interface passing requests back to Apache on 127.0.0.1.

I will likely start separate questions about Varnish and memcached later about their technical configuration, for now I am after input on this as a design idea. This all sounds like reasonable logic to me, but is it in fact a bonkers approach? Many people use both of these caching packages with great success, is it likely they will lift demand on the hard disks in this situation? If not, what else should I be looking at?

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

It depends on what kind of website you're running and what kind of software you're using on this server. If there're many requests for static content then varnish/nginx can really help reduce the use of system resources (CPU/RAM). If it's possible to cache DB queries then memcached can help as well (assuming you want to do some coding yourself). You might still want to check out the new version of Apache (2.4), because event MPM now uses the same technique for handling requests as nginx/varninsh (while it's still slower and uses more resources than nginx/varnish it's a great improvement from apache 2.2).

share|improve this answer
    
Some great info here, thanks! I have installed Varnish and Memcached and so now I need to open a couple of seperate questions about those. I will also attempt the new apache 2.4, cheers! –  jwbensley Nov 14 '12 at 17:00
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.