Run IOMeter on an Azure Linux VM with Azure Premium Storage

I had to do some IO testing for a customer with Azure Premium Storage. I was able to get some numbers using this command:
dd if=/dev/zero of=test.dat bs=1M count=10000;rm –f test.dat
However, wouldn’t it be cool if we could use the same IOmeter as Windows users in Linux? Well, it turns out this is actually possible!
I first created a 4 disk RAID 0 array on my DS3 size VM using these instructions: http://azure.microsoft.com/en-us/documentation/articles/virtual-machines-linux-configure-raid/
Once I had my RAID array, I then followed the instructions to add GNOME to my Linux VM: http://blogs.msdn.com/b/cloud_solution_architect/archive/2015/05/02/remote-desktop-to-your-linux-azure-virtual-machine.aspx
I used CentOS 7.1 from the Azure VM Gallery. Unfortunately, it turns out that you can’t just sudo yum install wine to get Windows application support in Linux because IOMeter is a 32-bit Win32 application and CentOS 7.1 only supports 64-bit Windows apps out of the box.
This Wiki article talks about how to install IOMeter on Linux: http://www.linuxintro.org/wiki/Iometer. However, there are a few issues with it. Here’s what I did:
wget http://downloads.sourceforge.net/project/iometer/iometer-stable/2006-07-27/iometer-2006_07_27.linux.i386-bin.tgz
tar xvzf iometer-2006_07_27.linux.i386-bin.tgz
cd iometer-2006_07_27.linux.i386-bin
cd src
chmod +x dynamo
sudo yum install ld-linux.so.2
sudo yum install libstdc++.so.6
sudo ./dynamo
This guide talks about how to install Wine on CentOS 6 (also works on 7.1): http://stackoverflow.com/questions/20971960/the-right-way-to-install-wine-on-centos-6-64bit. Here’s what I did:
1) Open another terminal window
2) Type this in the command window to download the Wine source:
wget http://downloads.sourceforge.net/project/wine/Source/wine-1.7.42.tar.bz2
3) Type these commands in the terminal window:
# sudo yum -y groupinstall 'Development Tools'
# sudo yum -y install libX11-devel freetype-devel
# sudo yum install alsa-lib-devel.i686 libsndfile-devel.i686 readline-devel.i686 glib2.i686 glibc-devel.i686 libgcc.i686 libstdc++-devel.i686 pulseaudio-libs-devel.i686 cmake portaudio-devel.i686 openal-soft-devel.i686 audiofile-devel.i686 freeglut-devel.i686 lcms-devel.i686 libieee1284-devel.i686 openldap-devel.i686 unixODBC-devel.i686 sane-backends-devel.i686 fontforge libgphoto2-devel.i686 isdn4k-utils-devel.i686 mesa-libGL-devel.i686 mesa-libGLU-devel.i686 libXxf86dga-devel.i686 libXxf86vm-devel.i686 giflib-devel.i686 cups-devel.i686 gsm-devel.i686 libv4l-devel.i686 fontpackages-devel ImageMagick-devel.i686 openal-soft-devel.i686 libX11-devel.i686 docbook-utils-pdf libtextcat tex-cm-lgc
# sudo yum install alsa-lib-devel audiofile-devel.i686 audiofile-devel cups-devel.i686 cups-devel dbus-devel.i686 dbus-devel fontconfig-devel.i686 fontconfig-devel freetype.i686 freetype-devel.i686 freetype-devel giflib-devel.i686 giflib-devel lcms-devel.i686 lcms-devel libICE-devel.i686 libICE-devel libjpeg-turbo-devel.i686 libjpeg-turbo-devel libpng-devel.i686 libpng-devel libSM-devel.i686 libSM-devel libusb-devel.i686 libusb-devel libX11-devel.i686 libX11-devel libXau-devel.i686 libXau-devel libXcomposite-devel.i686 libXcomposite-devel libXcursor-devel.i686 libXcursor-devel libXext-devel.i686 libXext-devel libXi-devel.i686 libXi-devel libXinerama-devel.i686 libXinerama-devel libxml2-devel.i686 libxml2-devel libXrandr-devel.i686 libXrandr-devel libXrender-devel.i686 libXrender-devel libxslt-devel.i686 libxslt-devel libXt-devel.i686 libXt-devel libXv-devel.i686 libXv-devel libXxf86vm-devel.i686 libXxf86vm-devel mesa-libGL-devel.i686 mesa-libGL-devel mesa-libGLU-devel.i686 mesa-libGLU-devel ncurses-devel.i686 ncurses-devel openldap-devel.i686 openldap-devel openssl-devel.i686 openssl-devel zlib-devel.i686 pkgconfig sane-backends-devel.i686 sane-backends-devel xorg-x11-proto-devel glibc-devel.i686 prelink fontforge flex bison libstdc++-devel.i686 pulseaudio-libs-devel.i686 gnutls-devel.i686 libgphoto2-devel.i686 openal-soft-devel openal-soft-devel.i686 isdn4k-utils-devel.i686 gsm-devel.i686 samba-winbind libv4l-devel.i686 cups-devel.i686 libtiff-devel.i686 gstreamer-devel.i686 gstreamer-plugins-base-devel.i686 gettext-devel.i686 libmpg123-devel.i686
$mkdir wine64
$ cd wine64
$ ../wine-1.7.42/configure –enable-win64
$ make
$ cd ..
$ mkdir wine32
$ cd wine32
$ ../wine-1.7.42/configure –with-wine64=../wine64
$ make
# sudo make install
# cd ../wine64
# sudo make install
$cd wine32
$wget http://downloads.sourceforge.net/project/iometer/iometer-stable/2006-07-27/iometer-2006.07.27.win32.i386-setup.exe
$wine iometer-2006.07.27.win32.i386-setup.exe
$ cd “.wine/drive_c/Program Files (x86)/Iometer.org/Iometer 2006.07.27″
$sudo Iometer.exe
Once IOMeter launched, I selected my RAID disk for each of the workers:
image
With a 4K Read Access Specification for each worker thread: (Note: Host cache for each data disk was set to none; these are not official benchmarks and are specific to my environment)
image
This is actually a littler better than the DS3 VM Specification:
image
The same test on a scaled up DS 13 with the same 4 disk RAID 0 array:
image

