Reputation: 4338
I have gone through some of the links Which talks about fastest way of copying files in windows using FILE_FLAG_NO_BUFFERING
and FILE_FLAG_OVERLAPPED
. It also talks about how
request made for read and write opeartions with BUFFER SIZE
as 256KB and 128KB
are faster than 1Mb
.The link for that is :-
Explanation for tiny reads (overlapped, buffered) outperforming large contiguous reads?
I am also loking for a Similar method in linux Which allows me to copy the content of my DVD to Hard Disc in a fast Way . So I wanted to know Is there some file operation flags in Linux which would provide me the best result or Which way of Copy in Linux is the best ? My codes are all in c++.
Upvotes: -1
Views: 1284
Reputation: 913
Mount your DVD, open() the files you want to copy, and use sendfile(). If you'd like to copy the full DVD, you might also try to open() the DVD's /dev entry and pass that descriptor to sendfile().
$ man 2 sendfile
"sendfile() copies data between one file descriptor and another. Because this copying is done within the kernel, sendfile() is more efficient than the combination of read(2) and write(2), which would require transferring data to and from user space."
Upvotes: 1