N
N
Nepofigist2011-03-17 22:37:40
ubuntu
Nepofigist, 2011-03-17 22:37:40

Optimal server settings?

Good afternoon,
dear habralyudi!

Relatively recently, I moved from shared hosting to VDS. Since I am not very well versed in server administration, I installed the following software using a scientific poke: Ubuntu 10.04 Server (preinstalled) + Apache2 (with mpm_prefork) + MySQL + PHP + phpmyadmin + eaccelerator + memcached + ssmtp + fail2ban + Webmin.

I use cloud hosting, 512 Mb of RAM, 16x2.67 Xeon and 8 Gb HDD (about half free).

There is a site on the server (main, on cogear) and an experimental site (no visitors, I regularly explore different engines, from WP to LS). The whole system under load eats about 250 megabytes.

Now the following is written in apache2.conf:

Timeout 150<br/>
KeepAlive On<br/>
MaxKeepAliveRequests 50<br/>
KeepAliveTimeout 20<br/>
<br/>
&lt;IfModule mpm_prefork_module&gt;<br/>
StartServers 10<br/>
MinSpareServers 5 <br/>
MaxSpareServers 15<br/>
MaxClients 30<br/>
MaxRequestsPerChild 1000<br/>



Please tell me the optimal Apache2 settings, what to tweak in which direction. Please do not offer nginx, I have neither knowledge nor experience on it, let's proceed from the fact that we need to leave Apache2, but somehow adjust it optimally.

Thank you very much.

Answer the question

In order to leave comments, you need to log in

6 answer(s)
Z
zizop, 2011-03-18
@Nepofigist

My suggestions:
Apache2 -> nginx
MySQL -> Percona Server (InnoDB -> XtraDB)
PHP -> php5_fpm
eaccelerator -> apc

S
SEObomj, 2011-03-17
@SEObomj

But I still take and offer nginx. Putting it as a frontend is not so difficult. Read here: debian.pro/147 You can also look at the configs there, but this is a very individual matter - you need to experiment. I would also put Debian instead of Ubuntu - it is more stable.

I
IlVin, 2011-03-18
@IlVin

Leave the default settings.
As soon as problems begin, it will immediately become clear what needs to be tuned.

J
Jazzist, 2011-03-17
@Jazzist

1. Do you want to achieve performance or optimize something? In the first case, first disable the caching daemons. In the second - specify what exactly you want to optimize, and how did you identify bottlenecks?
2. You will get the required knowledge of nginx in a few minutes - the manual is in Russian.

S
SEObomj, 2011-03-17
@SEObomj

If you do not use InnoDB and BDB,
uncomment these lines in /etc/mysql/my.cnf config
skip-innodb
skip-bdb

H
Hint, 2011-03-17
@Hint

You see, it's hard to talk about abstract optimization. You need to configure the server for specific conditions. For example, how many simultaneous requests to the server can you have? Based on this, the parameters are selected. MySQL and Apache must be configured together (for example, the max_connections parameter from my.cnf should roughly match MaxClients from httpd.conf). The parameters are selected depending on the size of the tables in the database, the size of the indexes, the number of simultaneous connections, the amount of free RAM, the processor load, etc.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question