Remote Desktop to your Linux Azure Virtual Machine

If you’ve ever wished you could get a GUI experience with your Azure Linux VM’s, here’s how you can do it. While I’m not suggesting you should do this for production VM’s that are running server workloads, there are times when it could be useful to get a full GUI with Linux. If you are onboard, here’s what you need to do.
Note: If you want you could just follow the steps for getting VNC installed and be done. However, being able to use an RDP client from any Windows machine without installing anything could be more convenient.
I used CentOS 7.1 from the Azure gallery but other RedHat based Linux distros will probably work (e.g. Oracle Linux)
1) Login to your Linux VM
2) Install the GNOME Desktop using this command:
sudo yum groupinstall “GNOME Desktop” “Graphical Administration Tools”.
This will take several minutes
3) Install TigerVNC:
sudo yum install tigervnc-server xorg-x11-fonts-Type1
4) Copy the vncserver.service file:
sudo cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service
5) Using something like vi, edit /etc/systemd/system/vncserver@:1.service. Look for the <USER> tags in the file and replace with your Linux username.
# Clean any existing files in /tmp/.X11-unix environment
ExecStartPre=/bin/sh -c ‘/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :’
ExecStart=/sbin/runuser -l <USER> -c “/usr/bin/vncserver %i”
PIDFile=/home/<USER>/.vnc/%H%i.pid
ExecStop=/bin/sh -c ‘/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'[Install]
WantedBy=multi-user.target
6) If you are running a firewall, you may need to open the ports we will need:
firewall-cmd –permanent –zone=public –add-port=5901/tcp
firewall-cmd –permanent –zone=public –add-port=3389/tcp
firewall-cmd –reload
7) Install XRDP using these commands:
sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
sudo
rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm
sudo yum install xrdp
sudo chcon -t bin_t /usr/sbin/xrdp*
sudo systemctl start xrdp.service
sudo systemctl enable xrdp.service
sudo systemctl start xrdp-sesman.service
8) Start VNCServer
vncserver
You will get prompted to enter a VNC password
9) Verify that VNCSever and XRDP are running with netstat –ant:
image
10) Next add the endpoints for RDP and VNC to your Linux VM. It’s probably a good idea to use ACLs to restrict access from a particular remote subnet (see this: http://azure.microsoft.com/en-us/documentation/articles/virtual-machines-set-up-endpoints/). Go to your Linux VM in the Azure Management Portal and click on EndPoints. Add an Endpoint for RDP and VNC on ports 3389 and 5901. I picked a random port for RDP (you could do the same for VNC):
image
image
11) At this point you can test connectivity using a VNC Viewer:
 
image
image
12) Next, try a Remote Desktop Connection:
image
image
Success!
image
12) (optional) If you don’t need VNC exposed externally, you can delete the Azure endpoint and just use RDP