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.

optimisation for mpm worker and mod_fcgi

Discussion in 'Workarounds and Optimization' started by swany, Oct 8, 2011.

  1. swany

    swany Member

    Joined:
    Sep 21, 2011
    Messages:
    23
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Website Owner
    whilst i await cPanel to integrate php-fpm (or manage to get it working, has anyone else managed it?)

    I am using mpm worker and mod_fcgi and found the default settings very quickly ate up all the ram through processes.

    I have a number of sites under different usernames which causes numerous problems with mod_fcgi due to each php process on each account spawning a new mod_fcgi process.

    Through reading up various other peoples configs i have arrived at the following.

    my current settings in pre virtualhost include are:

    <IfModule mpm_worker_module>
    ServerLimit 16
    StartServers 2
    MaxClients 300
    MinSpareThreads 5
    MaxSpareThreads 75
    ThreadsPerChild 25
    MaxRequestsPerChild 700
    TimeOut 45
    </IfModule>

    <IfModule mod_fcgid.c>
    FcgidMaxRequestsPerProcess 500
    FcgidMaxProcesses 360
    FcgidMaxProcessesPerClass 3
    FcgidMinProcessesPerClass 0
    FcgidConnectTimeout 30
    FcgidIOTimeout 300
    FcgidFixPathinfo 1
    FcgidIdleTimeout 30
    FcgidIdleScanInterval 10
    FcgidBusyTimeout 120
    FcgidBusyScanInterval 90
    FcgidErrorScanInterval 60
    FcgidZombieScanInterval 3
    FcgidProcessLifeTime 120
    </IfModule>


    This seems to work quite well for the front end of my wordpress sites, which i have cached via Varnish, but via the backend of wordpress i often have to wait until a ProcessLifeTime has been completed and fcgi can spawn a new process.

    I believe this setup is a waste in regards to using APC with php due to the fact that each site's opcode cache is located separate from the other sites opcode cache, and of course it only lives for 2 minutes at a time.

    The server has 8cores and 8gb of ram to play with. Ideally i would love to use php-fpm so each site can use the same opcode cache (it should help a lot considering every site is wordpress?) but my progress in using php-fpm has hit a brick wall.
     
  2. swany

    swany Member

    Joined:
    Sep 21, 2011
    Messages:
    23
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Website Owner
    no one has any suggestions on the optimisation?
     
Loading...

Share This Page