Apache-ASP

 view release on metacpan or  search on metacpan

site/tuning.html  view on Meta::CPAN

			</td>
							
		</tr>
		
		<tr>
		
			<td valign=top >
			<font face="lucida console" size=-1>
			<a href=#Low%20MaxClien5a8237ea>Low MaxClients</a>
			</font>
			</td>
		
			<td valign=top >
			<font face="lucida console" size=-1>
			<a href=#Memory%20Sparia73a9626>Memory Sparing, NoCache</a>
			</font>
			</td>
							
		</tr>
		
		<tr>
		
			<td valign=top >
			<font face="lucida console" size=-1>
			<a href=#High%20MaxRequ0724a06d>High MaxRequestsPerChild</a>
			</font>
			</td>
		
			<td valign=top >
			<font face="lucida console" size=-1>
			<a href=#Resource%20Limfd66f2d8>Resource Limits</a>
			</font>
			</td>
							
		</tr>
		
		<tr>
		
			<td valign=top >
			<font face="lucida console" size=-1>
			<a href=#Precompile%20M39676a96>Precompile Modules</a>
			</font>
			</td>
		<td>&nbsp;</td>					
		</tr>
			
	</table>
	<hr size=1>
	<p>

	<p>
	<a name=Online%20Resou44921f06></a>
	<font face=verdana><font class=title size=+0 color=#555555><b>Online Resources</b></font>
<font face="courier new" size=3><pre>
</pre></font>For more tips &amp; tricks on tuning Apache and <a href=http://perl.apache.org><font size=-1 face=verdana><b>mod_perl</b></font></a>, please see the tuning
documents at:
<font face="courier new" size=3><pre>
  <a href="http://perl.apache.org/guide/">Stas Bekman&#39;s mod_perl guide</a>
</pre></font>Written in late 1999 this article provides an early look at 
how to tune your Apache::ASP web site.  It has since been
updated to remain current with Apache::ASP v2.29+
<font face="courier new" size=3><pre>
  <a href="http://www.apache-asp.org/articles/perlmonth3_tune.html">Apache::ASP Site Tuning</a>
</pre></font>
	
	<p>
	<a name=Tuning%20%26%20Ben0cdacf8c></a>
	<font face=verdana><font class=title size=+0 color=#555555><b>Tuning & Benchmarking</b></font>
<font face="courier new" size=3><pre>
</pre></font>When performance tuning, it is important to have a tool to
measure the impact of your tuning change by change.
The program ab, or Apache Bench, provides this functionality
well, and is freely included in the apache distribution.
<font face="courier new" size=3><pre>
</pre></font>Because performance tuning can be a neverending affair,
it is a good idea to establish a threshold where performance
is &quot;good enough&quot;, that once reached, tuning stops.</font>
	
	<p>
	<a name=%24Application941f90bf></a>
	<font face=verdana><font class=title size=+0 color=#555555><b>$Application & $Session State</b></font>
<font face="courier new" size=3><pre>
</pre></font>Use NoState 1 setting if you don&#39;t need the $Application or $Session
objects. State objects such as these tie to files on disk and will incur a
performance penalty.
<font face="courier new" size=3><pre>
</pre></font>If you need the state objects $Application and $Session, and if 
running an OS that caches files in memory, set your &quot;StateDir&quot; 
directory to a cached file system.  On WinNT, all files 
may be cached, and you have no control of this.  On Solaris, /tmp is
a RAM disk and would be a good place to set the &quot;StateDir&quot; config 
setting to.  When cached file systems are used there is little 
performance penalty for using state files.  Linux tends to do a good job 
caching its file systems, so pick a StateDir for ease of system 
administration.
<font face="courier new" size=3><pre>
</pre></font>On Win32 systems, where <a href=http://perl.apache.org><font size=-1 face=verdana><b>mod_perl</b></font></a> requests are serialized, you 
can freely use SessionSerialize to make your $Session requests
faster, and you can achieve similar performance benefits for
$Application if you call $Application-&gt;Lock() in your 
global.asa&#39;s Script_OnStart.</font>
	
	<p>
	<a name=Low%20MaxClien5a8237ea></a>
	<font face=verdana><font class=title size=+0 color=#555555><b>Low MaxClients</b></font>
<font face="courier new" size=3><pre>
</pre></font>Set your MaxClients low, such that if you have that
many httpd servers running, which will happen on busy site,
your system will not start swapping to disk because of 
excessive RAM usage.  Typical settings are less than 100
even with 1 gig RAM!  To handle more client connections,
look into a dual server, mod_proxy front end.</font>
	
	<p>
	<a name=High%20MaxRequ0724a06d></a>
	<font face=verdana><font class=title size=+0 color=#555555><b>High MaxRequestsPerChild</b></font>
<font face="courier new" size=3><pre>
</pre></font>Set your max requests per child thread or process (in httpd.conf) high, 
so that ASP scripts have a better chance being cached, which happens after 
they are first compiled.  You will also avoid the process fork penalty on 
UNIX systems.  Somewhere between 50 - 500 is probably pretty good.



( run in 1.113 second using v1.01-cache-2.11-cpan-39bf76dae61 )