Score:1

Mysqldump really slow when dumping to network drive

cn flag

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"
ua flag
Were you piping? Or writing to disk, then reading it? Which machine was the dump program running on? What is the network latency?
cn flag
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.
cn flag
You could try to compress the DB on the fly: `mysqldump ... | gzip > "\\mysambaserver\share\db.sql"`
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.