throttling mysqldump

Nicholas Leippe nick at leippe.com
Mon Dec 29 16:22:38 MST 2008


On Monday 29 December 2008 04:06:20 pm Ryan Byrd wrote:
> So, let's say there is this centos box is running a mysql database
> that has db tables that are pretty big, (some > 1x10^6 rows)
>
> and when one runs mysqldump on the database, it spikes the load
> average, as reported by top, on the box to about 15
>
> this box also is running apache
>
> when the load average spikes to 10, apache pages are SLOW to load.
>
> how can one throttle the mysqldump so it doesn't use as many system
> resources?

Well, if you force it to use tcp (127.0.0.1), then you could set up tc rules 
for it and do it within the network layer.
Over unix pipes, I don't know. I recall seeing an application like dd once 
that could rate limit a pipe, but I don't remember what it was.
You could probably whip something up in perl or bash pretty easily to buffer 
it and limit it though.




More information about the PLUG mailing list