0

I have 2 similar servers, one on my local computer, the other on Linode. OS is Ubuntu 20.04 LTS on both.

When I import a large database into MySQL, my local computer uses less than 10% of CPU while the Linode server uses 100% of CPU. So Linode server completes the import much faster than my local computer.

What configuration makes the difference?

Michael Hampton
  • 244,070
  • 43
  • 506
  • 972
Sam Kong
  • 883
  • 1
  • 8
  • 10

1 Answers1

1

SSDs are on the order of 10 times as fast as HDDs. That does not directly explain "100% cpu". Instead, if the CPU @10% too 10 times as long (elapsed time), then that matches a CPU @100%.

Rick James
  • 2,463
  • 1
  • 6
  • 13
  • I confirm that the problem was slow drive. So I changed mysql data dir to SSD and now CPU is almost 100%. The HDD was the bottle neck. – Sam Kong Sep 30 '21 at 19:02
  • @SamKong - Now we can look at the query to see if a better index or better formulation would decrease the CPU. (I find that nearly all 100%-CPU queries can be sped up.) – Rick James Sep 30 '21 at 21:20