Welcome to Centmin Mod Community
Become a Member

Nginx Thread Pools in NGINX Boost Performance 9x!

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by rdan, Aug 31, 2015.

  1. rdan

    rdan Well-Known Member

    5,447
    1,408
    113
    May 25, 2014
    Ratings:
    +2,201
    Local Time:
    12:06 PM
    Mainline
    10.2
    Why Centminmod doesn't have this added by default? :)
    Boosting NGINX Performance 9x with Thread Pools
    Code:
    # in the 'http', 'server', or 'location' context
    aio threads;
    I just added it on my nginx.conf under http block :).

     
  2. pamamolf

    pamamolf Premium Member Premium Member

    4,086
    428
    83
    May 31, 2014
    Ratings:
    +834
    Local Time:
    6:06 AM
    Nginx-1.25.x
    MariaDB 10.3.x
    Can you please post a sample of the code that you added and did you use any parameters for settings for thread pools?
     
  3. rdan

    rdan Well-Known Member

    5,447
    1,408
    113
    May 25, 2014
    Ratings:
    +2,201
    Local Time:
    12:06 PM
    Mainline
    10.2
  4. pamamolf

    pamamolf Premium Member Premium Member

    4,086
    428
    83
    May 31, 2014
    Ratings:
    +834
    Local Time:
    6:06 AM
    Nginx-1.25.x
    MariaDB 10.3.x
    Ok great thanks :)

    I was ask for a sample as i thought that you used custom values for threads that's why :)

    Anyway it is great and i hope George will do some magic so we will be able when we enable it to get some stats for each pool from ssh like php pools:

    Code:
    lynx --dump  http://127.0.0.1/phpstatus
    
    pool:  www
    process manager:  static
    start time:  28/Jun/2012:21:24:51 +0400
    start since:  75
    accepted conn:  196
    listen queue:  0
    max listen queue:  0
    listen queue len:  0
    idle processes:  4
    active processes:  1
    total processes:  5
    max active processes: 1
    max children reached: 0
    PHP Status explained:
     
  5. eva2000

    eva2000 Administrator Staff Member

    54,857
    12,238
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,809
    Local Time:
    2:06 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Doesn't apply to all situations and is system hardware environment specific as not all servers will have sufficient resources to feed the threads

    Don't believe there's any stats for these thread pools either

    Centmin Mod Nginx is compiled with threads support enabled Core functionality

     
    Last edited: Aug 31, 2015
  6. upgrade81

    upgrade81 Member

    295
    17
    18
    Sep 5, 2016
    CH
    Ratings:
    +30
    Local Time:
    5:06 AM
    1.17
    10.3
    Hi everyone, so to enable thread pool just insert this line?
    aio threads;
     
  7. eva2000

    eva2000 Administrator Staff Member

    54,857
    12,238
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,809
    Local Time:
    2:06 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    yup