upsforum

Well-Known Member
Jul 27, 2005
473
0
166
HI ,

I manage a site (only this site) in dedicated server, this site run high number query mysql, php and rewriteengine query

This is detail of server:

Pentium dual xeon 2.8 GHz
3 Gbyte of RAM
Dual HD SATA 160 GByte

stats of site:

Average hits per day 1.264.368
Average pages per day 126.979
Average unique per day 52.000
Average bandwidth per day 11 Gbyte


I search a solution for optimization the performance also buying a second server but I don't idea like manage two servers, in clustering? mysql on first server and apache on second server? you what suggests?
 
Last edited:

gupi

Well-Known Member
Apr 27, 2004
125
0
166
yes, having two servers with mysql on the second will give you a lot of freedom.
It is nothing complicated, just attention.

Ideally would be nice to have a secondary network card on each server server (gigabyte would be preffered) and have both servers directly linked via these cards.

After copying the databases on the second server, you just have to modify the config files of the site, in order to look onto the other server and fine-tune the firewalls in order to let the two servers communicate.
 
Last edited:

Spiral

BANNED
Jun 24, 2005
2,018
8
193
Clustering and load balancing the traffic between 2 servers would be the ideal solutions
however you can also try to make a few optimizations and see if it helps any.

Taking into account you have a Dual Xeon ...

In your /etc/httpd/conf/httpd.conf file, make the following changes
to the various respective configuration setting lines:
Code:
Set  "Timeout" to 10
Set  "KeepAliveTimeout" to 5
Set  "MaxKeepAliveRequests to 150
Set  "MaxRequestsPerChild" to 500
Set  "MaxClients" to 256
Set  "ServerLimit" to 256
Set  "SendBufferSize" to 131072
Set  "StartServers" to 8
Set  "MinSpareServers" to 16
Set  "MaxSpareServers" to 32
Save the file and don't forget to restart Apache and see if that helps
your performance and load levels.
 

upsforum

Well-Known Member
Jul 27, 2005
473
0
166
Hi,

thank you for your suggest but in my httpd.conf I don't match

ServerLimit
SendBufferSize

I can adding??
 

Spiral

BANNED
Jun 24, 2005
2,018
8
193
for ServerLimit apache get the error: module not included in the server configuration
Sounds like you have a minimally configured Apache installation ;
In which case you can just omit the "ServerLimit" setting and the
other configuration setting will still help irregardless.
 

freedman

Well-Known Member
Feb 13, 2005
314
5
168
I don't have idea for who use clustering, you can suggest me various link for more informations?
I havn't seen a "howto" for setting up "clustered" cpanel installations.
time permitting, I'll be writing up one for the solution I currently use..but it's more specific for my personal situation.

Basically, here's what I'm doing:
running mysql in a Master-Master replication configuration (search google for how to do this).

sync your web files/homedirectory to a 2nd server. (I use "unison" to do the synchronization and run it at a frequency which doesn't leave file system updates behind--if you're a mostly DB driven site with mostly static files, then this needn't be done very often--or can be done manually when the files are updated).

copy the httpd.conf to the 2nd server.. modify any IP addresses to match those of the 2nd server instead of the first.

now, put both IP's in the DNS for the domain in question, the DNS server that comes with cpanel will serve the IP's round robin.

so, you'll get a pretty well load balanced solution on both servers.

it takes a bit to get things set up.. mostly making sure replication is working and then tuning t'unison' time.

there are some caveats to be aware of:
if you're website updates files (or allows users to update files), then there are likely to be issues where the same file is updated diffferently on both servers, which will cause problems...so, as I stated, it's very specific to my situation, but it may help you think about options.


I wont be able to provide more help until I get around to writing a 'how to' which wont be for a month or so.. (partly because I dont have time, and partly because i want to wait for cpanel 11 release to see what might change in the implementation)