A
A
antontinishov2016-02-16 18:24:56
Django
antontinishov, 2016-02-16 18:24:56

Why is cpu loading so much?

There is a site on django on vds (1 core, 1 gb ram, 20 gb ssd). On the nginx+uwsgi backend. Postgresql database is used. With several page updates, the CPU is loaded very heavily. I think that you need to somehow edit the uwsgi configs ...
Actually the config:

#mysite_uwsgi.ini
[uwsgi]

plugins         = python3
wsgi-file       = /beta/beta/beta/beta/wsgi.py
chdir           = /beta/beta/beta
module          = beta.wsgi:application
home            = /beta/beta
master          = true
enable-threads = true
processes       = 1
threads         = 1
thunder-lock = true
cpu-affinity    = 1

chmod-socket    = 666
socket          = /beta/mysite.sock
chown-socket    =  www-data
vacuum          = true
pidfile = /beta/mysite.pid

disable-logging = true
daemonize = /beta/beta/uwsgi.log
harakiri = 30
harakiri-verbose = true
max-requests = 5000
close-on-exec = true
post-buffering = 1

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sim3x, 2016-02-16
@sim3x

serverfault.com/q/696449
processes * threads ~ RPS per backend

processes       = 1 
threads         = 1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question