- Newest
- Most votes
- Most comments
The performance you're experiencing with EC2 instance store volumes is indeed lower than what these instances are capable of. There are a few factors to consider and steps you can take to improve performance:
-
Instance Store Initialization: Some instance store volumes suffer from a first-write penalty unless initialized. This is particularly true for NVMe SSD volumes. To optimize disk performance, you should initialize the volumes before running your tests. This can be done by writing once to every drive location before production use.
-
Expected Performance: Based on the specifications provided by AWS, the instance types you mentioned should be capable of much higher performance:
- i4g.xlarge: Up to 125,000 IOPS for random read operations and 100,000 IOPS for write operations
- m6id.xlarge: Up to 87,500 IOPS for random read operations and 35,000 IOPS for write operations
- m5ad.2xlarge: Up to 70,000 IOPS for random read operations and 40,000 IOPS for write operations
-
Testing Methodology: The method you're using (
dd
) is good for basic testing, but it might not fully utilize the capabilities of NVMe SSDs. Consider using more sophisticated benchmarking tools that can generate multiple threads and queue depths to fully stress the storage. -
TRIM Support: All the instance types you mentioned support TRIM, which can help maintain SSD performance over time. Ensure that TRIM is enabled on your file system.
-
File System Choice: While ext4 is a good general-purpose file system, you might want to experiment with other file systems optimized for SSDs, such as XFS or F2FS, to see if they provide better performance for your specific workload.
-
Instance Size: Larger instances often have better I/O performance. If possible, test with larger instance sizes to see if performance scales as expected.
-
Queue Depth and I/O Size: NVMe SSDs often perform best with higher queue depths and larger I/O sizes. Adjust these parameters in your benchmarking tools to find the optimal configuration.
To improve performance:
- Initialize your volumes before testing.
- Use benchmarking tools designed for NVMe SSDs, such as fio or nvme-cli.
- Experiment with different file systems and mount options.
- Ensure your kernel and NVMe drivers are up to date.
- Consider using larger instance sizes if your workload requires higher performance.
By addressing these factors, you should be able to achieve performance levels much closer to the specifications provided by AWS for these instance types.
Sources
Specifications for Amazon EC2 accelerated computing instances - Amazon EC2
Specifications for Amazon EC2 storage optimized instances - Amazon EC2
Specifications for Amazon EC2 general purpose instances - Amazon EC2
Initialize instance store volumes on EC2 instances - Amazon Elastic Compute Cloud
Relevant content
- asked a year ago
- asked 4 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
The instance store specifications at https://docs.aws.amazon.com/ec2/latest/instancetypes/gp.html#gp_instance-store and https://docs.aws.amazon.com/ec2/latest/instancetypes/so.html#so_instance-store state that initialization is not needed for any of the three instance types I tested, are you saying that information is incorrect?
I have tried multiple
dd
commands in parallel, which will utilize multiple queues, but I don't see any difference in the observed throughput. Also how would I run a benchmark with nvme-cli, I don't see any benchmarking functionality in the documentation?Do you know if the quoted IOPS specifications are applicable if all of those operations are 128 KB writes? I am seeing many fewer IOPS, which are almost entirely composed of large write operations.