The query is very slow, and the memory cache and buffer are suddenly too large

Scenes

        Database stress testers found that statistical queries were very slow.

        Enter the service to check free, and find that the cache/buffer is very large.

implement      

         echo 3 > /proc/sys/vm/drop_caches

          cache/buffer is normal.

         But the query is still slow

See the size of mysql's innodb_buffer_poll, which is smaller than the file size. Causes a lot of files to be cached by the operating system.

 

Increase innodb_buffer_poll size, ok

 

Just talk about disk read and write

The HDD disk given by the company, and it is still 7200 rpm, is dead.

Then the iops per second is 7200/60=120.

innodb_page size is 16K

The random read and write per second is 120*16 = 1920K, and the maximum is 2M. 7.2G per hour

24G data, it takes more than 3 hours to read.

 

It only took 573 seconds to load 24G of data into memory.

Then the sequential read per second is 573 seconds

24*1024*/573 = 43M/S

 

This speed is still unacceptable.

 

 

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326529674&siteId=291194637