HAMMER 56B/Many: Performance tuning - MEDIA STRUCTURES CHANGED!
* MEDIA CHANGE: The atime has been moved back into the inode data proper.
The nlinks field has also been moved.
* PERFORMANCE: The CRC for cached B-Tree nodes was being run on every access
instead of just the first time. This was the cause of HAMMER's poor
directory scanning performance and cpu-intensive write flushes.
Adjusted to only check the CRC on the initial load into the buffer cache.
* PERFORMANCE: The CRC for modified B-Tree nodes was being regenerated every
time the node was modified, so a large number of insertions or deletions
modifying the same B-Tree need needlessly regenerated the CRC each time.
Adjusted to delay generation of the CRC until just before the buffer is
flushed to the physical media.
Just for the record, B-Tree nodes are 4K and it takes ~25uS to run a CRC
on them. Needless to say removing the unnecessary calls solved a lot of
performance issues.
* PERFORMANCE: Removed limitations in the node caching algorithms. Now more
then one inode can cache pointers to the same B-Tree node.
* PERFORMANCE: When calculating the parent B-Tree node we have to scan the
element array to locate the index that points back to the child. Use a
power-of-2 algorithm instead of a linear scan.
* PERFORMANCE: Clean up the selection of ip->cache[0] or ip->cache[1] based
on whether we are trying to cache the location of the inode or the
location of the file object's data.
12 files changed: