-
Notifications
You must be signed in to change notification settings - Fork 386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WT-3093 Padding the WT_RWLOCK structure grew the WT_PAGE structure. #3212
Conversation
…inlocks. WiredTiger currently has no need for a separate allocation, I suspect the API is the way it is because it was translated from the original POSIX pthread implementation. Additionally, remove the lock name field from the read/write lock structure, shrinking the lock from 16B to 8B, the name field was never used, and it should be easy to identify the read/write lock's purpose from the enclosing structure. This means we no longer need two separate structures (the lock and the lock plus name), which simplifies the actual implementation.
…e-length column-store RLE array off-page into a separate allocation (instead of just the array itself), and moving the number-of-entries for the leaf pages out of the per page-type union. The latter change simplifies a bunch of stuff, row-store and fixed-length column-store no longer require a structure in the union at all, and lots of the #define's to handle that go away.
Make gcc5 happy with how I'm declaring the structures.
In summary, I first backed out the change that grew the Second, I inlined the In hindsight, I suspect I might instead have tried to create two versions of the The reason I'm thinking about that is because we have similar issues with Anyway, back to the branch: third, I realized I was in shooting distance of getting the It's a proof of concept, and can easily be discarded, there aren't any bug fixes here. |
@agorrod, @michaelcahill, I took a look at the numbers, both with a default tcmalloc library and with the MongoDB tcmalloc library. Allocating 20 million objects and calculating the overhead; the
So, there's a clear 64B bucket effect, but the absolute overhead cost of 72B vs 64B, for a 32KB (or even 4KB page), is close to zero. I wouldn't turn down a 64B |
there's no longer any padding consideration.
leave it in the middle anymore, and it's stylistically odd.
Thanks @keithbostic, this change LGTM. I'll merge. |
Padding the WT_RWLOCK structure grew the WT_PAGE structure.