Coder Social home page Coder Social logo

c10mbench's Introduction

c10mbench - raw scalability benchmarks

This project measures raw scalability benchmarks, namely memory speeds and synchronization speeds. Just type make to compile it, and make run to run it.

Explanation of Benchmarks

Memory Latency

Memory access is slow. CPUs have small, high-speed caches to store copies of frequently used day. At scale, there is to much data to fit within the cache. Therefore, memory access speed becomes a limiting factor.

The benchmarks measure latency by randomly accessing memory. Results vary between about 57 nanosecons and 80 nanoseconds.

Huge Pages

User-mode uses virtual-memory. Page tables translate virtual addresses to physical ones. At scale, these pages tables no longer fit in cache. 16-gigabytes worth of data requires 32-megabytes worth of pages tables, where a cache is around 10-megabytes.

Therefore, every memory access becomes two, doubling memory latency.

One way to mitigate this is through the use of "huge pages" of 2-megabytes instead of 4-kilobytes. This reduces the page tables to 64-kilobytes, which can fit with the cache.

This program runs the memory benchmarks twice, once with huge pages enabled, an once with them disabled.

Ring Buffer

The ring-buffer is an extremely efficient way to pass messages between threads. This program benchmarks this. It also benchmarks the alternative of using pipes, passing messages through the operating system. It shows that it's 10 to 50 times faster using the ring-buffer in user-mode using shared-memory than passing messages through pipes.

Cache Bouncing

The biggest concern for multicore synchronization is avoiding data sharing. This benchmark demonstrates this by repeatedly adding the same memory value from multiple threads.

c10mbench's People

Contributors

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