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.

Swap

Discussion in 'General Discussion' started by jaymc, Jul 29, 2005.

  1. jaymc

    jaymc Well-Known Member

    Joined:
    Jan 5, 2005
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    How come their is 9% Swap being used when only 37% memory has been consumed

    Server Load 3.83 (1 cpu)
    Memory Used 37.8 %
    Swap Used 9.78 %


    Is this normal ?
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    That output is meaningless outside of context. You'd either need to post the top lines of top or free within CODE tags.
     
  3. jaymc

    jaymc Well-Known Member

    Joined:
    Jan 5, 2005
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    00:01:55 up 3 days, 5:11, 1 user, load average: 4.93, 4.53, 4.78
    185 processes: 176 sleeping, 9 running, 0 zombie, 0 stopped
    CPU states: cpu user nice system irq softirq iowait idle
    total 44.1% 0.3% 4.5% 0.1% 0.3% 1.7% 48.5%
    Mem: 1540444k av, 1508960k used, 31484k free, 0k shrd, 27264k buff
    1175528k actv, 220488k in_d, 24288k in_c
    Swap: 2040244k av, 281212k used, 1759032k free 665136k cached

    PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND
    24719 nobody 15 0 14280 12M 2384 S 5.3 0.8 0:16 0 httpd
    12422 nobody 15 0 13244 11M 2260 S 3.3 0.7 0:15 0 httpd
    12415 nobody 15 0 15108 13M 2372 S 2.9 0.8 0:20 0 httpd
    12626 nobody 15 0 13752 12M 2364 S 2.9 0.8 0:14 0 httpd
    12420 nobody 15 0 13572 11M 2384 S 2.5 0.7 0:22 0 httpd
    7980 nobody 15 0 10688 9304 2264 S 1.9 0.6 0:01 0 httpd
    12455 nobody 16 0 13652 11M 2128 R 1.3 0.7 0:13 0 httpd
    12439 nobody 15 0 13012 11M 2252 S 0.9 0.7 0:17 0 httpd
    12432 nobody 15 0 13368 11M 2364 S 0.7 0.7 0:16 0 httpd
    12435 nobody 15 0 13676 11M 2256 S 0.7 0.7 0:18 0 httpd
    12584 nobody 15 0 13600 11M 2372 S 0.7 0.7 0:18 0 httpd
    10254 nobody 15 0 12768 10M 2256 S 0.7 0.7 0:13 0 httpd
    12408 nobody 15 0 13568 11M 2364 S 0.5 0.7 0:18 0 httpd
    12604 nobody 15 0 13692 11M 2376 S 0.5 0.7 0:15 0 httpd
    22666 nobody 15 0 12500 10M 2152 S 0.5 0.7 0:02 0 httpd
     
  4. kaosent

    kaosent Active Member

    Joined:
    Jul 12, 2005
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    6
    176 processes sleeping, and not active. I know that some OS's like FBSD pro-actively move inactive data to swap to ensure optimum memory capacity for the current running processes, this occurs even at low memory usage %'s. I would personally say that this is nothing to worry about and that the OS is just doing its job to ensure an efficient server, but which OS are you using? Are there any other anomalies other than swap usage?
     
  5. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    I agree. It could well be fine since you have a large cache usage, which is normal and that is usually depletable by the OS when more pages are required. The load average is somewhat high, though, but without a sort by process ID (unless that is what you have there, though it looks more like a sort by memory usage) then it's hard to tell. If kswapd is high on your process list, then you may have a problem.
     
  6. jaymc

    jaymc Well-Known Member

    Joined:
    Jan 5, 2005
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    is their a way to set it so that no SWAP is used unless memory reaches 60% for instance...
     
  7. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    No, memory managment doesn't work like that on Linux or any other OS that I'm aware of. Swap space (or page file space) is there for a purpose and if the memory management routines need to use it they will.
     
  8. jaymc

    jaymc Well-Known Member

    Joined:
    Jan 5, 2005
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    today at 5pm
    Server Load 6.70 (1 cpu)
    Memory Used 40.7 %
    Swap Used 14.03 %


    11pm
    Server Load 41.05 (1 cpu)
    Memory Used 55.8 %
    Swap Used 85.17 %


    the 85% SWAP is causing the high server load, is their any way to sort this out... relitively speaking id prefer no SWAP since i have 1.5GB RAM

    Swap Used 85 % just isnt normal
     
    #8 jaymc, Aug 2, 2005
    Last edited: Aug 2, 2005
  9. mher

    mher Well-Known Member

    Joined:
    Jun 14, 2004
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    6
    try:

    #swapon
    #swapoff
    #swapon
     
Loading...

Share This Page