Tuesday, July 26, 2011

Tuning NFS Performance

Tuning NFS might make you think of 'Need for Speed' - but we all know we are referring to Network File System - one of those love it or hate it network protocols. NFS can be a cheap way to implement shared storage or as the base protocol for a Network Access Storage (NAS) - unfortunately NFS can be slow out of the box, so this article will help you boost a bit of performance from it!

Ok this is not going to be one of those long articles depicting what each mount option of NFS does and what not, without giving an actual solution to tune its performance. In any case, you can use the man page of nfs to check those out! So the most important options which help in speeding up NFS are:

  • udp - contrary to what other people say, we suggest to use udp instead of tcp - this will increase transfer speeds by hundred times without any compromise!
  • wsize/rsize - put these as high as possible, normally values of 32768 or 524288 or 1048576 - just experiment!

Yep it's just as simple as that...no dark secrets. Now you have a fast NFS communication. Thus, in all, the mount options should look something like this:

rw, intr, hard, nolock, wsize=1048576,rsize=1048576, 
udp, nfsvers=3, noauto

Friday, July 22, 2011

Move, Backup or Clone a VirtualBox

Virtualbox is a virtualisation technology owned by Oracle which allows you to install virtual machines on top of your operating system. If you like to setup a test lab or maybe try a new Linux/Windows distro, Virtualbox is a great choice. This article explains how to move, backup or clone a VirtualBox.

Most people run important setups on VirtualBoxes and one may need to move them across other servers, or directories, or maybe take backups to a DVD. Unfortunately this is not trivial as copying the virtualdisk and pasting it to the desired location. In VirtualBox, moving a virtual machine involves these two steps:

  1. Clone the virtual disks (*.vdi)
  2. Create a new virtual machine and add the cloned disks
Cloning a virtual disk can be performed by using the following code:

VBoxManage clonevdi machine-A/boot.vdi 

In windows, the code is slightly modified as follows (make sure you enclose the path in double quotes):

VBoxManage clonevdi "c:\machine A\boot.vdi" 
"E:\media\cdrom\backups\machine A\boot.vdi"
Finally create a new virtual machine but use the previously created cloned disk.