I found out that MySQL on EC2 (Ubuntu 12.10) can be very slow. It only takes 700 ms to complete a specific set of SQL queries on my local PC (Windows 7), while EC2 takes more than 13 seconds.
The database is very small, only 12 MB. There is almost no disk I / O during the request. However, the EC2 instance is 20 times slower. All databases are based on the same dump: the same tables and the same indexes. Queries return the same results. The only difference is runtime.
I tried M1.small and M2.xlarge (which is 7 times more processing power than M1.small) - the result is the same: requests take almost the same time on both servers, and both of them are very slow.
Why could this happen?
source
share