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

I just upgraded my RAM on my server from 4 GB to 16GB, I have 2x Dual Core 2.4 Ghz processors and would like to utilize that extra RAM if possible to setup some additional caching, or just anything that I can do. I only use this server to serve web sites, nothing special. I'd like the server to be able to handle as much load as possible... what would you recommend?

update

I should say that I'm running Ubuntu in a LAMP environment.

share|improve this question

migrated from stackoverflow.com Nov 5 '10 at 19:56

This question came from our site for professional and enthusiast programmers.

    
1, let the OS handle it - 2, ask on serverfault –  Martin Beckett Nov 5 '10 at 19:53
    
1) What OS is the server running? 2) Are you a developer who controls the web apps on your server? 3) What technology stacks do the web apps run? –  John Bledsoe Nov 5 '10 at 19:53
    
Have you run any performance monitors to determine your bottlenecks? –  Babak Naffas Nov 5 '10 at 19:54
    
What services are you running? Assuming it's a LAMP configuration there are multiple guidelines for explicit specification of alloted RAM. The web service doesn't need all that much, though your database should. –  Mikhail Nov 5 '10 at 19:54
    
Either give your database more memory for caching, or install memcache and use it to cache everything possible in your applications. For details, ask on ServerFault. –  Ben Lee Nov 5 '10 at 19:56

2 Answers 2

up vote 0 down vote accepted

Your use case will determine your mileage from each of the following, though I think they're in order of bang-for-buck:

1) Database: Mysql has lots of different cache parameters, and you can get a lot of extra db performance by getting them just right. The thing is, it's different for every app. One helpful tool here is mysqltuner.

2) Bytecode: Most PHP accelerators (APC, XCache, eAccellerator) cache bytecode in memory, which speeds up your PHP execution by skipping the compilation step. This probably won't use too much RAM, but it's a good step if you're looking to increase performance. Some of these also let you access a shared cache through code.

3) App: You could choose one of the accelerators that offers explicit app cache, and Memcached also does this very well. The problem with this is that you have to write your app to take advantage of it. This can be really nice, but expensive (dev time), so make sure you profile first.

share|improve this answer

No doubt the best way to utilize the additional memory is by playing with the MySQL setings.

Assuming your "P" in LAMP stands for PHP (not Perl or Python) don't forget to change your php.ini settings so the PHP script will be able to occupy more RAM.

share|improve this answer

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.