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.

mpm_worker memory issue

Discussion in 'Workarounds and Optimization' started by srpurdy, Nov 23, 2012.

  1. srpurdy

    srpurdy Well-Known Member

    Joined:
    Jun 1, 2011
    Messages:
    101
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    I've never actually used worker before until recently. Since I been hearing good things about it, like the fact it uses memory better. But after testing this. I went from using like 200-300 MB of memory on a server to using over 1GB just from apache. So my experience is worker is using more memory. I wanted to scale the system a bit better as the traffic on this box keeps going up. Maybe someone can explain to me what could cause that. I had a VIRT memory size of 2GB! each RES size around 80MB which was 20MB more than perfork (I run mod_security rules so this is a normal size for the RES column)

    I'm thinking maybe serverlimit setting has something to do with it? I know I should do more research. :)
     
  2. HSN-Saman

    HSN-Saman Member

    Joined:
    Jan 11, 2013
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    DataCenter Provider
    MPM worker is great , so faster than MPM prefork and it uses less resources.
    what's the configuration you set for MPM worker ?

    I hope you have done the configuration for MPM Prefork and Serverlimit is not set to 150 which is by default for MPM Prefork ...
     
  3. srpurdy

    srpurdy Well-Known Member

    Joined:
    Jun 1, 2011
    Messages:
    101
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Actually I did solve this, and I should have updated this thread. It was cause I had the limit way too high, and your right it does work quite well. :)
     
  4. LeadDogGraphics

    LeadDogGraphics Well-Known Member

    Joined:
    Feb 25, 2012
    Messages:
    97
    Likes Received:
    1
    Trophy Points:
    8
    Location:
    West Palm Beach, FL
    cPanel Access Level:
    Root Administrator
    Would you please advise which configuration settings you adjusted and what your new limits are. I have played with Worker in the past and found it not to be low on resources but I am sure I had it set wrong, so I would like to know what you did to help out.
     
  5. srpurdy

    srpurdy Well-Known Member

    Joined:
    Jun 1, 2011
    Messages:
    101
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    I ran settings like this.

    <IfModule worker.c>
    StartServers 2
    MaxClients 40
    MinSpareThreads 5
    MaxSpareThreads 20
    ThreadsPerChild 20
    ServerLimit 4
    MaxRequestsPerChild 1000
    ThreadStackSize 163840
    </IfModule>

    If you put a really high ServerLimit your going to use a lot of memory, but this configuration was for a 1GB server with mod_security rules, and it's 64Bit so you can run higher settings depending on how much memory you have.

    Memory was still a bit limited on this specific server as mysql was using quite a bit too. So just depends on what else your running.
     
  6. LeadDogGraphics

    LeadDogGraphics Well-Known Member

    Joined:
    Feb 25, 2012
    Messages:
    97
    Likes Received:
    1
    Trophy Points:
    8
    Location:
    West Palm Beach, FL
    cPanel Access Level:
    Root Administrator
    When I switched away from Worker, i went to Mod_Ruid2 because it was the only real way to get APC to play nice with PHP, which has been good, but there are questions about it's future and since cPanel has yet to get the .97 version of it running despite it being out for about a year, I wonder if it has any real future.

    So I have been contemplating going back to a setup with Worker, FastCGI and APC. I may play with this, I have a 8 core 16GB ram server, so I have a bit more room to play but those numbers will give me a starting point. Thanks.
     
Loading...

Share This Page