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 at 90 %

Discussion in 'Workarounds and Optimization' started by AlexCl, Feb 20, 2013.

  1. AlexCl

    AlexCl Active Member

    Joined:
    Feb 19, 2013
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Hello,

    I'm seeing swap used at 90% while the server has almost 9 GB of ram free. Does anyone have any idea what can cause this and how to solve it ? I'm using Cloudlinux and Cpanel, around 60 websites on the server, half of the websites are joomla driven.

    Thanks.
     
  2. selberkani

    selberkani Member

    Joined:
    Jan 17, 2013
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello Alex,

    Don't want to hijack your thread but could you please post the output of this command:
    Code:
    # free -m
    I think I have a similar issue. The command is to confirm you do have RAM free. On my server swap is also filling up when I do have enough memory.

    Thanks
     
    #2 selberkani, Feb 20, 2013
    Last edited: Feb 20, 2013
  3. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,476
    Likes Received:
    202
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Poorly coded, out of date scripts being hit by attackers can do this.
     
  4. selberkani

    selberkani Member

    Joined:
    Jan 17, 2013
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
  5. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,476
    Likes Received:
    202
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    He's already answered that, in the first post:

    Experience is my data and information.
     
  6. selberkani

    selberkani Member

    Joined:
    Jan 17, 2013
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    You do have a lot of experience so I'll give you the benefit of the doubt :) I have been reading a lot about this and what I'am reading is that the swap can be part of a healthy system it all depends on how much RAM memory you have. This is my output:
    Code:
    # free -m
                 total       used       free     shared    buffers     cached
    Mem:         63847      63153        693          0       4258      49577
    -/+ buffers/cache:       9317      54529
    Swap:         2047        647       1400
    
    My swap partition is too small according to Centos documentation. I'am guessing AlexCi also has the same issue as me were the swap partition is too small?? Am I correct in this assumtion?

    Other useful documentation:
    Why (on Linux) am I seeing so much RAM usage?
    Linux ate my RAM!
    Linux Memory Management or 'Why is there no free RAM?
     
    #6 selberkani, Feb 20, 2013
    Last edited: Feb 20, 2013
  7. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,476
    Likes Received:
    202
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Now who's jumping to conclusions? :p

    The docs might be helpful:
    Recommended partitions - cPanel Documentation

    I assume they would be helpful when I saw this in your post:
    Code:
    Swap:         2047        647       1400
     
  8. AlexCl

    AlexCl Active Member

    Joined:
    Feb 19, 2013
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Hello,

    Sorry for the late reply, I forgot to tick the email notification box.

    Here's the output from free -m:
    Code:
     free -m
                 total       used       free     shared    buffers     cached
    Mem:         15851      14969        882          0        568       6955
    -/+ buffers/cache:       7445       8406
    Swap:         4047       3669        378
    
     
  9. AlexCl

    AlexCl Active Member

    Joined:
    Feb 19, 2013
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Thanks for your reply Infopro. I'm also using Cloudlinux - shouldn't it be limiting the maximum amount of RAM that a single user can allocate?
     
  10. cPanelKurtN

    cPanelKurtN Well-Known Member
    Staff Member

    Joined:
    Jan 29, 2013
    Messages:
    95
    Likes Received:
    1
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    You can use 'lvectl' to manage both virtual and physical memory limitations.
     
  11. AlexCl

    AlexCl Active Member

    Joined:
    Feb 19, 2013
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Hello everyone,

    I have the solution ( thanks to Igor and the incredible people at Cloudlinux ). Apparently it's a common problem with fcgi and can be avoided by just adding a cron job. To read a bit more about it and hw to fix it check this link:

    Orphaned PHP processes and FCGID

    Hope this is useful for anyone else out there having the same issue.

    All the best to you guys.
     
Loading...

Share This Page