Thoughts on OS/2 httpd mpmt tuning

8 views
Skip to first unread message

Steven Levine

unread,
Mar 16, 2022, 5:43:57 PM3/16/22
to Apache/2 Mailing List

Hi all,

I've been meaning to mention this for a while, so why not now?

Every now and then the subject of httpd capacity tuning comes up,
specifically how best to set the number of servers and threads to best
utilize the available resources.

It occurred to me that we already have a tool to make this task more
tractable. This problem is similar to the problem of capacity tuning a
mail server. Back in 2017, after a few to many messages to the Weasel
maiing list complaining about running out of resources, Peter Moylan
wrote:

ftp://ftp.pmoylan.org/papers/92.MailTuning.pdf

Since being put into use, messages on this subject have dropped to zero,
TTBOMK.

Weasel is written in Modula/2 and the runtime is too old to know how to
use upper memory, so it is much more capacity limited compared to our libc
based ports. The runtime also sets the heap size to a fixed value at
startup (don't ask), which is another limiting factor. OTOH, Peter tends
to write tight code and Weasel is a native OS/2 application with no
dependencies on code ported from linux.

The way to use Peter's formula for httpd is to plug the parameter
estimates in the formula. This will provide the number of threads needed
for a single server instance. Since this thread count might require too
much memory for a single server, limit the threads per server and split
the threads across multiple server instances.

The webcrawlers keep scoug.com pretty active, so I applied the Peter's
formula to get some results. There were 22,680 requestes/per day or .26
requests/second. I guessed the processing time at 10 seconds, which is
extremely conservative since scoug.com is mostly static contents and
shtml. The gives a departure rate of .1 requests/sec. Plugging this into
the formula

CEILING(mu/lamda+3*SQRT(mu/lamda)+1)

tells me I need to configure a queue line of 9, which is interesting. It
would seem that the built-in defaults of

# DEFAULT_START_DAEMON is 2 as of 2014-12-22 SHL
# DEFAULT_MIN_SPARE_THREAD is 5 as of 2014-12-22 SHL

which I've always used seem to be just about right for scoug.com.

Steven

--
----------------------------------------------------------------------
"Steven Levine" <ste...@earthlink.net> Warp/DIY/BlueLion etc.
www.scoug.com www.arcanoae.com www.warpcave.com
----------------------------------------------------------------------
Reply all
Reply to author
Forward
0 new messages