WebFaction
Community site: login faq
  • what is a http worker processes?

    I see many httpd processes running like

    /home/username/webapps/appname/apache2/bin/httpd.worker -f /home/user/webapps/protopicpil/apache2/conf/httpd.conf -k start
    

what does the above line mean?

ps -u prajwalps97 -o pid,rss,command | awk '{print $0}{sum+=$2} END {print "Total", sum/1024, "MB"}'

  PID   RSS COMMAND

 3227  2136 /home/user/webapps/protopicpil/apache2/bin/httpd.worker -f /home/user/webapps/protopicpil/apache2/conf/httpd.conf -k start

 3230 30224 /home/user/webapps/protopicpil/apache2/bin/httpd.worker -f /home/user/webapps/protopicpil/apache2/conf/httpd.conf -k start

 3231 30112 /home/user/webapps/protopicpil/apache2/bin/httpd.worker -f /home/user/webapps/protopicpil/apache2/conf/httpd.conf -k start

what are these lines doing?

 3234  2696 /home/user/webapps/protopicpil/apache2/bin/httpd.worker -f /home/user/webapps/protopicpil/apache2/conf/httpd.conf -k start

 21940  2128 /home/user/webapps/lmagazine/apache2/bin/httpd.worker -f /home/user/webapps/lmagazine/apache2/conf/httpd.conf -k start

Why here the memory consumed is varying? Its around 30MB

 21943 30144 /home/user/webapps/lmagazine/apache2/bin/httpd.worker -f /home/user/webapps/lmagazine/apache2/conf/httpd.conf -k start

- what do these things mean?

MaxSpareThreads 3

MinSpareThreads 1

ServerLimit 1

ThreadsPerChild 5

WSGIDaemonProcess lfs072 processes=2 threads=12 python-path=/home/prajwalps97/webapps/lfs072:/home/prajwalps97/webapps/lfs072/lib/python2.7
WSGIProcessGroup lfs072

WSGIRestrictEmbedded On

WSGILazyInitialization On

Which things should I change, if my site is getting more requests?

Thanks. ;)

asked 24 Dec '12, 03:05

Prajwal
10611830
accept rate: 33%

edited 24 Dec '12, 03:09


what is a http worker processes?

The worker processes handle handle requests for your application. More information is in the Apache documentation: Apache MPM worker

what does the above line mean?

If you're referring to "ps -u prajwalps97 -o pid,rss,command | awk '{print $0}{sum+=$2} END {print "Total", sum/1024, "MB"}'", that is listing your process PIDs, memory usage, and command line, then summing the second colum (resident memory usage) and converting it to megabytes.

what are these lines doing?

Those are httpd worker processes, handling requests for your application.

Why here the memory consumed is varying? Its around 30MB

Your application's memory usage will vary depending on different factors such as the volume of traffic you're receiving and the type of request being processes. For example, if your application pulls a large set of data into memory, your memory usage will be higher.

what do these things mean?

Please refer to the Apache and mod_wsgi documentation:

Which things should I change, if my site is getting more requests?

MaxSpareThreads, MinSpareThreads, ServerLimit, ThreadsPerChild can all be increased to give your application more resources to handle increased traffic.

The "processes" and "threads" parameters of WSGIDaemonProcess can also be increased.

There's no magic formula that says exactly what should be changed for a given level of traffic. You'll need to load test your application to find the settings that work best for you.

Also, note that increasing these values will cause your application to use more memory.

permanent link

answered 24 Dec '12, 11:51

seanf
12.2k41836
accept rate: 37%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×909
×225
×28

question asked: 24 Dec '12, 03:05

question was seen: 5,539 times

last updated: 24 Dec '12, 11:51

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM