Francesco Manicardi
Francesco Manicardi

Reputation: 809

AWS EC2 Instance suddendly running very slow after importing database

I have an AWS EC2 instance and I've been using it to play with a database backup (importing it with a PHP script, then changing the parameters and importing it again, and so on).

Yesterday, my import script was taking ~10 minutes. Today, it's taking ~10 hours.

What's the problem and how can I solve it? I checked with top command on the terminal and the CPU usage is quite low, and I checked the monitoring of my EC2 instance and I have full CPU credits balance.

Upvotes: 0

Views: 2223

Answers (1)

Francesco Manicardi
Francesco Manicardi

Reputation: 809

The problem was not the CPU credits, but rather the EBS I/O Burst Credits.

I found the answer at this link:

https://aws.amazon.com/it/premiumsupport/knowledge-center/ec2-instance-slow-cpu-not-high/

Resolution
Check I/O burst credit balance
Open the Amazon EC2 console.
In the navigation pane, choose Instances, and then select the instance.
On the Description tab, choose the Root device link, and then choose the EBS ID link.
Choose the Monitoring tab for the EBS volume, and then find the Burst Balance metric

If your burst balance Is 0%, then you need to wait for it to go back up or provision a EBS device with different parameters to support higher sustained I/O loads.

Upvotes: 3

Related Questions