Welcome to WebmasterWorld Guest from

Forum Moderators: bakedjake

Message Too Old, No Replies

Upgrading RAM from 2GB to 4 GB on CentOs


4:41 pm on Jun 25, 2010 (gmt 0)

Full Member

10+ Year Member

joined:Dec 27, 2006
votes: 0

I have a dedicated server with Cent OS and 2 GB RAM. When i have a lot of visits server is working slow. MySql interogations in database are high resources consumer.

If i upgrade at 4 GB RAM will help me,server will use 4 GB RAM?

(another step will be to optimize the script but this is another task).
6:21 am on June 26, 2010 (gmt 0)

Senior Member from KZ 

WebmasterWorld Senior Member lammert is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Jan 10, 2005
votes: 24

In general adding RAM will help performance, but it is good to know where the actual bottleneck is. MySQL execution can also be slow due to insufficient indexes, and adding extra RAM will only marginally help in that case.

You should also know that adding 2GB of RAM to your server doesn't make 4GB usable memory on a 32 bit Linux distribution. In practice only 3GB will be available due to mapping of hardware devices to parts of the addressable memory space.
9:05 am on June 26, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:June 17, 2002
votes: 6

Just putting in the extra ram will mostly improve file caching which may or may not improve your db performance.

You may need to change some parameters in my.cnf to get the best out of the memory.

download and run mysqltuner.pl and it will tell you which parameters need tuning. It's not perfect but it will give you a good idea on what you need to concentrate on.