Messages in this thread | | | Date | Fri, 9 Jan 1998 21:16:53 -0500 | From | "Theodore Y. Ts'o" <> | Subject | Re: EXT2 and contiguous files |
| |
Date: Fri, 09 Jan 1998 17:50:28 -0800 From: Craig Milo Rogers <rogers@ISI.EDU>
Sigh. For the ultimate performance gain, for small files (with size less than some threshold), surely it is best to store the data of the file directly in the inode. In some ways, this parallels the decision on whether to store a symbolic link in the inode or in a separate data block.
I've looked at this, too. There is space in i_blocks to store 60 bytes of data. The number of files on a typical linux filesystem which is small enough to fit under that threshold is very small, and so I judged that it wouldn't be worth the implementation complexity to implement it.
It was clearly worth it for symbolic links, but it doesn't appear to be worth it for files.
You could in theory up the size of the inode, to make more room for storing small files in the inode. For example, you could double it from 128 bytes to 256 bytes, so you could now store up to 188 bytes. But now you've doubled the overhead of the inode table, and it means that a single disk block contains half as many inode blocks.
- Ted
| |