Help tuning apache MaxClients, KeepAlive

Discussion in 'Apache' started by kuszeras, Feb 8, 2012.

  1. #1
    Hi,

    I want to tune my Apache server. How about MaxClients vs RAM?

    I have VPS with 1.2GB of RAM. What MaxClients is recommended? My site is in my footer so pattern of usage is:
    - a lot of connections but rather quick and not too much data to transfer (currently i have keepalive with 2 secs timeout)
    - small images (I turned mod_expire to cache them)

    What do You suggest. I know I can optimise my scripts further and will do, but any other ideas would be welcome :).

    Cheers
     
    kuszeras, Feb 8, 2012 IP
  2. ideamine

    ideamine Member

    Messages:
    83
    Likes Received:
    2
    Best Answers:
    2
    Trophy Points:
    28
    #2
    Hi,

    I would prefer the values below as per your requirement but at the end of the days its your choice :) I would suggest do some experiments with this value to find the best one for your need :D
    ServerLimit 256
    MaxClients 256
    MaxRequestsPerChild 4000
     
    ideamine, Feb 8, 2012 IP
  3. kuszeras

    kuszeras Active Member

    Messages:
    326
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    61
    #3
    Why have You lowered the limits?
     
    kuszeras, Feb 9, 2012 IP
  4. ideamine

    ideamine Member

    Messages:
    83
    Likes Received:
    2
    Best Answers:
    2
    Trophy Points:
    28
    #4
    If ServerLimit is set to a value much higher than necessary, extra, unused shared memory will be allocated. The MaxClients directive sets the limit on the number of simultaneous requests that will be served. Any connection attempts over the MaxClients limit will normally be queued. Since you said that your site loads rather quick and not too much data to transfer, these values are good.
     
    ideamine, Feb 9, 2012 IP