News for hackers. Stuff that matters.
Re:Dd is not a disk writing tool (2015) by lloeki on Sunday January 08, 2017 @07:33AM (#13349454)
On OS X (and BSD?) be sure to use /dev/rdisk[0-9]+ instead of /dev/disk[0-9]+.

Details as to exactly why it's faster are welcome. (I just know it bypasses stuff).

EDIT: someone mentioned this below http://superuser.com/questions/631592/why-is-dev-rdisk-about...

Re:Dd is not a disk writing tool (2015) by mkup on Sunday January 08, 2017 @08:43AM (#13349658)
In FreeBSD, cached/block disk devices are long gone: https://www.freebsd.org/doc/en/books/arch-handbook/driverbas... so all disk devices in /dev are implicitly O_DIRECT.

Though, read cache can be enabled manually by creating separate device via gcache(8). This is usually not required, because caching is done at the filesystem layer.

It's important to specify block size for uncached devices, of course. dd(1) with bs= option will surely work, and with cp(1) your mileage may vary, depending on whether underlying disk driver supports I/O with partial sector size or not.

Re:Dd is not a disk writing tool (2015) by djent on Sunday January 08, 2017 @08:34AM (#13349628)
Ah wish I knew this last week. Writing Xubuntu to my USB took something like 2900 seconds from a Mac.
Re:Dd is not a disk writing tool (2015) by josteink on Sunday January 08, 2017 @11:56AM (#13350598)
Usually just specifying a reasonable blocksize works for me. bs=1m or so.

Without that it does literally take hours.

I suspect the default blocksize is really small (1?) and combined with uncached/unbuffered writes to slower devices, it just kills all performance outright.

Edit: answered! https://news.ycombinator.com/item?id=13350002

Re:Dd is not a disk writing tool (2015) by NamTaf on Sunday January 08, 2017 @07:45PM (#13353148)
Per the sibling comments, you just need to specify a sane block size. dd's default is really low and if you experiment a bit with 2M or around that you'll get near-theoretical throughput.

NB: Remember the units! Without the units you specify it as bytes or something insanely small like that. I've made that mistake more than once!

Re:Dd is not a disk writing tool (2015) by muterad_murilax on Sunday January 08, 2017 @09:02AM (#13349691)
In other words, about 48 minutes for a ~1.2 GB file?
Re:Dd is not a disk writing tool (2015) by isostatic on Sunday January 08, 2017 @11:46AM (#13350546)
About 3mbit/second, or 400kbytes a second. I'd expect something 50-100 times faster.