Question About Optimization Formula

Discussion in 'Install/Configuration' started by semprot, Jul 21, 2014.

  1. semprot

    semprot Member


    I want to ask formula about relationship between :
    • PHP suEXEC Max Conn
    • Max Connections
    • Max SSL Connections
    • Max Keep-Alive Requests
    • External App for PHP 5 >> Max Connections
    For example "PHP suEXEC Max Conn" must be less than "Max Connections", "External App for PHP 5 >> Max Connections" should be less than "Max Connections"?
    Can you please help me.

    Thank you.
  2. Michael

    Michael Administrator Staff Member

    Hi Semprot,

    The first thing I should say is that LSWS's default settings are already optimized for most uses. We do not advise changing the default settings unless you have a good reason. You are unlikely to get better performance in most cases.

    Let's go over what each of these settings controls first. I think it will be pretty easy to understand once we've review that.
    • PHP suEXEC Max Conn: Number of PHP processes per user when PHP suEXEC is on.
    • Server>> Max Connections: Number of concurrent connections (of any kind) LSWS can accept.
    • Max SSL Connections: Number of concurrent SSL connections LSWS can accept.
    • Max Keep-Alive Requests: Number of keep-alive requests LSWS can accept.
    • External App for PHP 5 >> Max Connections: Number of connections LSWS can establish with the PHP engine. (Remember that the PHP engine is separate from LSWS.)
    The first thing to notice: The "connections" talked about in the PHP settings and the server settings are two different things. The PHP setting "connections" are how many connections LSWS can establish with the PHP engine (i.e. how many processes it can start).

    So, starting with the server settings, the biggest number should be Server>> Max Connections. If you have Max SSL Connections set higher than Server>> Max Connections, it won't matter. You'll never reach 2500 SSL connections if you can only have 2000 connections of any kind. Both SSL connections and keep-alive requests take more resources, so you'll probably want to limit them more than regular connections. Thus the algorithm is: Server>> Max Connections > Max Keep-Alive Requests >= Max SSL Connections.

    For the PHP settings, see this wiki we recently published:


    eva2000 and semprot like this.
  3. semprot

    semprot Member


    Thank you for the detailed answer :)

Share This Page