Archive for January, 2009

Is cpanel good for high bandwidth and load sites

No Comments »

Many of our blog readers are asking if Cpanel or any other control panel is good for very high bandwidth and load hosting. I will disappoint you – no it’s not. It has too much whistles and features that’s simply not needed for high bandwidth web site hosting. Too many modules etc and getting rid of some modules may easily break your control panel software.

You LAMP box and enjoy the best performance, or even use nginx or cherokee as a front-end web server doing load balancing and static content serving.


Use memcached for WordPress performance

No Comments »

It’s good to cache dynamic content and read it fast from the memory when needed. This is  why memcached caching system was founded. A pretty good, fast and easy to use memory based caching system – all data is stored in RAM, thus there are no more IO problems. Memory is cheap nowadays and you don’t need much to cache, for example, 10 last pages, frontpage, feed etc.

Memcached works like this – you set-up a key/value and use API to store it in memcached daemon. After, you can read it from the memcached daemon if you know the key.… Read the rest of this entry »


Apache settings for prefork.c

No Comments »

We use a medium busy server and do prefer to run prefork.c module with the following settings:

StartServers 20
MinSpareServers 5
MaxSpareServers 20
ServerLimit 200
MaxClients 200
MaxRequestsPerChild 25000

The server is Dual Core Pentium with 2GB RAM and it’s not very busy server but does perfect.


Generate static content for performance

1 Comment »

Running a very popular and high-bandwidth website or blog? The load is killing the server? The website content is generated in real-time using PHP, .NET or CGI scripts?

You can easily increase your website performance by generating static files and serving such files much faster rather than generating files in real-time. Static files can be kept on the hard drive or in memory for blazing fast access, for example, using memcached.

Generating PHP static content
You can generate PHP output in multiple ways – from PHP code directly writing output to files or by fetching specific PHP output via HTTP… Read the rest of this entry »


Forget LAMP use LNMP

2 Comments »

Welcome folks. We have quite a few posts and praisings for LAMP architecture, but from now on there is a clear and better alternative – LNMP.

LNMP stands for Linux, Nginx, MySQL and PHP.

This is clearly the winner because of it’s performance and reliability you can count on.  Bundle the front-end Nginx web server with Memcached and you can serve millions of daily hits with easy on a simple commodity software. Stay tunned for more news!

Ps. for folks that still use LAMP – don’t panic, we suggest using LAMP as well, but for best performance just swap Apache… Read the rest of this entry »


Tuning tcp keepalive intervals for high performance

3 Comments »

We are fine tuning sysctl network stack on Linux OS and  change keepalive intervals for much better “response” times and load. These settings are lowered on our all managed performance servers that do host large sites – Drupal, WordPress and custom LAMP services.

Enter the following lines in /etc/sysctl.conf

net.ipv4.tcp_keepalive_probes = 2
net.ipv4.tcp_keepalive_intvl = 30

And execute “sysctl -p” to set these settings in real-time.

By default it’s for Linux (Fedora, Redhat, Centos):

net.ipv4.tcp_keepalive_probes=9
net.ipv4.tcp_keepalive_intvl = 75

Enjoy!


FreeBSD or Linux OS for the hosting server

1 Comment »

What OS is better FreeBSD or Linux for a hosting server?  There is no clear answer to this question so I guess stick with the OS you are more experienced. In long run it will pay off since you can manage it better and there is no need to test out things you don’t know and experience downtime in worst case.

I usually select Linux, Centos, Fedora or RedHat Enterprise – I am more comfortable with this OS and update process is quick and easy. Anyway, if you are a pro in FreeBSD there is no need for you to… Read the rest of this entry »


Boost WordPress with nginx front end

No Comments »

Prepare for real performance boost. Run Nginx in a front of Apache and serve all static content directly from Nginx. All php script requests are transparently forwarded to Apache daemon and output forwarded back to Nginx that servers it to a web visitor.

Web visitor -> Nginx -> static content -> Nginx -> Web visitor

if dynamic content then,

Web visitor -> Nginx -> dynamic content -> Apache -> Nginx -> Web visitor

For static content serving you should add the following nginx config:

location ~* ^.+.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|rtf|js)$ {
root /usr/www;
expires 10d;
break;
}
Read the rest of this entry »


Nginx performance settings

No Comments »

We are running WordPress on our multi-platform cluster and this is what we use for performance settings in nginx.conf

worker_processes 20;

events {
worker_connections 20000;
use epoll;
}

worker_rlimit_nofile 25000;

Nginx is a front-end and for backend we use Apache, however we will soon try different set-up using different architectures.

The client servers are 5400 Series Intel XEONs with 8GB RAM running Linux and SATA hard drives.


Linux up link aggregation for high availability and network performance

No Comments »

100Mbps up-link port is standard nowadays even for a low cost dedicated servers or  server co-location. When your web site visitors increase or you are landing Digg or Yahoo! front page a 100Mbps up-link will simply not cope with the load. If you upstream provider offers 1Gbps ports – go for it if your MRTG shows maxing out (or even 80Mbps or so peak time usage) 100Mbps up-link from time to time.

If your upstream provider doesn’t offer 1Gbps links and your server has two NIC ports, you can set-up link aggregation (network bonding) with IEEE 802.3ad mode and increase… Read the rest of this entry »