Discover Centmin Mod today
Register Now

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

    2,772
    245
    63
    May 31, 2014
    Ratings:
    +437
    Local Time:
    1:53 AM
    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

    3,936
    961
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,312
    Local Time:
    7:53 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

    2,772
    245
    63
    May 31, 2014
    Ratings:
    +437
    Local Time:
    1:53 AM
    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

    30,606
    6,862
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,297
    Local Time:
    9:53 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.