From 4ea9a29e62095b8aad26eb694473aa3500c703db Mon Sep 17 00:00:00 2001 From: "roberto@precise64" Date: Fri, 17 Feb 2012 20:09:54 +0100 Subject: [PATCH] fixed some typo in comments --- master.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/master.c b/master.c index 50fabecb..5912187d 100644 --- a/master.c +++ b/master.c @@ -652,11 +652,11 @@ int master_loop(char **argv, char **environ) { -- Cheaper, algorithm, adapted from old-fashioned spare system -- - every time all of the workers are busy the overload_count is incremented - as soon as this value is higher than uwsgi.cheaper_overload (--cheaper-overload options) - a new worker is spawned. + when all of the workers are busy, the overload_count is incremented. + as soon as overload_count is higher than uwsgi.cheaper_overload (--cheaper-overload options) + cheaper_step (default to 1) new workers are spawned. - every time at least one workers is free the overload_count is decremented and the idle_count is incremented. + when at least one worker is free, the overload_count is decremented and the idle_count is incremented. If overload_count reaches 0, idle_count is higher than uwsgi.cheaper_overload*10 and the number of active workers is higher than uwsgi.cheaper_count (--cheaper option) the oldest worker will be cheaped and the "cheap them all" procedure will start. @@ -666,6 +666,7 @@ int master_loop(char **argv, char **environ) { Example: 10 processes 2 cheaper + 1 cheaper step 3 cheaper_overload 1 second master cycle @@ -681,7 +682,7 @@ int master_loop(char **argv, char **environ) { if (uwsgi.cheaper && !uwsgi.cheap && !uwsgi.to_heaven && !uwsgi.to_hell) { if (overload_count > uwsgi.cheaper_overload) { last_decheap = 0; - // activate the first available worker + // activate the first available worker (taking step into account) int decheaped = 0; for (i = 1; i <= uwsgi.numproc; i++) { if (uwsgi.workers[i].cheaped == 1 && uwsgi.workers[i].pid == 0) {