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.

Server Not Loaded But Swapping

Discussion in 'General Discussion' started by aisagtr, Oct 31, 2007.

  1. aisagtr

    aisagtr Guest

    We have a Core2Duo 2.2 and the stats are as follows:

    Cpanel 11 Stable on CentOS 5

    Our server load is normally 0.7 (2 cpus)
    Memory usage is 20%

    We have never experienced any spike in load but our SWAP is always at 5% to 10%

    This is very weird as we have enough RAM.

    What could be the cause, please?

    HTTPD.CONF is setup as follows:

    Keepalive = Off
    MinServers = 38
    MaxServers = 58
    StartServers = 88
    Max Clients = 256

    MaxRequestsPerChild = 10,000
     
    #1 aisagtr, Oct 31, 2007
    Last edited by a moderator: Oct 31, 2007
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Note that not all OSs/distros will wait for physical RAM to be filled before using swap.

    A technique employed in some environments is that the OS determines what is likely to only be used on rare occasion and throw that into swap (even if physical RAM is available). This leaves physical RAM available should it need to all be used very quickly. Also, it eliminates the need to move this stuff to swap at a later time (likely when the system is under more strain) as it is already in swap.

    So it doesn't necessarily mean anything is wrong :). I understand myself, I like to have as much stuff in physical RAM as I can due to improved I/O performance. I got annoyed when I started putting tons of RAM in my systems and saw available physical RAM when swap was being used. Now that I understand why that happens, I have a tendency to agree with how some Operating Systems allocate swap vs. physical RAM.
     
  3. aisagtr

    aisagtr Guest

    Thanks!

    Most informative but it does slow the server down somewhat?
     
  4. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    From a theoretical perspective, I would assume there is some slowdown. However, in practice I haven't noticed a performance hit large enough for me to notice. Then again, if something goes from being rarely used to being frequently used (or vice versa), the OS typically will adjust things accordingly.
     
  5. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    During the initial setup of your server, how many Memory RAM do you have on your server, and how many MBs did you assign to SWAP?
     
  6. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,448
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    May be no help at all, but I posted to this thread a while back about mod_security.

    http://forums.cpanel.net/showthread.php?t=71838&highlight=mod_security

    I had seen some load and swapping when I didn't think there should have been and tracked down the comments at gotroot. (linked from that thread above) I played around with my rulesets and was able to eliminate the swapping I had.

    YMMV
     
Loading...

Share This Page