4.4 Performance testing

Performance tests on the EBS volume

  1. From the AWS console, click Services and select EC2.
  2. Select Instances from the menu on the left.
  3. Right-click on the EC2 Initiator Instance and select Connect from the menu.
  4. 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 command:

    cd /home/ssm-user/fio

  3. Edit the sequentialread.fio text file:

    nano sequentialread.fio

replace < devicename> with the 500GB EBS volume from the previous module e.g. nvme1n1

filename=/dev/<devicename>

Save and exit the nano editor.

  1. Run the following command:

    sudo fio sequentialread.fio

this test will run for 2 minutes and provide a summary similar to below.

  1. We get an unexpected result of around 2000 IOPs. This is due to us hitting the bandwidth limit of the c5 instance.

For more information on Amazon EBS Optimized Instances: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-optimized.html.

To prove this we are going to change the block size. Edit the sequentialread.fio text file as follows:

 nano sequentialread.fio

and replace bs=256K with bs=16K

bs=16K
  1. Save and exit and then run the following command:

    sudo fio sequentialread.fio

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

  1. We hit 20,000 IOPs due to the limit of the c5 instance type.
  2. To prove this we are going to change the EC2 instance type. Navigate to the EC2 console.
  3. Select Instances from the menu on the left.
  4. In the top panel, right-click on the EC2 Initiator Instance and select Instance State -> Stop from the menu.

  1. Wait for the instance to stop, and then right-click on the EC2 Initiator Instance and select Instance Settings -> Change Instance Type from the menu.

  1. Select c5n.9xlarge and click Apply.

Notice the EBS-optimized tick box is ticked as it is enabled by default for this instance type.

  1. Right-click on the EC2 Initiator Instance and select Instance State -> Start from the menu.

  1. Wait for the instance to start.
  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:

    sudo fio /home/ssm-user/fio/sequentialread.fio

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

  1. We can see we now reach 25,000 IOPs which was the limit we set on the volume (Module 4.2, Create a snapshot, step 10.)

Module 4 Summary

In this module you have created an EBS volume from a snapshot of the Volume Gateway volume. This can be useful for migration, testing or even disaster recovery. You then continued to run performance tests on the EBS volume and understand the limits imposed by both the instance type and the volume.

Now all that’s left is to tidy up the environment in Module 5.

Continue to Module 5.