Optimizing Debian Plesk Server


Optimizing Debian Plesk Server

Today we had a very strange issue on one of our debian based plesk server where sites were loading too slow, After investigation we finally revealed that Debian switches on IPv6 by default, and then uses this before it uses IPv4 for DNS resolution hence causing DNS delays and site loading slow.  So we need to set the ipv6 to off and then reboot the server.

Here is how it should be done on the server. Login into the server via shell and perform the following steps.

There is a configuration file called “aliases” here: /etc/modprobe.d/aliases

Edit the file you will find a line like this: alias net-pf-10 ipv6

Change it to: alias net-pf-10 off ipv6

Reboot the machine.

If the server is running with BIND, double check that your BIND server has come back online after reboot or restart Bind.

Apache Optimizations

Apache, the most popular web server, is a stable and reliable software for providing web pages to the world. But sometimes, it happens that Apache will struggle under high loaded traffic. Here is an overview on how you can optimize Apache so it can cope with higher loads.

DNS Look-ups

A good way to enhance your server response time is to disable DNS LookUp. When DNS Look Up is activated, Apache will perform a name resolution each time a new client connect to the server in order to record the full host name of the client. Disabling DNS LookUp, Apache will only save the IP of the client.

Disable DNS look-ups by ensuring your Apache setup contains “HostnameLookups Off” inside either /etc/apache/httpd.conf, or /etc/apache2/apache2.conf can immediately make your server capable of handling more traffic.

Web statistics software such as awstats can perform name resolution if you still need to get that information, but keep in mind that this will increase the time required by awstats to process your logs.


On start up, Apache will create a number of processes (Servers), and will handle a maximum of simultaneous requests (MaxClients). Any connection attempts over MaxClients will be queued. The MaxClients maximum value is capped by Here is a default setting for a Debian/Ubuntu box:

<IfModule prefork.c>
StartServers         5
MinSpareServers      5
MaxSpareServers     10
MaxClients          20
MaxRequestsPerChild  0

In order to handle more request at the same time, someone could use settings like:

<IfModule prefork.c>
StartServers       15
MinSpareServers    10
MaxSpareServers   20
ServerLimit      512
MaxClients       512
MaxRequestsPerChild  0

Note that in order to exceed the 256 MaxClients default capped value, we re-defined Server Limit with a value of 512. You need to add “ServerLimit      512”

Optimize MySQL for Low Memory Use in Debain

MySQL is a light database engine compared to many of it’s rivals, but for some reason the Debian MySQL-server package contains a setup that makes it very heavy and memory consuming. The Debian version of MySQL becomes memory consuming because it comes with config file where MySQL’s most memory consuming and seldom used storage engine InnoDB is enable. As result of this the MySQL server instance uses around 100MB of memory while almost idle.

And here comes the optimization tip.

Since the InnoDB storage engine is used very seldom it can be disable in most cases and let the server save almost about 100MB of memory.

To disable to InnoDB storage engine add this to my.cnf (the default MySQL configuration files) in /etc/mysql/


I think these steps are enough to optimize your Debain server and hopefully it should be performing better.

Share this post