1

I'm facing an issue when dumping a mysql database to the network drive. The thing is I'm getting really slow speeds (around 3-7mb/s).

Dumping locally, the speed is fine. I've coded my own program that performs automatic backups 4 times per day and dumps from main server (windows vps) to a Linux vps’s samba server. Both of the servers have 1gb/s port speed. The thing is, for example when I manually upload a random file to the Linux machine's samba server, I get speeds up to 100mb/s. The database is around 45GB large. Also, before I was performing backups on a windows machine, had the program running there and it dumped the databases over network, speeds were also up to 100mb/s then. What could be the issue that i'm getting so slow speeds when dumping directly to the network drive?

The command I use:

mysqldump -u root -ppassword --single-transaction --hex-blob database worlds > "\\mysambaserver\Storage\folder\worlds.sql"
Mircea Vutcovici
  • 16,706
  • 4
  • 52
  • 80
  • Were you piping? Or writing to disk, then reading it? Which machine was the dump program running on? What is the network latency? – Rick James Oct 05 '21 at 02:57
  • Could you please add the output of `strace -c mysqldump ... > "\\mysambaserver\Storage\folder\db.sql"` I would like to see if your writes are slow compared to reads from DB. – Mircea Vutcovici Oct 06 '21 at 00:31
  • You could try to compress the DB on the fly: `mysqldump ... | gzip > "\\mysambaserver\share\db.sql"` – Mircea Vutcovici Oct 06 '21 at 00:33

0 Answers0