logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Way to decrease Apache I/O Writes ?
Author
Qmpeltaty



Joined: 06 Feb 2008
Posts: 182
Location: Poland

PostPosted: Wed 10 Aug '11 13:03    Post subject: Way to decrease Apache I/O Writes ? Reply with quote

Since few days i'm working on decreasing I/O Writes by Apache on my heavy traffic site (more than 500 req/s). I turned off all possible logs (imho this was the main reason of I/O writes - i started from around 100 I/O writes/s) - as Apache is fronting JBoss application server the only logs currently enabled are mod_jk logs (with bin/rotatelogs).

I'm still experiencing 50 I/O writes every second - is there any way to decrease this value and save hardware resources for JBoss (config, system tweak or maybe some apache module)?

OS : Win2k8 R2 Enterprise x64
Apache : Apache/2.2.17 (Win32) mod_ssl/2.2.17 OpenSSL/0.9.8o mod_jk/1.2.25
Back to top
Kanashii



Joined: 17 Jul 2006
Posts: 155
Location: Porando

PostPosted: Wed 10 Aug '11 14:39    Post subject: Reply with quote

In my case:

Apache turn off Login for static files
use Wincache and cache file in memory eq template files
Move session from disc to memcached
Turn off httpacess and move to http.conf
use mod_mem_cache for apache

//Witam na forum
Back to top
Qmpeltaty



Joined: 06 Feb 2008
Posts: 182
Location: Poland

PostPosted: Wed 10 Aug '11 16:36    Post subject: Reply with quote

Kanashii wrote:
In my case:

Move session from disc to memcached



What does it mean ? Could you put config example to achieve it ?

Kanashii wrote:
In my case:

//Witam na forum



Też witam Smile
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Wed 10 Aug '11 17:51    Post subject: Reply with quote

Quote:

Move session from disc to memcached

I don't know if this applies in this case. Cause if you use apache only as reverse proxy and don't run any applications on it the session however it is stored will be on the backend server not on apache.

Did you disable the error logging?

-- edit ---

did you try to use mod_proxy_ajp instead of mod_jk?

Did you set ExtendedStatus Off ? Disabled DNS lookup? Enabled deflate?

Options -Indexes FollowSymLinks
Back to top
Kanashii



Joined: 17 Jul 2006
Posts: 155
Location: Porando

PostPosted: Wed 10 Aug '11 18:17    Post subject: Reply with quote

I mean PHP session - you can config in php.ini

english

http://allurcode.com/2010/03/16/php-session-handling-with-memcache/


in polish:
http://matipl.pl/2010/05/28/php-memcache-czy-memcached/


Did you try:

http://www.iqproxyserver.com/reverseproxy.php -- bu cost $$$


Also Apache had some problem with Vary if eq css or js are gziped and some client use nogzip its every time read from disc.

So i had for css|js
Header unset Vary
Back to top
Qmpeltaty



Joined: 06 Feb 2008
Posts: 182
Location: Poland

PostPosted: Wed 10 Aug '11 21:49    Post subject: Reply with quote

James Blond wrote:

Did you disable the error logging?


No, but error frequency is so low that i think there is no need to disable it.

James Blond wrote:

did you try to use mod_proxy_ajp instead of mod_jk?


I have compared it many times and i didn't find any reason to switch to mod_proxy_ajp.
James Blond wrote:

Did you set ExtendedStatus Off ?

No i did not.
James Blond wrote:

Disabled DNS lookup?

Yes.
James Blond wrote:

Enabled deflate?

Yes with disabled logging.
James Blond wrote:

Options -Indexes FollowSymLinks
??
Back to top
Qmpeltaty



Joined: 06 Feb 2008
Posts: 182
Location: Poland

PostPosted: Wed 10 Aug '11 21:56    Post subject: Reply with quote

Kanashii wrote:
I mean PHP session - you can config in php.ini

I do not use php.

Kanashii wrote:

Did you try:
http://www.iqproxyserver.com/reverseproxy.php -- bu cost $$$

