Skip to content

Data structure memory usage optimization in the cache. #2136

Open

Description

@srh

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.

  1. 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.
  2. current_page_t's that have evicted pages and no acquirers could be freed. Tracked in current_page_ts should be deleted when no longer needed #2137.

Activity

  1. added this to the subsequent milestone on Mar 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions