user
user

Reputation: 783

How can I determine what size Postgres RDS to scale to to allow quicker copy to csv?

I have a table in Postgres that I know will become a 5 GB csv. Right now I've got a t2.micro RDS, and the copy of that table to csv is slow. How can I figure out what size to scale up to (I'm guessing in read IOPS) so that the copy happens in say, half an hour?

Upvotes: 0

Views: 226

Answers (1)

Mark B
Mark B

Reputation: 200910

The problem here is that you are guessing. You need to look at CloudWatch metrics to determine exactly what the bottleneck is. It could be IOPS on your EBS volume, or it could be CPU usage, memory usage, or possibly you are running out of T2 instance CPU credits. You could also be running into network bandwidth limitations between your EC2 instance and your EBS volume.

Once you see which metric is being maxed out it will be obvious what you need to upgrade. If you need a faster CPU or more memory you can upgrade to a larger instance. If you are running into issues with CPU credits you might want to switch to a different instance type such as M4. If you are running into IOPS issues you could simply add an EBS volume with provisioned IOPS, or use a larger SSD volume that comes with a higher base IOPS. If it is an issue of network communication between your EBS volume and your EC2 instance, then you could upgrade to an EBS Optimized instance type.

Upvotes: 1

Related Questions