LWN.net Logo

The best way to throw blocks away

The best way to throw blocks away

Posted Dec 2, 2010 14:21 UTC (Thu) by hamjudo (subscriber, #363)
Parent article: The best way to throw blocks away

It may not make sense for real hardware yet, but it may be a win for virtual hardware. Most noticeably in application software testing, where there is a virtual machine for each of many different test environments. Moving the system images around and uncompressing them, may take longer than the actual tests. If blocks are "discarded" by being zero filled in the virtual environment, they will compress much better and on expansion, they will show up as a sparse file. /dev/zero is the faster than any real disk. We should use it whenever possible. And as etienne pointed out, /dev/zero doesn't leak information.


(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds