Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I think using a small bs also determines the size of the cache you use, as its the buffer.


GP is talking about the Linux kernel's buffer cache. Unless you tell the kernel to operate directly on the disk, your reads come from and your writes go to pages within the kernel's buffer cache. Using a small bs probably results in a buffer of only bs bytes inside dd's address space, but the buffer cache is completely different and resides in the kernel.

That is, without iflag=direct, dd will repeatedly ask the kernel to copy bs bytes from the kernel's buffer cache into dd's address space, and then ask the kernel to copy bs bytes from its address space into the kernel's buffer cache.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: