Beruflich Dokumente
Kultur Dokumente
2. Understanding IO Performance
Your goal with this assignment is to get some insight into IO performance within the Virtual
Machine instance we will use for the assignments.
Overall, you should address the following questions:
1. How fast can your host system perform sequential writes and random reads?
2. How fast can your VM instance perform the same sequential writes and random reads?
3. How do the fio paramters impact sequential write and random reads?
4. How do the VM virtual storage paramters impact sequential writes and random reads?
More specifically, you should
Create a new virtual disk. You should simply add a new disk (let us call it newDisk1.vdi) to the
SATA controller that already contains the system image (DB2-10.1-students.vdi). You should
choose a vdi format for that disk. You might want to experiment with two options (fixed-size
image vs. dynamically allocated image) to investigate question 4. Note that if your host disk is a
SSD you should check the SSD box when creating the disk. You should also make sure that host
IO caching is disabled on the VirtualBox SATA controller.
Once the virtual disk is created, you can mount it from Linux. Log in as student (see
GettingStarted for the default password). On my set up the new virtual disk showed up as a new
device named /dev/sdb . To use this device, we need to partition it (sudo fdisk /dev/sdb
we now have one partition /dev/sdb1) , and format it (sudo mkfs t ext4 /dev/sdb1). You
might want to experiment with different file systems to investigate question 4. Now, you need to
mount this formatted partition onto the file system. Create a data directory under /mnt (sudo
mkdir /mnt/data) and mount it (sudo mount /dev/sdb1 /mnt/data). You can now change
the access rights of /mnt/data so that you can access it from the student account (sudo chown
student /mnt/data followed by sudo chgrp student /mnt/data).
Work with the fio scripts inside the VM Linux guest:
cd YOUR_WORKING_DIR
wget http://www.itu.dk/courses/SDT1/F2013/FIO/randReads.fio
wget http://www.itu.dk/courses/SDT1/F2013/FIO/seqWrites.fio
You can now simply run the scripts and find out about the default performance of random reads
and sequential writes (i.e., question 2.). Before your execute the following scripts, take a couple
of minutes to think about what you expect the average throughput to be for sequential writes and
random reads
fio randReads.fio
fio seqWrites.fio
The output of fio is both clear and detailled it is explained in the HOWTO.
Now you can vary some of the fio paramters to evaluate their impact and study question 3 (e.g.,
iodepth i.e., the number of outstanding asynchronous IO requests that fio maintains as it
submits Ios; numjobs i.e., the number of concurrent jobs submitting the same IOs; bs the
size of the blocks written or read from disk).
From the host, you should install fio and run the fio scripts you ran on the Linux guest. What do
you expect? What do you observe?