bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Speed parameter for 'dd' command


From: sdrb
Subject: Re: Speed parameter for 'dd' command
Date: Fri, 18 Dec 2009 15:11:31 +0100
User-agent: Thunderbird 2.0.0.21 (X11/20090302)

Pádraig Brady pisze:
On 17/12/09 12:20, sdrb wrote:
Hello,

I'd like to ask if it would be possible to add new parameter to "dd"
command. I was thinking about "speed" parameter. Sometimes it is needed
to use "dd" with very large amount of data and the whole process can
cause quite high load average for long time.
Maybe it would be good idea to add some kind of limitation for "dd"
command - and limits I/O operations to given kB or MB per seconds?
For example:

dd if=/dev/zero of=/dev/sda speed=4096k

and it will limits I/O operations to 4MB/s?

Of course the whole "dd" process will take more time to complete in this
case, but at the same time it will be possible to keep load average in
more acceptable values and thus make using system more comfortable.

What do you think?

Well you would only slow things down so as to not take resources
from other processes, but they in turn might not be constantly
using those resources. I.E. it would be better to tell the
system the priorities and let it sort it out optimally.

Have you tried ionice?

cheers,
Pádraig.

You mean - have I tried to use ionice with IDLE class?
Yes, I tried ionice with IDLE parameter, but if I have to run more than one "dd" simultaneously - even if I use IDLE class - I have not any influence on this how the IDLE class will share I/O resources into those dd commands.

My intention was to limit the I/O operations to given value - so it could be possible to do I/O at this speed or a bit slower but not faster that the set value. It doesn't have to keep given average I/O speed for the whole time with 1 byte accuracy.

In the simplest version it could be done by sleeping for some time after transmitting one block of data for as long as the average I/O data speed is equal to set one with "speed" parameter. This "speed" parameter could be optional - not obligatory.

I've made some patch for doing this and it works quite good. It allows to keep very low load average, but of course the whole "dd" process takes much more time to finish.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]