Want more timely Centmin Mod News Updates?
Become a Member

optimize manually?

Discussion in 'Install & Upgrades or Pre-Install Questions' started by Oxide, Sep 16, 2015.

  1. Oxide

    Oxide Active Member

    534
    29
    28
    Mar 19, 2015
    Ratings:
    +59
    Local Time:
    9:52 AM
    I recently installed it on a brand new dedicated server i got with following specs:

    32GB Ram
    Intel Xeon E3 1245v2 (4C/8T)

    However, i noticed that nginx.conf only uses 1 worker process. Would I need to optimize those settings my self, if yes. What ones would I need to change?

    I assume zend op cache, nginx.conf and not sure about others. If I remember right, other VPS I've installed this one gets 2 worker process or more.

     
  2. eva2000

    eva2000 Administrator Staff Member

    53,229
    12,116
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,654
    Local Time:
    9:52 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    nginx.conf should of been auto optimised for worker processes out of the box via inc/cpucount.inc function - so you can see what functions and formulas are used there

    basically for 7 or 8 cpu threads formula is
    Code:
    if [[ "$NOCPUS" = "8" || "$NOCPUS" = "7" ]]; then
            NOCPUS=$(echo "$NOCPUS"/2.333 | bc)
    
            echo
        if [[ ! -z "$WORKERCHECKA" ]]; then
            #echo "set cpu worker_processes to $NOCPUS"
            sed -i "s/worker_processes  1;/worker_processes $NOCPUS;/g" $NGINXCONFCPU
        elif [[ ! -z "$WORKERCHECKB" ]]; then
            #echo "set cpu worker_processes to $NOCPUS"
            sed -i "s/worker_processes 1;/worker_processes $NOCPUS;/g" $NGINXCONFCPU
        fi
    fi
    so 7/2.333 or 8/2.333 rounded to nearest integer for worker processes

    it's only auto part, rest of your configs outlined at Centmin Mod Configuration Files - CentminMod.com LEMP Nginx web stack for CentOS is left to end user optimisation
     
  3. Oxide

    Oxide Active Member

    534
    29
    28
    Mar 19, 2015
    Ratings:
    +59
    Local Time:
    9:52 AM
  4. Oxide

    Oxide Active Member

    534
    29
    28
    Mar 19, 2015
    Ratings:
    +59
    Local Time:
    9:52 AM
    got any suggestions to database caching, if i should increase the default configuration to get use of my 32GB ram?

    as well as what i should put zend cache to etc :) would be appreciated
     
  5. eva2000

    eva2000 Administrator Staff Member

    53,229
    12,116
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,654
    Local Time:
    9:52 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    rest is left to end user all depends on your specific site(s) usage requirements :)
     
  6. Oxide

    Oxide Active Member

    534
    29
    28
    Mar 19, 2015
    Ratings:
    +59
    Local Time:
    9:52 AM
    sure, so you have no suggestions to what i can do for a fast forum..?

    if not, anyone else?
     
  7. eva2000

    eva2000 Administrator Staff Member

    53,229
    12,116
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,654
    Local Time:
    9:52 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Centmin Mod is provide as is, so short of scripted related bugs or issues, any further optimisation to the web stack components - nginx, php-fpm, mariadb mysql, csf firewall etc or web app specific configurations are left to the Centmin Mod user to deal with. So I do not provide any free support for such.

    However, Centmin Mod users are free to help each other out and ask questions or give answers on this community forum. My hopes are that this community forum evolves so that more veteran long time Centmin Mod users help new Centmin Mod users out :)
     
  8. eva2000

    eva2000 Administrator Staff Member

    53,229
    12,116
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,654
    Local Time:
    9:52 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    To help with optimisations, there are various tools and commands you will want to read up on and learn for basic system admin tasks and troubleshooting.
    Notes:
     
  9. Oxide

    Oxide Active Member

    534
    29
    28
    Mar 19, 2015
    Ratings:
    +59
    Local Time:
    9:52 AM
    I also have 368GB of SSD, if that matters for the optimizing
     
  10. Chris

    Chris Member

    51
    10
    8
    Feb 27, 2015
    Ratings:
    +15
    Local Time:
    7:52 PM
    1.7
    10
    What type of forum are you running?
     
  11. Oxide

    Oxide Active Member

    534
    29
    28
    Mar 19, 2015
    Ratings:
    +59
    Local Time:
    9:52 AM
    Invision Power 4.0 (IP.Board)
     
  12. Sunka

    Sunka Well-Known Member

    1,150
    325
    83
    Oct 31, 2015
    Pula, Croatia
    Ratings:
    +525
    Local Time:
    1:52 AM
    Nginx 1.17.9
    MariaDB 10.3.22
    Sorry for bumping this thread, but when I install centmin on UpCloud few days ago, worker processes is set to 1, I have to change to 4 because I have 4.
     
  13. eva2000

    eva2000 Administrator Staff Member

    53,229
    12,116
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,654
    Local Time:
    9:52 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  14. Sunka

    Sunka Well-Known Member

    1,150
    325
    83
    Oct 31, 2015
    Pula, Croatia
    Ratings:
    +525
    Local Time:
    1:52 AM
    Nginx 1.17.9
    MariaDB 10.3.22
    Yep, maybe 2 was set, but if I have 4 worker process

    Code:
    # grep processor /proc/cpuinfo | wc -l
    4
    then should be 4 not 2 in nginx.conf?
    Code:
    # cat /usr/local/nginx/conf/nginx.conf
    user              nginx nginx;
    worker_processes 4;
    worker_priority -10;
    
    worker_rlimit_nofile 260000;
    timer_resolution 100ms;
     
  15. eva2000

    eva2000 Administrator Staff Member

    53,229
    12,116
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,654
    Local Time:
    9:52 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  16. Sunka

    Sunka Well-Known Member

    1,150
    325
    83
    Oct 31, 2015
    Pula, Croatia
    Ratings:
    +525
    Local Time:
    1:52 AM
    Nginx 1.17.9
    MariaDB 10.3.22
    So it will be better to change to 2 then?
     
  17. eva2000

    eva2000 Administrator Staff Member

    53,229
    12,116
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,654
    Local Time:
    9:52 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    depends on your usage patterns but if you have mysql and php-fpm and redis/memcached best to not hog all the cpu threads
     
  18. BigIron

    BigIron Member

    64
    15
    8
    Sep 18, 2015
    Ratings:
    +19
    Local Time:
    4:52 PM
  19. eva2000

    eva2000 Administrator Staff Member

    53,229
    12,116
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,654
    Local Time:
    9:52 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    You can try and see if PHP isn't too loaded.