Google Analytics

Pages

Monday, August 16, 2010

integrated marketing

Just went throug a presentation for pro funnel, and it is now clear that inbound marketing solutions are now more than "advanced" email marketiing solutions. They integrate with your website analytics, and CRM software to offer a real added value to your lead generation programs.  Swift Page is also worth mentioning.

Friday, August 13, 2010

tuning apache for low performance server

We have a 3 years old server running on 1Gb Memory (same amount as a mobile phone... ).

No surprise, we recently pushed it a bit with new website features, and it started crashing. The server needs to recover raid (synch disks) after each crash which can take up to 4h. In the meantime, server is more likely to crash, as less stable... And you end up with a catch 22 situation.

Conclusion 1: if you go for a dedicated server (specially if it is a 64 bits..), go for a minimum 2Gb (ideally 4Gb).

50% of the memory was used by the database, 50% by apache process. When you start having high server load, split the database and apache server, and run them on two separate servers.

You can finally tune Apache to use more CPU and a bit less memory (modifications in httpd.conf):

KeepAlive On (was: Off)
it allows to use one just connection, instead of opening a new one for each website element (HTML, image 1, image 2, image 3, css 1, css 2 and so on)

KeepAliveTimeout 3
if the client does not send new requests in 3 seconds, connection is closed (client can open a new one)


StartServers       8
MinSpareServers    5
MaxSpareServers   12   (was 20; as you don't have much memory, less "spare" processes will wait for new
requests)

ServerLimit      128        (was 256; but I'm not sure the memory would allow more than 40 or so anyway)
MaxClients       128        (was 256; similar as above)
MaxRequestsPerChild 200 (was 4000)                                                                                                                                                             

each Apache process can serve up to this number of clients, and then is killed and a new process is spawned
setting it low prevents some memory leaks at a cost of slightly more CPU usage (closing/spawning new processes faster)

The command line "sar" will give good information on server's load. Keep an eye on the columns "users" and "iowait"

1) High %users (user processes, apache and mysql) means that you need to upgrade your server, or split.
2) High iowait (> 30% for a web server) is dangerously high
 

Share it