htop gives unlimited multiple green lines under white line on linux.
What do mutiple green lines mean?
And How can I prevent it?
It seems that each takes a certain amount of memory
1
Stack Overflow is for programming questions, not questions about using or configuring Unix and its utilities. Unix & Linux or Super User would be better places for questions like this.
–
That said, depending on how gunicorn is configured, these may be preforked workers. They don’t use as much memory as htop makes it look like, since when a process is forked from its parent memory pages are shared with that parent process until anything changes them (“copy on write”), so memory spent loading code shared between the processes before the point when the fork takes place is only spent once. In general, preforking workers is a performance strategy; unless you have more than you need for your load, getting rid of them may make your service slower.
–
(by the way, if you had posed this as a question about gunicorn rather than a question about htop it may have gotten a better reception; htop is categorically off-topic here for the reasons Barmar gave above, gunicorn is more a grey area depending on whether it’s a code question or a configuration question)
–
(if as the arguments imply there’s only one worker spawned by gunicorn itself, we’d need to look at your Python code — if you’re using the multiprocessing module, for example, that can fork off workers too)
Stack Overflow is for programming questions, not questions about using or configuring Unix and its utilities. Unix & Linux or Super User would be better places for questions like this.
That said, depending on how gunicorn is configured, these may be preforked workers. They don’t use as much memory as htop makes it look like, since when a process is forked from its parent memory pages are shared with that parent process until anything changes them (“copy on write”), so memory spent loading code shared between the processes before the point when the fork takes place is only spent once. In general, preforking workers is a performance strategy; unless you have more than you need for your load, getting rid of them may make your service slower.
(by the way, if you had posed this as a question about gunicorn rather than a question about htop it may have gotten a better reception; htop is categorically off-topic here for the reasons Barmar gave above, gunicorn is more a grey area depending on whether it’s a code question or a configuration question)
(if as the arguments imply there’s only one worker spawned by gunicorn itself, we’d need to look at your Python code — if you’re using the multiprocessing module, for example, that can fork off workers too)