You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As upper pictures shows, BigHash.Bucket.Slot.Size can be calculated by Slot.BucketEntry.KeySize + Slot.BucketEntry.ValueSize, BlockCache.Region.Entry.EntryDesc.KeyHash can be calculated from BlockCache.Region.Entry.EntryValue.Key. So I think it's do not need to serialize BigHash.Bucket.Slot.Size and BlockCache.Region.Entry.EntryDesc.KeyHash, and can save disk space. Especially BigHash is for smallItem, maybe KeySize and ValueSize is jiust 1 byte, the 4 bytes size overhead is not small.
The text was updated successfully, but these errors were encountered:
I think this is to reduce the cpu cost during lookup, the disk space is not a top constraint comparing to cpu and memory.
Adding up to you, there's also an 8 bytes keyHash inside the BucketEntry.
I think this is to reduce the cpu cost during lookup, the disk space is not a top constraint comparing to cpu and memory. Adding up to you, there's also an 8 bytes keyHash inside the BucketEntry.
Thanks for replay, i think cpu cost for calucate SlotSize from KeySize and ValueSize is also very small, maybe cachelib do this is just for code hierarchy
As upper pictures shows, BigHash.Bucket.Slot.Size can be calculated by Slot.BucketEntry.KeySize + Slot.BucketEntry.ValueSize, BlockCache.Region.Entry.EntryDesc.KeyHash can be calculated from BlockCache.Region.Entry.EntryValue.Key. So I think it's do not need to serialize BigHash.Bucket.Slot.Size and BlockCache.Region.Entry.EntryDesc.KeyHash, and can save disk space. Especially BigHash is for smallItem, maybe KeySize and ValueSize is jiust 1 byte, the 4 bytes size overhead is not small.
The text was updated successfully, but these errors were encountered: