Giter Club home page Giter Club logo

vmcache's People

Contributors

lamduy-nguyen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

vmcache's Issues

VMCaches B-tree implementation allocating too many pages with huge pages

I am currently working on huge pages support for vmcache and during this process I noticed that too many pages get allocated when using 2MB pages.

The changes I did:

  • change pageSize from 4096 to 2097152
  • include MAP_HUGETLB | MAP_HUGE_2MB in the mmap flags in the non-exmap case (I currently only try to get huge pages working outside of exmap)
  • change all indices and sizes in BTreeNodeHeader, BTreeNode and BTree from u16 to u32 to avoid overflows when addressing in the full 2MB range
  • changed virtAllocSize from 1ul << 16 to max(pageSize, 1ul << 16) to align the mmap allocation size to the page size
  • the madvice call for virtMem was made conditional depending on pageSize being 4096 to avoid it when using huge pages

How I ran vmcache:

  • THREADS=1
  • DATASIZE=1
  • VIRTGB=6
  • PHYSGB=4
  • BLOCK pointing to a 16GB file
  • All other environment variables for vmcache on default => TPC-C got used
  • 32GB of RAM
  • A Ryzen 7 1800X CPU
  • 4096 2MB pages allocated via sysctl

The problem symptoms:

  • I get the message VIRTGB too low
  • BTreeNode::mergeNodes never gets called
  • The last node to split is full, triggering a call to BTree::trySplit

Does anyone have an idea for what the cause could be? Apart from the indices and sizes the implementation looks generic over the page size to me.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.