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 clean swap? it shows 97% full

Discussion in 'General Discussion' started by mher, Feb 18, 2006.

  1. mher

    mher Well-Known Member

    Joined:
    Jun 14, 2004
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    6
    in my server status. swap shows 97% full. how can i clean it?? server load is normal though.
     
  2. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    867
    Likes Received:
    9
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    A reboot is the only way to clear it.
     
  3. 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, it is not - there is no need to reboot a server unless you're upgrading the kernel and other exceptional circumstances.

    You need to find out why the swapfile usage is so high. You can start by using top and sorting by memory usage by pressing <shift-m>. Typically, swapfile usage rockets if you:

    1. Have runaway processes consuming memory ad infinitum

    2. Have too much load on your server which results in memory thrashing (too many processes chasing too little memory)

    3. Processes running that have memory leaks

    Most of those can be fixed by restarting the offending processes. Typically:

    httpd
    mysql
    named

    Perfomance tuning is somewhat of an art, but simply rebooting is a bad idea as it simply delays the problem recurring without fixing anything.
     
Loading...

Share This Page