Coder Social home page Coder Social logo

ccbd-thp-test's Introduction

Benchmarking Transparent Huge Pages

Setup

Install Linux common tools to enable perf
sudo apt install linux-tools-common
sudo apt install linux-tools-4.15.0-42-generic
This is for Ubuntu 18.04. May need some different version for different OS

In addition, ensure GCC version 7.3+ is installed

Setting up Huge Pages

Before running the code, reserve around 100 2MB huge pages for use by the applications.

sudo -i
echo 100 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages

The number of reserved huge pages can be verified using /proc/meminfo

>cat /proc/meminfo | grep Huge
AnonHugePages:         0 kB
ShmemHugePages:        0 kB
HugePages_Total:     100
HugePages_Free:      100
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB

Enable Transparent Huge Pages

To enable huge pages, make sure the policy for THP is set to madvise

# cat /sys/kernel/mm/transparent_hugepage/enabled 
always [madvise] never

If not, set it to madvise using echo madvise > /sys/kernel/mm/transparent_hugepage/enabled

Compilation

./compile.sh

Running the code

It needs to run as superuser since the statistics collected using perf need root permissions.
./run.sh [Matrix Dimension]
The matrix dimension specifies n for an n x n matrix. For example,./run.sh 512

The benchmarking folder contains code to test the MongoDB database using the YCSB benchmark suite

ccbd-thp-test's People

Contributors

prashravoor 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.