mysql 5.7 is working slow on ubuntu 18.04 LTS

5,713

The Linux Disk I/O elevator algorithm was the culprit.

$ cat /sys/block/{device-name}/queue/scheduler
noop deadline [cfq]

change the io mode to deadline, if use the ssd,should use noop

echo deadline > /sys/block/{device-name}/queue/scheduler

Append the choice of elevator algorithm to this kernel boot command entry. The changed linux kernel boot command will look like:

linux /vmlinuz-4.4.0-31-generic root=/dev/mapper/ashish--devbox--vg-root ro elevator=deadline
Share:
5,713

Related videos on Youtube

Rohit Bhakare
Author by

Rohit Bhakare

Updated on September 18, 2022

Comments

  • Rohit Bhakare
    Rohit Bhakare over 1 year

    I am currently using ubuntu 18.04 server ( with 8GB RAM , 100 GB HDD & Intel I3 processor ) for project deployment, & am using mysql 5.7 database server , but whenever I tries to insert data in database it has been inserting too slow as compare to Ubuntu 16.04 with same configuration .

    • Ubuntu 16.04 -> Mysql 5.7.24 -> insert data rate ( 250k-350k / Min )
    • Ubuntu 18.04 -> Mysql 5.7.24 -> insert data rate ( 10k-15k / Min )

    AS I check performance of the system while inserting the data into mysql then I found

    • Ubuntu 16.04 -> CPU utilization 60-70 %
    • Ubuntu 18.04 -> CPU utilization 7-8 %

    Ubuntu 18.04 restrict mysql application from utilizing maximum CPU , Please let me know the solution for above.

  • Wilson Hauck
    Wilson Hauck over 5 years
    Did you forget to include innodb_buffer_pool_dump_at_shutdown=ON in your list of items for your configuration? With no dump at shutdown, you would load old row pointers at startup.