No.
Kanashii wrote:

Also Apache had some problem with Vary if eq css or js are gziped and some client use nogzip its every time read from disc.

So i had for css|js
Header unset Vary


Could you provide piece of config how you set it up ?
Back to top
Kanashii



Joined: 17 Jul 2006
Posts: 155
Location: Porando

PostPosted: Thu 11 Aug '11 1:11    Post subject: Reply with quote

Quote:


<FilesMatch "\.(css|js)$">
Header set Cache-Control "max-age=2592000, public"
Header set X-FRAME-OPTIONS "DENY"
#Header unset Last-Modified
SetOutputFilter DEFLATE
#8640 - jeden dzien
Header unset Vary
#Header unset User-Agent
#Header unset Pragma
</FilesMatch>

TraceEnable off
FileETag MTime Size

EnableSendfile Off
EnableMMAP Off
Win32DisableAcceptEx

TraceEnable Off

UseCanonicalName Off
ServerSignature Off
HostnameLookups Off

SendBufferSize 0


<Location /status>
SetHandler server-status
Header set Expires "Tue, 12 Sep 1999 12:12:12 GMT"
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Location>

# ANTI FINGERPRINT
SetEnvIf Request_Method . BR_http=y
SetEnvIf Request_Method . BR_get=y
SetEnvIf Request_Protocol HTTP\/1\.0$ !BR_http
SetEnvIf Request_Protocol HTTP\/1\.1$ !BR_http
SetEnvIf Request_Method GET !BR_get
SetEnvIf BR_http y BadRequest=y
SetEnvIf BR_get y BadRequest=y


<limit TRACK>
deny from all
</limit>


Last edited by Kanashii on Thu 11 Aug '11 18:12; edited 1 time in total
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Thu 11 Aug '11 10:01    Post subject: Reply with quote

Qmpeltaty wrote:

James Blond wrote:

Did you set ExtendedStatus Off ?

No i did not.


If you serve any files from the harddrive apache is installed on. apache will make several extra time-related system calls on every request made.

Qmpeltaty wrote:

James Blond wrote:

Options -Indexes FollowSymLinks
??


This applies only if you serve any files from the harddrive apache is installed on. The same thing like the .htacces thing. Apache will look into each directory for an index file, if not it will desplay the content of that directory. See http://httpd.apache.org/docs/2.2/en/mod/core.html#options
Back to top
Qmpeltaty



Joined: 06 Feb 2008
Posts: 182
Location: Poland

PostPosted: Thu 11 Aug '11 11:47    Post subject: Reply with quote

James Blond wrote:
Qmpeltaty wrote:

James Blond wrote:

Did you set ExtendedStatus Off ?

No i did not.


If you serve any files from the harddrive apache is installed on. apache will make several extra time-related system calls on every request made.


Applied.


James Blond wrote:

Qmpeltaty wrote:

James Blond wrote:

Options -Indexes FollowSymLinks
??


This applies only if you serve any files from the harddrive apache is installed on. The same thing like the .htacces thing. Apache will look into each directory for an index file, if not it will desplay the content of that directory. See http://httpd.apache.org/docs/2.2/en/mod/core.html#options

I know how it works and have it applied - i thought you post it by mistake.
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3093
Location: Hilversum, NL, EU

PostPosted: Sat 13 Aug '11 15:00    Post subject: Reply with quote

An other which may give more efficient disk access and hence higher performance:

BufferedLogs On

This directive causes mod_log_config to store several log entries in memory and write them together to disk, rather than writing them after each request.


Steffen
Back to top
Kanashii



Joined: 17 Jul 2006
Posts: 155
Location: Porando

PostPosted: Sat 13 Aug '11 20:31    Post subject: Reply with quote

BufferedLogs On

When enabled:

log-%m-%d-%Y.txt

should be

log-08-13-2011.txt

I think some problem with mod_log rotation
Back to top


Reply to topic   Topic: Way to decrease Apache I/O Writes ? View previous topic :: View next topic
Post new topic   Forum Index -> Apache