Want more timely Centmin Mod News Updates?
Become a Member

Nginx Nginx auto worker_processes set to Auto as default?

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by pamamolf, Aug 19, 2017.

  1. pamamolf

    pamamolf Well-Known Member

    3,073
    293
    83
    May 31, 2014
    Ratings:
    +524
    Local Time:
    9:22 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    Hello :)

    I am wondering why not have Nginx auto worker_processes set to Auto as default on Centminmod?

    Don't see any problem with this and it will auto scale....

    Or is it better to set a value there than auto?

    Thanks :)
     
  2. RoldanLT

    RoldanLT Well-Known Member

    4,157
    1,007
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,421
    Local Time:
    2:22 AM
    1.11
    10.2
    Not all of us prefer to give all the CPU to Nginx worker.
    Since we all have Mysql and PHP running on the same server, it's better to divide the total CPU for each Services.
    I always give Total CPU / 2 to Nginx, Total CPU x 2 to PHP via dynamic.
     
  3. pamamolf

    pamamolf Well-Known Member

    3,073
    293
    83
    May 31, 2014
    Ratings:
    +524
    Local Time:
    9:22 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    But it should get more cores only when needed :)

    Ok anyway it's not an issue just a thought that may be better to use that option :)
     
  4. eva2000

    eva2000 Administrator Staff Member

    33,680
    7,459
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,470
    Local Time:
    4:22 AM
    Nginx 1.13.x
    MariaDB 5.5
    Setting auto uses all cpu detected threads always it doesn't use more cores when needed. On a LEMP stack with MariaDB MySQL and PHP-FPM servers as well, you want to leave some of the cpu threads/cores to other services/servers running. If you have Nginx only web server i.e. reverse proxy caching front end or load balancer using Nginx running only Nginx, then auto might make more sense.
     
..