Welcome to Centmin Mod Community
Become a Member

optimize manually?

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

  1. Oxide

    Oxide Active Member

    502
    29
    28
    Mar 19, 2015
    Ratings:
    +54
    Local Time:
    2:33 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

    28,957
    6,573
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,755
    Local Time:
    2:33 AM
    Nginx 1.13.x
    MariaDB 5.5
    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

    502
    29
    28
    Mar 19, 2015
    Ratings:
    +54
    Local Time:
    2:33 AM
  4. Oxide

    Oxide Active Member

    502
    29
    28
    Mar 19, 2015
    Ratings:
    +54
    Local Time:
    2:33 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

    28,957
    6,573
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,755
    Local Time:
    2:33 AM
    Nginx 1.13.x
    MariaDB 5.5
    rest is left to end user all depends on your specific site(s) usage requirements :)
     
  6. Oxide

    Oxide Active Member

    502
    29
    28
    Mar 19, 2015
    Ratings:
    +54
    Local Time:
    2:33 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

    28,957
    6,573
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,755
    Local Time:
    2:33 AM
    Nginx 1.13.x
    MariaDB 5.5
    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

    28,957
    6,573
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,755
    Local Time:
    2:33 AM
    Nginx 1.13.x
    MariaDB 5.5
    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:
     
    • Like Like x 1
  9. Oxide

    Oxide Active Member

    502
    29
    28
    Mar 19, 2015
    Ratings:
    +54
    Local Time:
    2:33 AM
    I also have 368GB of SSD, if that matters for the optimizing
     
  10. Chris

    Chris Member

    33
    4
    8
    Feb 27, 2015
    Ratings:
    +6
    Local Time:
    12:33 PM
    1.7
    10
    What type of forum are you running?
     
  11. Oxide

    Oxide Active Member

    502
    29
    28
    Mar 19, 2015
    Ratings:
    +54
    Local Time:
    2:33 AM
    Invision Power 4.0 (IP.Board)
     
  12. Sunka

    Sunka Active Member

    888
    230
    43
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +376
    Local Time:
    6:33 PM
    Nginx 1.13.3
    MariaDB 10.1.24
    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

    28,957
    6,573
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,755
    Local Time:
    2:33 AM
    Nginx 1.13.x
    MariaDB 5.5
  14. Sunka

    Sunka Active Member

    888
    230
    43
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +376
    Local Time:
    6:33 PM
    Nginx 1.13.3
    MariaDB 10.1.24
    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

    28,957
    6,573
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,755
    Local Time:
    2:33 AM
    Nginx 1.13.x
    MariaDB 5.5
  16. Sunka

    Sunka Active Member

    888
    230
    43
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +376
    Local Time:
    6:33 PM
    Nginx 1.13.3
    MariaDB 10.1.24
    So it will be better to change to 2 then?
     
  17. eva2000

    eva2000 Administrator Staff Member

    28,957
    6,573
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,755
    Local Time:
    2:33 AM
    Nginx 1.13.x
    MariaDB 5.5
    depends on your usage patterns but if you have mysql and php-fpm and redis/memcached best to not hog all the cpu threads
     
    • Informative Informative x 1