Closed Thread
Results 1 to 10 of 10

Thread: High Swap Load

  1. #1
    b& talence is an unknown quantity at this point
    Join Date
    Jun 2004
    Location
    Bangladesh
    Posts
    251

    High Swap Load

    I m having High swap used in the server. Actually the one where i m having high swap used is a vps. How can i clear the swap files in CentOS 4.2?

    Thanks.

    Regards

  2. #2
    Always moving.. James is a glorious beacon of lightJames is a glorious beacon of lightJames is a glorious beacon of lightJames is a glorious beacon of lightJames is a glorious beacon of lightJames is a glorious beacon of light
    Join Date
    Oct 2004
    Location
    London, UK
    Posts
    1,963
    It's just pure lack of memory. Perhaps a memory leak, or simply overload of your VPS of what it can handle.

    Clearing swap isn't going to help you if it's an overload. Because it will happen again very soon. To clear, restart VPS.
    I am cooking up some projects...

  3. #3
    Pro Member ingfina is an unknown quantity at this point
    Join Date
    Sep 2005
    Posts
    353
    How much RAM do you have and what do you run on it? ouput of 'top -c' and 'ps waux' is usually a good start.

  4. #4
    b& talence is an unknown quantity at this point
    Join Date
    Jun 2004
    Location
    Bangladesh
    Posts
    251
    Quote Originally Posted by James
    It's just pure lack of memory. Perhaps a memory leak, or simply overload of your VPS of what it can handle.

    Clearing swap isn't going to help you if it's an overload. Because it will happen again very soon. To clear, restart VPS.
    Actually my vps is not having high load. About 1 - 2 server load. Ram usage is about 60% but swap usage is raising day by day. Now it is 86%

    And thanks for that suggestion. When i restart my vps it reduce the swap usage, but within 6-8 hours it get again high swap usage. Is that mean i need memory upgrade?

    Regards

  5. #5
    Always moving.. James is a glorious beacon of lightJames is a glorious beacon of lightJames is a glorious beacon of lightJames is a glorious beacon of lightJames is a glorious beacon of lightJames is a glorious beacon of light
    Join Date
    Oct 2004
    Location
    London, UK
    Posts
    1,963
    Quote Originally Posted by talence
    Actually my vps is not having high load. About 1 - 2 server load. Ram usage is about 60% but swap usage is raising day by day. Now it is 86%

    And thanks for that suggestion. When i restart my vps it reduce the swap usage, but within 6-8 hours it get again high swap usage. Is that mean i need memory upgrade?

    Regards
    Yes, or take the memory hogging account/s off the server.
    I am cooking up some projects...

  6. #6
    b& NetCafe is an unknown quantity at this point NetCafe's Avatar
    Join Date
    Jul 2005
    Location
    Hong Kong
    Posts
    1,873
    When your memory runs off, swapping comes in.

  7. #7
    b& talence is an unknown quantity at this point
    Join Date
    Jun 2004
    Location
    Bangladesh
    Posts
    251
    Quote Originally Posted by NetCafe
    When your memory runs off, swapping comes in.
    I m confused now. I contacted with my DC and they cleared my swap memory. Now it is 47%, i didn't upgrade memory even.

    Note: I m housed with SAVVIS.

    I m just curious to know how this can be done.

    Regards

  8. #8
    b& NetCafe is an unknown quantity at this point NetCafe's Avatar
    Join Date
    Jul 2005
    Location
    Hong Kong
    Posts
    1,873
    Swap is your hdd space and nothing to do with physical ram being "reboot" or what nots.

    When your ram is used up, the system begings to use swap, like virtual memory in windows?

  9. #9
    Always moving.. James is a glorious beacon of lightJames is a glorious beacon of lightJames is a glorious beacon of lightJames is a glorious beacon of lightJames is a glorious beacon of lightJames is a glorious beacon of light
    Join Date
    Oct 2004
    Location
    London, UK
    Posts
    1,963
    Again, clearing swap only temporarily fixed the problem, when the processes come back you'll face the same situation again. Only a matter of time.

    Ram 60 percent / Swap 50 percent is still too high to my taste.
    I am cooking up some projects...

  10. #10
    b& talence is an unknown quantity at this point
    Join Date
    Jun 2004
    Location
    Bangladesh
    Posts
    251
    Quote Originally Posted by James
    Again, clearing swap only temporarily fixed the problem, when the processes come back you'll face the same situation again. Only a matter of time.

    Ram 60 percent / Swap 50 percent is still too high to my taste.
    the system begings to use swap, like virtual memory in windows?
    Correct. Same thing, and it is certainly ease to know that we dont add virtual memories like RAM Lol. But actually Swap Memory depends on the swap files reduction of coursely. (Same like Windows) Again, currently running process make the swap memory load. So its quite like if you get low swap memory used, but high physical memory used, no matter, your server will not be hung easily. But high swap makes problem.

    Ram 60 percent / Swap 50 percent is still too high to my taste.
    Its still not high. As if you use 95% of your RAM and getting 50% swap your server will not hang, some process might get stopped because of lack memory. But if you get high swap like 80-90% then it is risky of course.

    Again, clearing swap only temporarily fixed the problem, when the processes come back you'll face the same situation again. Only a matter of time.
    Swap files depend on the cache system of your server softwares and the sites you are using. Usually blogs, forums, CMS lots people use caches. Like Vb uses more cache then IPB and PHPBB. On Blog Wordpress uses high. All this cache when get saved then load the swap. And its a big process depends on your HDD space as Netcafe said. If you are having 40% swap and getting swap cleared, then you certainly for about 25-30 days will be free may be your server having Vb or Wordpress hosted.

    Regards

Closed Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts