Return-Path:
The session will focus on easily accessible configuration and tuning
options for Apache httpd 2.2 and 2.3 as well as monitoring tools.
Monitoring tools will allow you to observe your web server to
gather information about its performance, or lack thereof.
- We'll assume that you don't have an unlimited budget for
+ We'll assume that you don't have an unlimited budget for
server hardware, so the existing infrastructure will have to do the
job. You have no desire to compile your own Apache, or to recompile
the operating system kernel. We do assume, though, that you have
@@ -71,7 +71,7 @@
The first task when sizing or performance-tuning your server is to
@@ -82,7 +82,7 @@
The top tool ships with Linux and FreeBSD. Solaris offers
- `prstat'. It collects a number of statistics for the
+ `prstat'. It collects a number of statistics for the
system and for each running process, then displays them
interactively on your terminal. The data displayed is
refreshed every second and varies by platform, but
@@ -179,10 +179,10 @@
top ten CPU gluttons). It is indispensable in determining
the size of a running process, which comes in handy when
determining how many server processes you can run on your
- machine. How to do this is described in '
+ machine. How to do this is described in '
sizing MaxClients
- '. Top is, however, an interactive tool and running it
+ '. Top is, however, an interactive tool and running it
continuously has few if any advantages.
The SE Toolkit is a system monitoring toolkit for Solaris. @@ -301,11 +301,11 @@
Given that DTrace is available for Solaris, FreeBSD and OS - X, it might be worth exploring it. There's also + X, it might be worth exploring it. There's also mod_dtrace available for httpd.
@@ -335,7 +335,7 @@Monitoring and analyzing the log files httpd writes is one of @@ -351,7 +351,7 @@
-The error log will contain messages if the server has @@ -391,7 +391,7 @@ directive can also be used in virtual host containers. The error log of a virtual host receives only log messages specific to that virtual host, such as authentication - failures and 'File not Found' errors. + failures and 'File not Found' errors.
On a server that is visible to the Internet, expect to see a lot of exploit attempt and worm attacks in the error log. A @@ -528,7 +528,7 @@
Apache httpd keeps track of every request it services in its @@ -695,7 +695,7 @@
There are several reasons to rotate logfiles. Even though @@ -769,7 +769,7 @@
Writing entries to the Apache log files obviously takes some
@@ -797,20 +797,14 @@
easier to analyze the logfile later. However, if your
server has many virtual hosts, all the open logfiles put a
resource burden on your system, and it may be preferable to
- log to a single file. Use the %v
-
- format character at the start of your
- LogFormat
-
- and starting 2.3.8 of your ErrorLogFormat
-
+ log to a single file. Use the %v
+ format character at the start of your support/split-logfile
-
- .
+ under support/split-logfile
.
You can use the BufferedLogs
@@ -818,20 +812,18 @@
directive to have Apache collect several log lines in
memory before writing them to disk. This might yield better
performance, but could affect the order in which the
- server's log is written.
+ server's log is written.
It is useful to generate a test load to monitor system performance under realistic operating circumstances. Besides - commercial packages such as - LoadRunner - + commercial packages such as LoadRunner ,there are a number of freely available tools to generate a test load against your web server.
@@ -858,9 +850,7 @@ASF external projects, that have proven to be quite - good: grinder, httperf, tsung, - FunkLoad - + good: grinder, httperf, tsung, FunkLoad
The Apache 2.2 httpd is by default a pre-forking web server.
@@ -894,9 +884,8 @@
MPM runs a smaller number of child processes, and spawns
multiple request handling threads within each child process. In
2.3+ MPMs are no longer hard-wired. They too can be exchanged
- via LoadModule
-
- .The default MPM in 2.3 is the event MPM.
+ via
The maximum number of workers, be they pre-forked child processes or threads within a process, is an indication of how @@ -904,7 +893,7 @@ a rough estimate because the kernel can queue connection attempts for your web server. When your site becomes busy and the maximum number of workers is running, the machine - doesn't hit a hard limit beyond which clients will be + doesn't hit a hard limit beyond which clients will be denied access. However, once requests start backing up, system performance is likely to degrade.
@@ -932,7 +921,7 @@For the prefork MPM of the above directives are all there is @@ -958,7 +947,7 @@
Optimally, the maximum number of processes should be set so @@ -989,7 +978,7 @@
The difference between these two is the amount of memory per-process. The shared segment really exists only once and is used for the code and libraries loaded and the dynamic - inter-process tally, or 'scoreboard,' that Apache + inter-process tally, or 'scoreboard,' that Apache keeps. How much memory each process takes for itself depends heavily on the number and kind of modules you use. The best approach to use in determining this need is to @@ -1019,7 +1008,7 @@
The prime reason for selecting a threaded MPM is that @@ -1056,14 +1045,14 @@
Apache httpd maintains an inter-process lock around its network listener. For all practical purposes, this means that only one httpd child process can receive a request at any given time. The other processes are either servicing - requests already received or are 'camping out' on + requests already received or are 'camping out' on the lock, waiting for the network listener to become available. This process is best visualized as a revolving door, with only one process allowed in the door at any @@ -1081,10 +1070,10 @@
The function of the 'accept mutex' (as this +
The function of the 'accept mutex' (as this inter-process lock is called) is to keep request reception moving along in an orderly fashion. If the lock is absent, the server may exhibit the Thundering Herd syndrome. @@ -1132,10 +1121,10 @@
People often look for the 'magic tune-up' that will +
People often look for the 'magic tune-up' that will make their system perform four times as fast by tweaking just one little setting. The truth is, present-day UNIX derivatives are pretty well adjusted straight out of the box and there is @@ -1145,7 +1134,7 @@
-The usual mantra regarding RAM is "more is @@ -1163,7 +1152,7 @@ different ways, it is never a good idea to run with less disk-based swap space than RAM. The virtual memory system is designed to provide a fallback for RAM, but when you - don't have disk space available and run out of + don't have disk space available and run out of swappable memory, your machine grinds to a halt. This can crash your box, requiring a physical reboot for which your hosting facility may charge you. @@ -1206,7 +1195,7 @@
Given a machine with plenty of RAM and processor capacity, @@ -1260,7 +1249,7 @@
Under Linux, you can set the ulimit parameters on bootup by
@@ -1277,19 +1266,19 @@
All items can have a 'soft' and a 'hard' +
All items can have a 'soft' and a 'hard' limit: the first is the default setting and the second the maximum value for that item.
- In FreeBSD's /etc/login.conf
+ In FreeBSD's
/etc/login.conf
these resources can be limited or extended system wide,
analogously to limits.conf
- .'Soft' limits can be specified with -cur
+ .'Soft' limits can be specified with
-cur
- and 'hard' limits with -max
+ and 'hard' limits with
-max
.
Many UNIX and Linux distributions come with a slew of @@ -1351,7 +1340,7 @@ directive.
-Unused modules may be culled: if you don't rely on +
Unused modules may be culled: if you don't rely on
their functionality and configuration directives, you can
turn them off by commenting out the corresponding
LoadModule
@@ -1359,14 +1348,14 @@
lines. Read the documentation on each moduleâs
functionality before deciding whether to keep it enabled.
While the performance overhead of an unused module is
- small, it's also unnecessary.
+ small, it's also unnecessary.
Requests for dynamically generated content usually take @@ -1386,7 +1375,7 @@
-By pre-rendering the response pages for the most popular queries @@ -1395,7 +1384,7 @@ generated content. For instance, if your application is a flower delivery service, you would probably want to pre-render your catalog pages for red roses during the weeks leading up to - Valentine's Day. When the user searches for red roses, + Valentine's Day. When the user searches for red roses, they are served the pre-rendered page. Queries for, say, yellow roses will be generated directly from the database. The mod_rewrite module included with Apache is a great tool to @@ -1403,14 +1392,14 @@
-- 'we should provide a more useful example here. + 'we should provide a more useful example here. One showing how to make Wordpress or Drupal suck less. - ' + '
Blosxom is a lightweight web log package that runs as a CGI. It is written in Perl and uses plain text files for entry @@ -1493,7 +1482,7 @@ specify blog entries and index pages, so this means that if a particular path under Blosxom exists as a static file in the file system, the file is served instead. Any request - that isn't pre- rendered is served by the CGI. This + that isn't pre- rendered is served by the CGI. This means that individual entries, which show the comments, are always served by the CGI which in turn means that your comment spam is always visible. This configuration also @@ -1506,7 +1495,7 @@
The mod_cache module provides intelligent caching of HTTP @@ -1518,7 +1507,7 @@ the cache. The provider module for mod_cache, mod_disk_cache, determines how the cached content is stored on disk. Most server systems will have more disk available than memory, and - it's good to note that some operating system kernels cache + it's good to note that some operating system kernels cache frequently accessed disk content transparently in memory, so replicating this in the server is not very useful.
@@ -1545,21 +1534,17 @@ -- 'Is this still the case? Maybe we should give + 'Is this still the case? Maybe we should give a better example here too.
- The Apache Software Foundation Wiki is served by - MoinMoin - - .MoinMoin - - is written in Python and runs as a CGI. To date, any + The Apache Software Foundation Wiki is served by MoinMoin. + MoinMoin is written in Python and runs as a CGI. To date, any attempts to run it under mod_python has been unsuccessful. The CGI proved to place an untenably high load on the server machine, especially when the Wiki was being indexed @@ -1636,7 +1621,7 @@
Armed with the knowledge of how to tune a sytem to deliver the