3. “ Apache is a general webserver, which is designed to be correct first, and fast second. Even so, its performance is quite satisfactory. Most sites have less than 10Mbits of outgoing bandwidth, which Apache can fill using only a low end Pentium-based webserver.” http://httpd.apache.org/docs/1.3/misc/perf-tuning.html says:
35. mod_cache Configuration <IfModule mod_cache.c> <IfModule mod_disk_cache.c> CacheRoot /raid1/cacheroot CacheEnable disk / # A page modified 100 min. ago will expire in 10 min. CacheLastModifiedFactor .1 # Always check again after 6 hours CacheMaxExpire 21600 </IfModule> </IfModule>
36.
37. Static Page Substitution <Directory "/home/sctemme/inst/blog/httpd/htdocs"> Options +Indexes Order allow,deny Allow from all RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /cgi-bin/blosxom.cgi/$1 [L,QSA] </Directory>
Will help in this situation, but also provide everyday benefits when you’re not getting slashdotted http://www.geology.smu.edu/~dpa-www/attention_span/ This is a slashdotting. Peaked at 78,000 hits per hour, or 6.4Gb per hour. Or, 290Mb/minute which translates to over 40Mbps. Audience poll: Who has a T1? Who has more than 100Mbps?
Information on all the programs discussed in this session can be found in the paper. There will be a questions and answer sessions at the end, so keep track of your questions. With that, let’s go.
Monitoring is a critical component of tuning your server. Observation -- Is everything allright? Extrapolation -- Gather data for future performance estimate Signaling -- Something is going wrong and we want to know about it. Testing -- How will this configuration change affect performance?
Click to apache.org Discuss status page point at one or two data points Part of most default installs Not switched on, see manual on how to enable Control access so you can see it but others can’t.
One-liner on what they do. More detailed info in the paper.
Configurable level of detail Configure one for every vhost.
Examples of modules that can die.
Thread unsafety example: Consider a global variable. With processes, each process has a copy which can be set and read independently. If you use threads within a process, you could get into the situation that thread A sets the variable, then thread B overwrites that value, so when A reads the variable back it has changed.