Monday 26 January 2015

Re: Creating Ubuntu USB sticks

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCgAGBQJUxo1mAAoJEOhnXe7L7s6jkGYQAJ/vFW7KBb/2rTQQ7pUbB/y+
CyM8V0c0Nr7+Z5ttp98iXdGpSmez0pASXempa6u4wGa3+9NbAVSArW4+DjO8YkWM
s4K4PMn9O8MzWEMOHFTuVMBBMMPbOfXlrfbIMX3eFTscv/lM2z/75mg/hl50tvbu
b+kVtbmRG2dHVmal4YcDd8JBfKABcUZfVif+qEln+GBVJtzbHNXkvnxDoPqbaly0
RFGbfNaAUmTQ8nfhqI2P5x8DjcTfsqNT7uXh+Yhw2Mn3dX1biu4DGW74eu3kNyMW
t8F2dSfvLe/C0FYXQOcLxNSXxjblbxOdvkE30prcepHotL9Cm47gxe/ElmdZ07SA
gmVzgE5n8PRqlGokJRfNJ4qKtE8Ozdlko/J2xq7t1eu9H9yQrPpewzU0V9zX4REA
/yiMCOOebXO8pazFeQD05Q+rwmFeuTy+/ei6eeF6Q0kYfsoI0LwGZ8nRG7td40jq
YdluBF0HQVnSJ4Mdv7KegwLPHsqd8bmqPQhCq4ijTL6aLClg2Ca95g1TKDh3kksR
QOWHVseKuyuhJ4vCBy/BFLui5UdXcprLlqupoALep0Gaxs9BJlrvTC1BgHEU+a0I
xCZLOh3DH0+xkcHUDzJmcf6lydMuduqk/NuCSNrdeYIyPKriV4UL9odHKPnhI21h
HBHKVMpbxdTspe3Li7fq
=nMzf
-----END PGP SIGNATURE-----
On 26.01.2015 17:49, Phillip Susi wrote:
> On 1/22/2015 10:22 AM, Stefan Bader wrote:
>> That is the expected behaviour with that incantation. If you added
>> a "oflag=sync" dd should return only after write has finished. In
>> your case you use cached writes.
>
> oflag=sync is terrible and should never be used as it does the
> equivalent of fsync() after every single write(). Not only does this
> cause terrible performance, but in the case of flash, will wear it out
> much more. Use conv=fsync instead to fsync() once, at the end.

You are right, as long as one does not also use bs=1M (for example). Which I
should have added. I usually add that without thinking, so I forgot. Which
causes bigger write sizes, so the performance is good. That blocksize should
also cover multiple erase blocks, so the wearout is no worse than with
conv=fsync (where the blocklayer may merge the defaul 512b request if no bs is
given).