Code Monkey home page Code Monkey logo

bank_mapper's Introduction

Huge Pages:

Huge pages allow for mapping of contiguous pages in kernel.
To see how to enable it on debian, see https://wiki.debian.org/Hugepages#pages-size

Following are the steps I took for allocating 2 chunks, each of 1 GB on my system:

1) Run command 'grep pdpe1gb /proc/cpuinfo | uniq'
If this command output is not empty, the x86 system supports 1GB hugepages.

2) Edit /etc/default/grub to add "hugepagesz=1GB hugepages=2 default_hugepagesz=1GB"
as boot params.
This allows kernel to reserve the memory during system boot.

3) Run command 'update-grub2'
This updates grub so that kernel get the new boot commands.

4) Reboot system

5) Run 'cat /proc/meminfo | grep "Hugepagesize:"'
The output should be 1048576 kB. This means now the default Hugepage is set to 1GB

6) Run 'cat /proc/meminfo | grep "HugePages_Free:"'
The output should be 2. This shows 2 chunks of 2 GB has been reserved.

7) Now your application can mmap() using MAP_HUGETLB. 1GB chunks will be used 
as it is set as the default huge page size.

bank_mapper's People

Contributors

sakjain92 avatar

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.