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
{{ message }}
Repository navigation
Data structure memory usage optimization in the cache. #2136
We'd like our cache's data structures to use less memory. We'd also like the serializer's data structures to do the same thing, yes.
For example, suppose we have an 8-byte pointer for every block in a 1 TB database, and the average block size is 512 bytes. Then we'd need 16 GB of memory for just the pointers to the other data structures about the block.
There are some simple improvements we could make that would give us headroom. Some places where we have intrusive lists with a head and tail pointer, we could have an intrusive list with just a head pointer. The page_ptr_t does not need its own page_cache_t *. Maybe a uint32_t could be used in place of some uint64_t's. Some fields only used when loading the page could be temporarily allocated on the heap.
Activity