Score:0

mysqldump restore with poor performance

tn flag

we need to migrate our platform from an on premise location to azure cloud. In this context, we need to take a mysqldump from our mariadb on premise server and inject it to an azure mariadb managed solution. We need to be able to perform this restoration as fast as possible since our maintenance window is short but, at the moment, we get poor performance.

The managed mariadb server has 4 CPU, 20 GB RAM and 150 GB storage (given for 450 IOPS), the VM doing the injection has the same type of setup. So we are injecting a 25 GB database in 2 hours, with maximum 9MB/s throughput. When we look at monitoring dashboard, our VM is doing almost nothing (cpu, ram, network) and do not look overwhelmed at all. The managed database server is hardly 60% CPU, 80% ram and 60% "IO Percent".

The innodb_buffer_pool_size is 8GB and we already tried to set autocommit to 0 during the injection. We tried to upgrade both the VM and managed db server (8 CPU) but the performance were not better. thanks for your help !

Azure version is mariadb 10.3.23, it looks like innodb_log_file_size is not tunable in mariadb managed azure database parameters but is 256 MB. It looks like innodb_flush_log_at_trx_commit is not tunable too (it is set to 1)

What would you advise in order to speed up the process ?

Thanks very much for any help,

ua flag
Setting `autocommit` to 0 is asking for trouble. Did you remember to eventually `COMMIT`? I _think_ that large actions with 0 are slower because it overruns the logs.
ua flag
Look in the dump file. You may find `BEGIN` and `COMMIT`. These override any setting of `autocommit`.
Alex T. avatar
tn flag
yes we commit, anyway, this did not speed up the insertion so we did not do it anymore :(
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.