[prev in list] [next in list] [prev in thread] [next in thread] 

List:       uwsgi
Subject:    [uWSGI] committed cheaper mode
From:       roberto () unbit ! it (Roberto De Ioris)
Date:       2011-09-19 8:29:33
Message-ID: F6108A4F-E7D0-4001-94E8-DB9BFC54CBC5 () unbit ! it
[Download RAW message or body]

Hi everyone, the cheaper mode is finally in the public tree.

First of all:

DO NOT ABUSE IT

instances in cheaper mode will be slower and will consume more cpu (fork() is always \
expensive as well as monitoring workers status)

Their purpose is to gain memory for your system when your app is mainly idle.

How to enable it:

Simply add --cheaper <n> where <n> is the minimal number of workers to maintain \
active

--processes 8 --cheaper 2

will create 2 workers on startup, but when the two workers are not enough to manage \
requests they will be forked() up to 8.

When the load decrease the new workers will be stopped and so on?

workers (for now) have 3 status (this is independent by the presence of cheap modes):

busy -> the worker (or one of its core) is managing a request
idle -> the worker is doing nothing
cheap -> the worker is inactive (cheap/cheaper mode)

You can get the status from uwsgi.workers() dictionary (the key is 'status', check \
the welcome.py app)

Tests report will be very appreciated.

--
Roberto De Ioris
http://unbit.it
JID: roberto at jabber.unbit.it


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic