NGINX - Grundlagen worker_processes
-
Beim Schauen diesen Videos bin ich über was gestolpert, was ich mal testen muss
Es geht um die NGINX Config, die man unter /etc/nginx/nginx.conf findet. Ein Ausschnitt.
user nginx; worker_processes 1; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid;
Im Video wird erklärt, das man das auf auto setzen soll.
user nginx; worker_processes auto; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid;
Was macht das?
vorher
root@webserver2:~# ps -ef | grep nginx root 503 1 0 Sep19 ? 00:00:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf nginx 940 503 0 Sep19 ? 00:06:10 nginx: worker process root 24535 24238 0 17:41 pts/1 00:00:00 grep nginx
nachher
root@webserver2:/etc/nginx# ps -ef | grep nginx root 503 1 0 Sep19 ? 00:00:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf nginx 940 503 0 Sep19 ? 00:06:10 nginx: worker process is shutting down nginx 25185 503 0 17:42 ? 00:00:00 nginx: worker process nginx 25186 503 0 17:42 ? 00:00:00 nginx: worker process nginx 25187 503 0 17:42 ? 00:00:00 nginx: worker process nginx 25188 503 0 17:42 ? 00:00:00 nginx: worker process root 29512 24238 0 17:51 pts/1 00:00:00 grep nginx
Ok, vorher hatte ich einen Prozess, nun habe ich vier Prozesse. Ich bilde mir ein, das das Forum jetzt deutlich schneller geworden ist
Das Ganze mal beobachten.
-
-
-
-
-
-
-
NodeBB & ads.txt
Verschoben NGINX -