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

Re: Growisofs input cache (get away from dd?)



>> I found out, that growisofs uses the option O_DIRECT when opening
>> files. Does somebody know why this option is used? It seems to me
>> totally useless when reading ISO files...
>>
>> http://www.ukuug.org/events/linux2001/papers/html/AArcangeli-o_direct.html
> 
> You have to understand what O_DIRECT does to know why it is desirable to
> use it. Using O_DIRECT bypasses the system i/o buffers, not to benefit
> the burner program but to benefit the rest of the system users by not
> passing multiple GB of once-used data through the system buffers and
> blowing everything else out. Because the majority of use of media
> burning programs is not some form of do-it-yourself media burner, but
> users burning a single media with a single burner, and probably wanting
> to use the system with decent response while the burn takes place.

Well put.

> If you want to burn multiple copies of an image, you have YOUR program
> read the image, once, and send the data to the burning programs as stdin
> via a pipe. Don't depend on having the o/s providing the buffering, or
> special modes being used or not. You can do this in about 40 lines of
> perl, it's not rocket science. You need a burning program which will
> burn from its stdin, preferably without knowing how long the image is in
> advance, since an ISO image is not being created by the burning program.

It's definitely an option. However, piping incurs extra overhead and is
rather slow. This is because data is transferred between applications
through smallish kernel buffer. Not to mention that you might find
yourself in acute need to find a way to multiple synchronize recordings.
 I'm not saying that it's a bad suggestion, I'm only saying that it
requires extra consideration. A.


Reply to: