The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to work out if more RAM will likely improve the performance of a server?

Discussion in 'General Discussion' started by spaceman, Nov 15, 2006.

  1. spaceman

    spaceman Well-Known Member

    Joined:
    Mar 25, 2002
    Messages:
    481
    Likes Received:
    0
    Trophy Points:
    16
    Hi All,

    I'm considering adding more RAM to one of our servers. It's got 2Gb already. More RAM will reduce the need for swap memory (which is slow), so is it just a simple case of determining whether or not my server uses much swap - in which case adding more RAM will be a 'good thing', or is the analysis and decision process more complex than this?

    P.S. I'm running Munin Service Monitor on the server - perhaps there are obvious historical stats I should be looking for there that would help me determine whether more RAM is a good thing?
     
  2. ramprage

    ramprage Well-Known Member

    Joined:
    Jul 21, 2002
    Messages:
    667
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Canada
    The # top command will show you how much swawp and ram is availabe and in use, this should be a good starting point to see how much usage you have.
     
  3. nwilkens

    nwilkens Well-Known Member

    Joined:
    May 4, 2006
    Messages:
    59
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Monroe MI
    cPanel Access Level:
    DataCenter Provider
    Memory

    mnxsolutions:~ # free
    total used free shared buffers cached
    Mem: 4151836 3892284 259552 0 119564 3158728
    -/+ buffers/cache: 613992 3537844
    Swap: 2096472 8 2096464

    Notice Almost all memory is used (as shown in the used column). No memory is swapped in the used column.

    Linux attempts to use all memory for caches and buffering.

    This particular machine has 4GB memory and most of that memory is used for cache. This machine has plenty of memory available.

    Please paste the output of your free command, and I will analyze.

    Also, if you have sysstat utilities installed analyze the output of 'sar -r' and 'sar -B'.

    my sar -r output shows the following:

    20:47:01 kbmemfree kbmemused %memused kbbuffers kbcached kbswpfree kbswpused %swpused kbswpcad
    20:48:01 276664 3875172 93.34 119564 3158728 2096464 8 0.00 0
    20:49:01 276624 3875212 93.34 119564 3158728 2096464 8 0.00 0
    20:50:01 276288 3875548 93.35 119564 3158728 2096464 8 0.00 0
    20:51:01 272112 3879724 93.45 119564 3158728 2096464 8 0.00 0
    20:52:01 271912 3879924 93.45 119564 3158728 2096464 8 0.00 0
    20:53:01 271936 3879900 93.45 119564 3158728 2096464 8 0.00 0

    I am sure you can see how this information could help..

    Nick
     
  4. spaceman

    spaceman Well-Known Member

    Joined:
    Mar 25, 2002
    Messages:
    481
    Likes Received:
    0
    Trophy Points:
    16
    root@mercury [~]# free
    total used free shared buffers cached
    Mem: 2056320 1925376 130944 0 88296 399360
    -/+ buffers/cache: 1437720 618600
    Swap: 2040212 291124 1749088

    ... but this is when the server is under very low load.

    I think I've decided already to add some more RAM. Not very expensive, can't do any harm.
     
Loading...

Share This Page