3.1 Sequential read and write tests

Sequential read and sequential write tests

  1. From the AWS console, click Services and select EC2.

  2. Select Instances from the menu on the left.

  3. Click on the Volume Gateway instance.

  4. You can enable Detailed Monitoring either by:

    a. Right-click on on the Volume Gateway instance and choosing Manage detailed monitoring then tick Enable and click Save

    or

    b. On the bottom panel click Monitoring and the click on Enable detailed monitoring. (This option will depend on the console version and view)

  1. Click Save.
  2. In the top panel then right-click on the EC2 Initiator Instance and select Connect from the menu.
  3. From the dialog box, select the Session Manager option, as shown below:

  1. Click Connect. A new tab will be opened in your browser with a command line interface (CLI) to the EC2 Initiator Instance.

  2. Run the following command:

    cd /home/ssm-user/fio

  3. Create a sequentialread.fio text file.

    nano sequentialread.fio

Copy and paste the parameters below, replacing [devicename] with the device from last step of the previous module e.g. sda

[global]
bs=256K
iodepth=256
direct=1
ioengine=libaio
group_reporting
time_based
runtime=120
numjobs=8
name=raw-read
rw=read

[job1]
filename=/dev/<DEVICENAME>
  1. Save the file and exit the Nano Editor.

  2. Run the following command:

    sudo fio sequentialread.fio

This test will run for 2 minutes and provide a summary similar to below:

Let’s take some time to examine these results before we move on. The test was a sequential read using 8 processes and a block size of 256K. Average throughput was 484913KB/s or 485MB/s which is 3.8Gb/sec and 1894 IOPs at 256K.

Note: your results will be slightly different but should be comparable. If you find your results are massively outside those seen above, go back and check your .fio file for formatting. It should be identical in number of lines and spacing.

Before we look at the latency figure we need to consider that although this is a sequential read no data has been written to this volume yet so the cache buffer will be empty. As such all reads will be coming direct from Amazon S3, which explains the higher latency figures. We are not hitting any CPU limits on the Volume Gateway and we will examine these through CloudWatch after the next task.

  1. Create a sequentialwrite.fio text file with the following content:

    nano sequentialwrite.fio

Copy and paste the parameters below, replacing [devicename] with the device from last step of the previous module e.g. sda

[global]
bs=256K
iodepth=256
direct=1
ioengine=libaio
group_reporting
time_based
runtime=300
numjobs=8
name=raw-write
rw=write

[job1]
filename=/dev/<DEVICENAME>
  1. Save the file and exit the Nano Editor.

  2. Run the following command:

    sudo fio sequentialwrite.fio

This test will run for 5 minutes and provide a summary similar to below:

We can see that we are not CPU constrained on the instance, the throughput is nearly half the read test at 287236KB/sec or 287MB/s and 1122 IOPs at 256K. We are running this test for 5 minutes as we are going to examine the stats in CloudWatch.

Note: your results will be slightly different but should be comparable. If you find your results are massively outside those seen above, go back and check your .fio file for formatting. It should be identical in number of lines and spacing.