Apache Worker MPM configuration help required

Discussion in 'Site & Server Administration' started by ravemittal, Dec 25, 2012.

  1. #1
    We are currently on Amazon EC2 on Medium Instance. We wanted to know if our Apache Worker MPM configuration is correct or do we need to tweak this to best suit our requirement:

    Server Configuration:
    Intel(R) Xeon(R) CPU E5430 @ 2.66GHz, 2 cores
    8 GB Ram
    OS: Ubuntu Linux 12.04.1
    Kernel & CPU: Linux 3.2.0-31-virtual on x86_64

    Apache Worker MPM configuration:
    <IfModule mpm_worker_module>
    StartServers 5
    MinSpareThreads 5
    MaxSpareThreads 10
    ThreadLimit 64
    ThreadsPerChild 25
    ServerLimit 688
    MaxClients 688
    MaxRequestsPerChild 10000
    </IfModule>

    KeepAlive Off
    KeepAliveTimeout 5
    TimeOut 300

    Traffic on the server:
    Almost 1000 processes running (High traffic)
    600 processes (Normal traffic)
    No. of Users online:
    150-160 (High traffic)
    90-100 (Normal traffic)

    MySQL CPU usage is around:
    90-100% (high traffic)
    40-50% (normal traffic)

    Could anyone recommend the best possible configuration for Worker MPM. What could be an ideal Max. Clients?

    Do we also need to tweak the MySQL settings?
     
    ravemittal, Dec 25, 2012 IP
  2. zacharooni

    zacharooni Well-Known Member

    Messages:
    346
    Likes Received:
    20
    Best Answers:
    4
    Trophy Points:
    120
    #2
    The above is rated for a server between 8-16GB RAM. Also, MySQL require constant optimization if you want it to be truly optimized for your server. You may want to look at enabling query_cache and setting query_cache_type=1 among other settings. This will also depend on how your application queries your database, and whether your tables are indexed properly.
     
    zacharooni, Dec 26, 2012 IP
  3. VinCme

    VinCme Well-Known Member

    Messages:
    325
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    125
    #3
    There is no way to get you the best configuration just by knowing your server's specification, we must see Apache Status Log for the past few days, how many RAM is available from the 8 GB and some other things. Do yourself a big favor by hiring a knowledgeable System Administrator to do this
     
    VinCme, Dec 26, 2012 IP
    komrad likes this.