
Server Tuning
=============

mysqld:
-------

mysqld has a max_connections limit of 100 by default. To change this, simply
change /etc/my.cnf and set:

-----------------------------------------
[mysqld]
...
max_connections = <number>

-----------------------------------------

Restart mysql after changing this parameter.

apache2:
--------

apache2 has max clients limit of 150 by default. To change this, simply change
/etc/apache2/server-tuning.conf and set:

-----------------------------------------

# prefork MPM    if you use the prefork module
<IfModule prefork.c>
...

  MaxClients         <number>

-----------------------------------------

MaxClients must be lower then the value of "ServerLimit". 
Restart apache2 after changing this parameter.


For SMT it is usefull to set the mysqld max_connections limit a little bit
higher then then the apache2 MaxClients limit. 


Speedup database connection:
----------------------------

If the database connect() takes a long time it might be usefull to switch to 
persistent database connections. This can be easily done by installing 
perl-Apache-DBI module (SDK) and put "use Apache::DBI;" into 
/etc/apache2/smt-mod_perl-startup.pl . Example:

-----------------------------------------
  ...
  # ModPerl::MethodLookup::preload_all_modules();
  use ModPerl::Util (); #for CORE::GLOBAL::exit
  use Apache::DBI;
  use Apache2::RequestRec ();
  ...
-----------------------------------------

Restart apache2 after adding this parameter.


