Apache2Triad Help, Support and Development Forum Index Search Profile Log in to check your private messages Log in Register Memberlist Attachments Statistics Crew/Ranks Archive
 Apache Server speed.
Google
Post new topic Reply to topic
Author Message
Criminal
 
 


Joined: 28 Apr 2004
Posts: 72

PostPosted: Sat Mar 26, 2005 7:22 am Reply with quoteBack to top

What do you do to keep your server fast, and how to make it faster... I think this deserves a topic...
View user's profileSend private messageSend e-mail
Joshua Meadows (DemoRic)
support
support


Joined: 29 Dec 2004
Posts: 783
Location: S.E. Kansas

PostPosted: Sat Mar 26, 2005 5:15 pm Reply with quoteBack to top

I use mod_deflate to compress outgoing data it makes for reduced bandwidth.

Code:
<Location />
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/css
<IfModule mod_headers.c>
Header append Vary User-Agent
</IfModule>
</IfModule>
</Location>

# Method 1: Only compress specified content type
<Location />
<IfModule mod_deflate.c>
# compress content with type html, text, and css
AddOutputFilterByType DEFLATE text/html text/plain text/css
<IfModule mod_headers.c>
# properly handle requests coming from behind proxies
Header append Vary User-Agent
</IfModule>
</IfModule>
</Location>

## Method 2: Compress all content, manually excluding specified file types
#<IfModule mod_deflate.c>
# # place filter 'DEFLATE' on all outgoing content
# SetOutputFilter DEFLATE
# # exclude uncompressible content via file type
# SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png|rar|zip)$ no-gzip
# <IfModule mod_headers.c>
# # properly handle requests coming from behind proxies
# Header append Vary User-Agent
# </IfModule>
#</IfModule>

# deflate.log, log compression ratio on each request
<IfModule mod_deflate.c>
DeflateFilterNote Input instream
DeflateFilterNote Output outstream
DeflateFilterNote Ratio ratio
LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
CustomLog logs/deflate.log deflate
</IfModule>

# Properly handle old browsers that do not support compression
<IfModule mod_deflate.c>
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch bMSIE !no-gzip !gzip-only-text/html
</IfModule>
View user's profileSend private messageYahoo MessengerICQ Number
Crypton
 
 


Joined: 30 Apr 2005
Posts: 6

PostPosted: Thu Jul 21, 2005 10:33 am Reply with quoteBack to top

nice Smile thanks for that!
View user's profileSend private message
Vlad Alexa Mancini
lead developer
lead developer


Joined: 07 Jul 2003
Posts: 1539

PostPosted: Thu Jul 21, 2005 11:07 am Reply with quoteBack to top

to make the server reply faster to huge amounts of visitors you can increase ThreadsPerChild as high as 500 for example if you serve hundreds of visitors/second and have a powerful machine (ram and cpu in the order of Giga/bytes/hertz)

to make the server conserve system memory you can decrease the number of MaxRequestsPerChild as low as 50 to make them die and release memory more often
View user's profileSend private message
Display posts from previous:      
Post new topic Reply to topic


 Jump to:   



View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
Powered by phpBB © 2001, 2002 phpBB Group :: FI Theme
All times are GMT