Slower performance on a better server?

1

Yesterday I've imported 10 million rows into MySQL in about 1 hour, using SomeHosting's:

2C CPU/4GB Memory/60GB SSD [Ubuntu 14.04 64-bit]


Today I've imported only 500k rows in 1 hour, using my 'desktop' server:

4C CPU/16GB Memory/4TB HDD [CentOS 6.5 64-bit]


The only difference I see here is the SSD, but I don't think it matters, for let's say, 1GB data total. Am I missing something? Is there any chance to be a configuration, that somehow limits the import? The server stays on 10% Memory Usage and 2% CPU Usage.

htorbov

Posted 2015-12-30T17:07:22.847

Reputation: 43

1You do understand, that MySQL is primary limited by the speed of the storage device, and not the speed system's processor? By your own admission the server is using neither memory nor the CPU when it processes the query. – Ramhound – 2015-12-30T17:20:04.297

I wasn't thinking clearly about this. When I think about it, it makes sense, since it's 10x slower, just like the SSD/HDD speed difference. Thanks for the heads up! – htorbov – 2015-12-30T17:41:04.363

Answers

0

The speed of MySQL does not rely on memory and CPU as it does on the storage device (in this case SSD v. HDD)

Taking into account that an SSD is already MANY times faster than an HDD and more reliable when it comes to read/write speeds, it can also be that the HDD in your other server may be on its last days and struggling to carry out its job (and HDD has a very limited lifespan compares to an SSD) so the age and the beating that HDD has taken through its lifespan may also take a big toll on the current performance said HDD, therefore, accounting for the time difference.

Also, take a look at the difference in data those 500k rows represents because if it is only 1GB then its time to throw out that HDD and replace it. As I have seen HDDs that had taken a serious beating spend 20min writing 250Mb.

I'm writing all of this assuming connection speeds were the same in both instances.

net30

Posted 2015-12-30T17:07:22.847

Reputation: 56