I host a Django site in Webfaction using gunicorn (master + 4 employees). I installed with 4 because I had good results in the past for the traffic that I get, and the "processor cores * 2 + 1" just feed on my RAM.
Under normal use, gunsmith workers occupy about 45 MB or RAM each, and I get the page load time in just under a second. Now, after they sit unattended for several hours, workers descend on anything - from 5 to 15 MB of RAM. If I visit the site at this moment, it takes more than 10 seconds to get a response from the server. After viewing 2 or 3 pages, workers return to normal memory usage, and the site becomes fast again.
In accordance with this answer (see paragraph 1), the gun should have a site ready at any time without the need for “warming up” after receiving requests for some time. This is consistent with what I saw when using this setup in at least a dozen other sites: the machine gunner is just there, ready to go anytime.
Is it normal for workers to reduce memory consumption at such low levels? How can I get rid of the long response time after inaction?
source
share