Server upgraded but still very poor performance!

Discussion in 'CGI/Perl/Python' started by mks, Feb 11, 2012.

  1. mks

    mks Member

    Old setup:
    Q9550 (4 threads)
    8GB RAM
    Web Frontend + MySQL
    2CPU LSWS enterprise license

    New setup:
    Q9550 (4 threads)
    8GB RAM
    Dedicated MySQL server
    2CPU LSWS enterprise license

    3930K (12 threads)
    32GB RAM
    Dedicated Web Frontend server
    2CPU LSWS enterprise license

    I am seeing barely any difference in performance increase.
    Example: Req/second about 90/second (Req in processing 400/second)
    This is nearly the same as the previous setup. How is this possible?
    Still takes 15-20 seconds to load the site despite the increased CPU.
    Disk I/O is under 5 at all times.

    And can LSWS staff give me the appropriate figures for the 32GB RAM server:
    Memory I/O Buffer

    Connection Timeout (secs)
    Max Keep-Alive Requests
    Keep-Alive Timeout (secs)
    Max Cached Small File Size (bytes)
    Total Small File Cache Size (bytes)
    Max MMAP File Size (bytes)
    Total MMAP Cache Size (bytes)
    AIO Block Size

    Max Request URL Length (bytes)
    Max Request Header Size (bytes)
    Max Request Body Size (bytes)
    Max Dynamic Response Header Size (bytes)
    Max Dynamic Response Body Size (bytes)

    Max Static File Size (bytes)
    Min Static File Size (bytes)

    Static Requests/second
    Dynamic Requests/second
    Connection Soft Limit
    Connection Hard Limit
    Grace Period (sec)
    Banned Period (sec)

    Max CGI Instances
    CPU Soft Limit (sec)
    CPU Hard Limit (sec)
    Memory Soft Limit (bytes)
    Memory Hard Limit (bytes)
    Process Soft Limit
    Process Hard Limit
  2. NiteWave

    NiteWave Administrator

    this is too slow. is the homepage only or other pages as well?

    should figure out the bottle-neck of your server first.

    for those parameters, actually the default settings already being optimal.
    32G memory will be fully utilized by OS as disk file cache.
  3. mks

    mks Member

    This is for any page of the site.

    How can I increase Req/second? Does increasing Max CGI Instance help? I should not be seeing 100 Req/second (400 in processing) with this powerful server.

    On the old setup, I would see 100 Req/second (400 in processing) load is 40.

    New setup, I still see 100 Req/second (400 in processing) but load is 2.

    Although the load is low, the website still loading slow due to so many stuck in processing. What settings can be changed to increase the 100 Req/second to take full advantage of my server?
  4. NiteWave

    NiteWave Administrator

    can you paste "Real-Time Stats" here
  5. mks

    mks Member

    I tracked down the issue to MySQL so now it seems to be running a lot better.
    Please check my settings and realtime stats. I want to optimize for 2CPU license.
    This is for server with 3930K 6 physical core + 6 HT, 32GB RAM, dedicated web server.

    And I need to know how to whitelist certain IPs, I see this:
    Allowed List

    I have many IP to whitelist, they keep getting blocked in anti-ddos until I raised the dynamic requests limit.
    I want to whitelist for example and, please tell me exact lines I need to put.
    And the old setup/old server I don't need LSWS on it anymore since it is only MySQL server?
  6. NiteWave

    NiteWave Administrator


    can't view the attached images.

    -- Trusted IP or sub-network must be specified in the Allowed List by adding a trailing "T"
    so it is
  7. mks

    mks Member

  8. webizen

    webizen Well-Known Member

    1. You should disable per client throttling (set static req/sec AND dynamic req/sec => 0; connection limit (soft/hard) => 10000).
    2. paste your lsphp5 ext app settings here.
    3. increase Max CGI instance would NOT help.
    4. php suEXEC set to 10 (good for most setup). increase it if you have very busy traffic (not in your case).
  9. mks

    mks Member

    I disabled that now and changed to 10000. Server only used for 1 website using exclusively CGI only. No PHP at all except the webmail/phpmyadmin. Is there anything else I can do for increasing req/sec? 2 CPU license is enough for this server or do I need more?
  10. webizen

    webizen Well-Known Member

    do you know how much traffic volume (req/sec) of your site is supposed to be? do your cgi scripts talk to database? is your database ok to handle the traffic? does your cgi script take a long time to finish? if web server is not the bottleneck (like in your case), no matter how fine tune it is, it would not make much difference.

    what are those stuck in processing? cgi scripts?
  11. mks

    mks Member

    I don't know how many req/sec it is supposed to process. I saw sometimes 100 req/sec and 400 in processing, so it should be able to process more req/sec so that there wouldn't be 400 in processing making the site load so slow. When the in processing is low, the site can load in under 1 second, so I don't think the CGI script take a long time to process.

    The server is running very smooth now since I tracked down the issue to MySQL.

    Is there anything else I need to do to improve req/sec?

Share This Page