Huffman packing Permissions
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
Perhaps it is just a crazy idea,
But what about Huffman-packing all the File/Directory Permission? They are extremely redundant on normal installations:
0644
0600
0755
0777
0700
are 99% of all files
I think one Huffman Table per Partition should be enough.
Many greetings,
- --
~ Philipp Gühring [email protected]
~ http://www.livingxml.net/ ICQ UIN: 6588261
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE+UMX7lqQ+F+0wB3oRAvbXAJ0bg2vCegr9a39SodBiB31M+0DoAwCeK98D 7jyvYcPqDkPNeDk/66CvpEs=
=WKMI
-----END PGP SIGNATURE-----
Quoted 10 lines · Philipp Gühring
But what about Huffman-packing all the File/Directory Permission? They are extremely redundant on normal installations:
0644
0600
0755
0777
0700are 99% of all files
The standard permissions take 12 bits. Huffman encoding could allow saving one byte per file. However you have to manage the Huffman table, if you change the default umask then over time the most common values will change and the Huffman table needs to be recalculated (which will be extremely painful as the meta-data for large numbers of files needs to be changed).
If you have a large file system of 1,000,000 files you could potentially save 1meg of disk space through this method. Now consider that tails allow saving maybe 2G of disk space for the same 1,000,000 files but some people turn them off to improve performance.
Much more disk space could be saved with much less of a performance hit for IO starved machines by using compression. We already have gzip code in the kernel which could be used for this purpose.
I think that for the mail servers I run the use of gzip compression inside the file system would improve the performance! The mail servers have heaps of CPU capacity that's idle (2 * 1.8GHz Hyper-threaded Xeon CPUs with less than 10% CPU time in use) and are blocked on disk access 24*7. I think that data=journal and journalling the data after the FS code has compressed it would work really well for a big mail server.
If we're going to save disk space used for Unix attributes then a viable option could be to make the attributes a mount option. Mail, news, and Squid spools all don't need any special permissions, they could have every file mode 660 and every directory mode 770 with suitable UID and GID values.
If you remove the Unix permissions from the meta-data entirely you save at least 9 bytes per file.
Signature · 4 lines
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark http://www.coker.com.au/postal/ Postal SMTP/POP benchmark http://www.coker.com.au/~russell/ My home page