Beacon probing uplink failover for Vmware Vsphere high availability

In order to correctly use beacon fail-over probing for Vmware vSphere server network connectivity you need:

  • 2 physical uplink switches in failover set-up;
  • 3 physical uplinks in team per each vSwitch with beacon probing enabled;
  • 2 of the uplinks (each going into different uplink switch) must be active and the third physical uplink should be set-up as a Standby adapter.

Beacon probing also works if you are using Vlan trunks. The only difference is that in case of any uplink failure beacon probes will be sent to all vSwitch VLANs increasing traffic a little.

Keep in mind:

You cannot advertise one MAC address to different uplink physical switches or Network flapping may occur. Do not use Beacon probing Network failover detection if you are using IP Hash Load balancing. Use IP Hash load balancing only with Etherchannel.

Comments

Boost your nginx web server performance by rewriting favicon.ico requests correctly

Popular sites receive high concurrent web visitor requests and some clients send bad favicon.ico fetch requests. If you are running nginx you probably didn’t notice that, for example: /category/favicon.ico generate significant 404 errors in your server error log file, because this file is located only in root, e.g. /favicon.ico.

Every request for non-existent file takes some load and every 404 missing file error is usually logged into error_log file, unless you have disabled error logging. To forward all non-root favicon.ico requests to /favicon.ico you can set-up the following rewrite rule in nginx.conf file in the correct server{} location:

rewrite ^/(.*)/favicon.ico$ /favicon.ico last;

Voila. Restart the nginx daemon and you will see slightly decreased load on your box.

Comments

HP Technology at Work 2010

I have been attending HP Technology at Work 2010 that currently hosts in Messe Frankfurt, Germany (April 26-29). Not very technical sessions so far (I am a tech person myself) for the first day, but I hope that more technical stuff is coming shortly.

Since I am a very big Vmware fan I had scheduled all sessions that cope with Vmware or virtualization (including Thin clients, Xen/Citrix). I hope to upload some photos tomorrow or perhaps tonight if I have enough time (Internet cost in hotel I am staying in is killing me!).

The new stuff:

  • HP Storage plugin for vCenter
  • HP Insight manager for Vmware servers

Comments

Suse Linux SLES 10 SP 3 Oracle problems with missing compat libstdc++ package

If you are trying to install Oracle database product(s) on Suse Novell Linux 10 SP 3 you may experience problem with missing compat rpm package. Novell SLES actually provides all the necessary files via libstdc++33 howerver Oracle installation doesn’t really recognize it and reports missing compat libstdc++ package.

If you have installed you may remove the following packages running the following rpm command:

rpm -e libstdc++33
rpm -e libstdc++33-32bit

A good alternative is to find a compat libstdc++ package from SLES 10 SP 2 and it works perfectly. The compact-libstdc++ package you need is as follows:

compat-libstdc++-5.0.7-22.2.x86_64.rpm

Download it and install it running:

rpm -ivh compat-libstdc++-5.0.7-22.2.x86_64.rpm

Enjoy!

Comments

Nginx high performance proxy caching system

Nginx has been built with ncache in the core. It’s very fast and offers great performance. It works quite nicely – you install nginx as a front-end proxy server and forward all php queries to Apache back-end. Then you set-up nginx to cache response from Apache back-end to static files on a file system (or even RAM disk).

in http{} section please define the path to proxy cache, levels, keys_zone name, expire time in minutes and max size in megabytes:

proxy_cache_path /path/to/cache levels=1:2 keys_zone=staticfilecache:180m max_size=500m;
proxy_temp_path /path/to/proxy_temp;

Please note that proxy_cache_path and proxy_temp_path should be on the same file system.

proxy_cache_key “$scheme://$host$request_uri $do_not_cache”;
proxy_cache staticfilecache;

in server {} location setting you should define the following values/settings:

proxy_cache_valid 200 15m;

The above caching settings will cache all valid 200 response for 15 minutes.

Comments

Boost your Wordpress blog performance with CDN Rewrites plugin

Finally a nice plugin has been released called CDN Rewrites. It does rewrite static content URL to custom URL. This does allow you to use remote Content Delivery Network (CDN) to distribute static content much faster (the cache edge nodes are much closer to the end user) and increase your site performance.

This plugin works with thrid party caching plugins (wp super cache for example) and does it what it has to do – rewrites images, style sheet files, javascript files and any other static file URLs to the content delivery network url – for example: http://static.yoursite.com or even http://static.contentdeliverynetworkcompany.com

Comments

Nginx worker_processes configuration and recommendations

From the many posts around the Internet and our own experience worker_processes value is recommended to be set to the number of cores your server has.
For example, if you have two dual core CPU you should set worker_processes 4;

Original worker_processes help from Nginx page:

worker_processes 4;

nginx has the ability to use more than one worker process for several reasons:

1. to use SMP
2. to decrease latency when workers blockend on disk I/O
3. to limit number of connections per process when select()/poll() is used

The worker_processes and worker_connections from the event sections allows you to calculate maxclients value:

max_clients = worker_processes * worker_connections

Comments

Increase your wordpress performance with W3 Total Cache plugin

We have been using memcached for quite long time with a very great success. It’s fast, it’s quite easy to use and incorporate in existing code. Furthermore, it’s totally free. Memcached caches value/key pair in RAM, thus giving fast access to it when you require.

Now, if you want to boost performance of your Wordpress blog it’s quite easy – get a W3-total-cache plugin, configure it and you are set (remember, you will need a memcached server running otherwise you can’t use memcached “storage” from W3-total-cache plugin).

In our tests it boosted our Wordpress blog performance from 20-200% depending on different scenarios. Very nice plugin and it’s quite easy to set-up. Get it now.

Comments

Installing high-performance Nginx for first time

I have been somewhat lazy nowadays (hey it’s a summer!), but I thought I need to post a quick guide about installing high performance Nginx daemon. It’s a super fast web serving daemon that is the best choice for static content serving at very high speeds. It requires small hardware resources and places very small load on the hardware.

Download the latest stable version 0.7.61 or fetch a newer version from nginx.net.

Installing nginx:
(depending on the required modules, I prefer to disable all modules that are not needed, for example if you do not wish to host SSL pages, don’t enable SSL and so on).

tar zxvf nginx-0.7.61.tar.gz
cd nginx-0.7.61
./configure

(you can also specify –prefix value if you wish to install nginx in a different folder)

Now you will need to configure nginx.conf file before firing up Nginx daemon.

For better security run Nginx under a non-privileged user:

user nobody;

For medium to high load sites I suggest increasing worker_processes to 5 to 15, or even more if your hardware allows it.

worker_processes 10;

To increase max allowed clients that can access your site increase worker_connections. A good value for start is 256 and higher if you have a more powerful hardware.

events {
worker_connections 512;
}

Please note! If you run a Nginx in reverse proxy configuration you will need to divide this value by 4 because two connections will be opened to client and two to the back-end. If you have worker_processes set to 10 and worker_connections set to 256, then max clients that can access your site will be worker_processes * worker_connections / 2, thus 10 * 512 / 2 becomes 2560 connections.

Now in http {} section you will need to define some settings like mime.types, default_type, log_format, access_log, sendfile, tcp_nopush, keepalive_timeout. That’s pretty self explaining. Just a quick note: Nginx requires very low hardware requirements for keeping keepalive connections active and it’s well know to take less than 30Mb of RAM for 10000 active keepalive connections. Make sure you have correctly calculated max client settings using the formulas above.

Now comes the server {} section were you define Listen to address, ports and custom settings, like redirects etc.

Example:

server {
listen      10.10.10.10:80;
server_name  localhost;

access_log  logs/host.access.log  main;

location / {
root   html;
index  index.html index.htm;
}

error_page  404              /404.html;

error_page   500 502 503 504  /50x.html;
location = /50x.html {
root   html;
}

10.10.10.10 IP is just an example, you will need to specify your allocated server IP.

I hope this quick guide helped you out a little. We will soon publish more in-depth guide about configuring Nginx.

Comments (2)

Monitoring your Linux server load

You can easily monitor your Linux server load using built-in bash commands like

w

free

top

However, many folks prefer sysstat package (can be downloaded here, or from your Linux distribution site) package that provides even further performance monitoring utilities:

iostat

sar

vmstat

——

Login into your Linux server shell and execute the above commands. iostat, sar, vmstat can be run like

vmstat 1 10

where 1 is the time between monitoring load, 10 is the count  how many times the data need to be read.

Comments