Skip to content

EC2 Instance Recommendation for TimescaleDB with High Disk Read Performance

0

Hi,

We are looking for recommendations on the most suitable EC2 instance type for running a self-managed TimescaleDB installation. We specifically need an EC2-based solution, not a managed database service.

Our requirements:

  • Disk: 200GB
  • Database Size: ~50GB

Current Instances Used: C5 and T3 (but experiencing disk read bottlenecks) We have conducted benchmarks using gp3 volumes configured with 3000 IOPS and 600 MiB/s throughput, but in random read tests, we have never achieved more than 40-50 MiB/s.

The only instance where we obtained ~300 MiB/s in benchmark tests was an r7gd with ephemeral NVMe storage. However, since ephemeral storage does not meet our durability requirements, we need an alternative that provides similar performance with non-ephemeral storage.

Could you please advise which EC2 instance and storage configuration would allow us to achieve comparable disk read performance (~300 MiB/s or more in random reads) while ensuring data persistence?

Thank you for your support.

asked 2 years ago327 views

2 Answers
0

Based on your requirements for high disk read performance and data persistence, I would recommend using an EC2 instance type that supports Amazon EBS io2 Block Express volumes, combined with a Provisioned IOPS SSD (io2) volume.

Specifically, you might want to consider using one of the following instance types:

  • r5b
  • r6in
  • r6idn
  • x2idn
  • x2iedn

These instance types are designed to work with io2 Block Express volumes, which can deliver up to 256,000 IOPS and 4,000 MB/s of throughput per volume. This should easily meet your requirement of achieving ~300 MiB/s or more in random reads.

For your storage configuration, I recommend using an io2 Block Express volume. These volumes are designed to provide consistent sub-millisecond latency and deliver the provisioned performance 99.9% of the time. They're ideal for I/O-intensive workloads like databases, offering both high performance and durability.

To meet your 200GB disk requirement, you could provision an io2 Block Express volume of that size. You can then adjust the IOPS as needed, up to a maximum of 256,000 IOPS for volumes 256 GiB and larger.

This combination of a compatible EC2 instance type and an io2 Block Express volume should provide you with the high disk read performance you're looking for, while also ensuring data persistence. The io2 Block Express volumes offer 99.999% durability, which should meet your durability requirements.

Remember to monitor your database performance and adjust the provisioned IOPS as needed to optimize for your specific workload. Also, ensure that your TimescaleDB configuration is optimized to take advantage of the available I/O performance.
Sources
Amazon EBS Provisioned IOPS Volume - Amazon Web Services
Amazon EBS volume types - Optimizing PostgreSQL Running on Amazon EC2 Using Amazon EBS
Amazon EBS-optimized instance types - Amazon Elastic Compute Cloud

answered 2 years ago

AWS
EXPERT

reviewed 2 years ago

  • What is the difference between io1 and io2? Do these volumes have lower or higher performance than ephemeral NVME?

0

Refer to https://aws.amazon.com/ebs/provisioned-iops/ for io1 vs io2 block express comparison. io2 block express has higher performance.

As for comparison with NVME, there are some figures at https://docs.aws.amazon.com/ec2/latest/instancetypes/so.html#so_instance-store. You can conduct your own disk benchmarks to evaluate performance

AWS
EXPERT

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.