|
From: | Florian Sedivy |
Subject: | Re: [Bug-ddrescue] ddrescue 10x slow under osx |
Date: | Fri, 21 Dec 2012 13:45:13 +0100 |
Hola Antonio, some additions. Am 20.12.2012 um 19:11 schrieb Florian Sedivy:
Ok, so I had another look at different sources and the way IO-Blocksize for cat is determined. OpenBSD: the above, MAX (stat.st_blksize, BUFSIZ) for special files it is MAX (stat.st_blksize, sysconf(_SC_PAGESIZE)) OS X: hardcoded minimum, MAX (stat.st_blksize, 1024) As you suspected, GNU coreutils do things a little bit more complicated:
Notably the minimum io_blksize in coreutils (used by cat, copy and split) is 64KiB, which is also ddrescue's default. For ddrescue the best approach for an adaptive default would probably be to check for the input file's stat.st_blksize and limit that in both directions. Lower limit and fallback value should be the current default of 64KiB. The upper limit does not need to be more than some MiB in my opinion, to make sure ddrescue can still provide regular status updates. As this would only be an (automated) default, users could always override it in both directions with -c. The only purpose is to give a good initial guess for optimum speed in most cases, without having to experiment with the media. It would be a small change (faster to change in the code than in the documentation probably), but in my opinion a valuable addition to the already fantastic and incredibly well-kept ddrescue! Greetings, Florian |
[Prev in Thread] | Current Thread | [Next in Thread] |