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.

Looking for advice to tune Apache MPM worker

Discussion in 'Workarounds and Optimization' started by kernow, Sep 16, 2012.

  1. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    865
    Likes Received:
    9
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Hi,
    We recently tried switching one of our servers over from the default MPM prefork to worker. The savings in memory were really surprising but we have no experience of tuning with worker. Can anyone give us a rough idea of any changes we could make to the default worker setting? This server has 8 cores and 12GB ram also running varnish. The defaults are:
    Code:
    <IfModule mpm_worker_module>
        StartServers          2
        MinSpareThreads      25
        MaxSpareThreads      75 
        ThreadLimit          64
        ThreadsPerChild      25
        MaxClients          150
        MaxRequestsPerChild   0
    </IfModule>
     
  2. Sannin

    Sannin Active Member

    Joined:
    May 19, 2011
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    You maybe want to raise the MaxClients directive. With that amount of Ram you can have at least 500 concurrent requests, although its very hard to reach that number considering you run varnish too.
     
  3. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    865
    Likes Received:
    9
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Hi Sannin,
    Thanks for that. Was wondering if MaxRequestsPerChild really should be 0 ?
     
  4. Sannin

    Sannin Active Member

    Joined:
    May 19, 2011
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    That means that every thread can serve an unlimited number of requests. You can set a number there (i have set 10000 in my configuration), in case of a memory leak.
     
  5. albatroz

    albatroz Well-Known Member

    Joined:
    Mar 6, 2003
    Messages:
    258
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Virtual Orbis / Peru
    cPanel Access Level:
    Root Administrator
    Hi @kernow are you using varnish too?
     
Loading...

Share This Page