2014-08-29

Improving Performance of OpenShift VM

In previous post I've described how to install OSEoD-2.1.4-2.x86_64.vmdk image to run OpenShift Enterprise 2.1 on your Fedora/RHEL/CentOS machine using libvirt. There was information about:

  • resizing VM image
  • creating VM itself
  • configuring LVM to actually use additional VM storage
  • configuring OSE to use larger gear sizes
  • configuring static IP
  • configuring dev machine

However, after actually installing Fuse cartridge using openshift-origin-cartridge-fuse-6.1.0.redhat.390-2.el6op.noarch.rpm package, the performance was painfully slow, I wasn't able to create applications using fuse cartridge. Fabric was starting in more than 8 minutes...

I did a lot of tweaking, configuring, restarting, etc. and finally got to:

The final solution

Here's a list of tips to get RPM-based fuse cartridge running.

Optimizing VM image

In this post there's is solution to optimize qcow2 storage. I took original vmdk image and converted it into qcow2 format with preallocation set:

qemu-img convert -f vmdk -O qcow2 -o preallocation=metadata \
   /opt/vm/OSEoD-2.1.4-2.x86_64.vmdk \
   /opt/vm/OSEoD-2.1.4-2.x86_64-5.qcow2

(This time I've neither resized the image nor done any lvm/fs resizing. However I can't tell now whether this impacted the performance...)

Configuring VM

On VirtIO Disk 1 Configuration page I set:

  • Disk bus: VirtIO
  • Cache mode: none

After this, applications based in fuse cartridge where installed in less than 1 minute (which included starting the Fabric and waiting for io.fabric8.api.FabricService!).