0

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!

2 Answers 2

4

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.

0

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 :)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .