Home > General, linux > Apache Performance Tuning on Linux – Protecting from Swap Files!

Apache Performance Tuning on Linux – Protecting from Swap Files!

Performance of the Web server is depending on the number of RAM. So, you are requires to set your server as soon as protect it from using swap files that will decrease your server performance. In this way, the Linux Apache performance tuning can boost the performance of the server. It is also increasing the performance of various elements of your server such as: Disk Performance, CPU Performance, Memory Performance, Network Performance, as well as I/O Performance. Apache performance tuning on Linux, it is easier to operate and cheaper with comparison to any other tools that available for these process.

FollowSymLinks & SymLinksIfOwnerMatch

Wherever in the URL space you don’t have the Options Follow Sym Links, or you have the Options SymLinks. In case, owner Match Apache may need to issue any extra system calls for checking up on the symlinks. For instance, in case, you had:

DocumentRoot /www/htdocs

<Directory />

Options SymLinks If Owner Match

</Directory>

Request is made for URI /index.html and then Apache can perform lstat(2) on /www, /www/htdocs & /www/htdocs/index.html. Results of the lstats are not cached, thus they may happen on each single request. In case, you actually desire symlinks safety checking you may do something just like this:

DocumentRoot /www/htdocs

<Directory />

Options FollowSymLinks

</Directory>

<Directory /www/htdocs>

Options -FollowSymLinks +SymLinksIfOwnerMatch

</Directory>

This avoids extra checks for DocumentRoot path and note that you may have to add same sections in case, you have Alias and RewriteRule paths outside of the document root. For the highest performance, no symlink protection, and set FollowSymLinks all over the place, and do not set SymLinksIfOwnerMatch.

AllowOverride

Wherever in the URL space you allow the overrides (generally .htaccess files) Apache can try to open .htaccess for every filename component. Example,

DocumentRoot /www/htdocs

<Directory />

AllowOverride all

</Directory>

Request is been made for URI /index.html and then Apache ca try to open /.htaccess, /www/.htaccess & /www/htdocs/.htaccess. The solutions are same to previous case of the Options FollowSymLinks. For the highest performance make use of AllowOverride None all over the place in the file system.

 

Categories: General, linux Tags:
  1. No comments yet.
  1. No trackbacks yet.