Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does this UWSGI output mean? > "(X switches on core 0)"

I'm running a nginx with uwsgi application with django that used the sqlite structure.

When running uwsgi, when a GET or POST request is made, it sends output such as:

[pid: 29018|app: 0|req: 39/76] 136.61.69.96 () {52 vars in 1208 bytes} [Wed Jul 19 17:25:12 2017] POST /binaryQuestionApp/?participant=A3AJJHOAV7WIUQ&assignmentId=37QW5D2ZRHPMKY652LHT9QV23ZD8SU => generated 6 bytes in 722 msecs (HTTP/1.1 200) 3 headers in 195 bytes (1 switches on core 0)

What does the last bit mean? Sometimes it says 2 switches, sometimes 1.

like image 920
Mitchell van Zuylen Avatar asked Jul 19 '17 17:07

Mitchell van Zuylen


1 Answers

Presumably you have found the answer, but for anyone that lands here looking for the answer I found this:

"core" is the low-level concept for uWSGI concurrency context in a process (can be a thread or a greenlet or a fiber or a goroutine and so on...) while switches count is incremented whenever an app "yield" its status (this has various meanings based on the lower concurrency model used)

Source: http://lists.unbit.it/pipermail/uwsgi/2015-March/007949.html

like image 107
IzPrEE Avatar answered Nov 18 '22 07:11

IzPrEE