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'm wondering if in case of linux based web server, serving the same static files over and over again, adding RAM will improve read performance? It should probably add to size of page cache, and decrease number of disk seeks.
I have a server which hits almost 100% disk usage according to atop, and I'm looking for ways to improve i/o performance(random reads mostly) w/o replacing the whole machine. Also I would like to know if any configuration tweaks available to get better use of additional RAM for disk reads? Thanks!

share|improve this question

2 Answers 2

First you need to identify exactly what is wrong. Adding RAM, if you don't really need it, will not increase performance.

Run free -m to see if RAM is an issue. If you see that "mem" is almost exhausted and the buffers are also not large then get bigger ram. Otherwise I recommend using some sort of cache to improve the webserver performance. Have a look at Varnish. If budget is not tight, you can go for CDN as well.

share|improve this answer

Or if you are feeling brave, embrace the power of memcached. You can store the images,javascript,etc as cached objects in memcached. This will require a small php script to go grab the required objects from the cache. This will greatly increase performance as disk writes are minimized, plus now you can utilize the extra RAM you added to the server :)

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.