Giter VIP home page Giter VIP logo

will-it-scale's Introduction

will-it-scale

Overview

Will It Scale takes a testcase and runs it from 1 through to n parallel copies to see if the testcase will scale. It builds both a process and threads based test in order to see any differences between the two.

We rely on hwloc for a platform independent way of laying out tasks on cores. It can be found at www.open-mpi.org/projects/hwloc/.

Care is taken to try and reduce run to run variability. By using hwloc we ensure each task is on its own core and won't get bounced around by the scheduler. The wrapper script (runtest.py) turns off address space randomisation which can cause huge differences in pagetable related benchmarks (one run may fit within one pte page, the next may span two). There is a warmup period before which an average is taken. The averaging period can be changed with the -s option, which by default is 5 seconds.

Testcase design

Each test has two required components. A testcase description:

char *testcase_description = "Context switch via pipes";

and a testcase() which is passed a pointer to an iteration count that the testcase should increment. This testcase is run whatever number of times the user specifies on the command line via the -t option:

void testcase(unsigned long long *iterations)

A (not very useful) example:

#include <sys/types.h>
#include <unistd.h>

char *testcase_description = "getppid";

void testcase(unsigned long long *iterations)
{
    	while (1) {
            	getppid();
            	(*iterations)++;
    	}
}

If you need to setup something globally such as a single file for all parallel testcases to operate on, there are two functions:

void testcase_prepare(unsigned long nr_tasks)
void testcase_cleanup(void)

Finally if you need a new task such as when you want to write a context switch benchmark between two tasks, you can use:

void new_task(void *(func)(void *), void *arg)

This takes care of creating a new process or a new thread depending on which version of the test is being run.

Quick start:

make
./runalltests

Postprocessing and graphing

The graphing scripts use dygraphs, a client side javascript graphing package. You need to download it at:

http://danvk.org/dygraphs/dygraph-combined.js

Note: dygraphs will only work on a web server since it uses XMLHttpRequest. You can't just point your web browser to a local file.

Right now the script is pretty horrible but will probably work:

./postprocess > index.html

Then copy dygraph-combined.js *.csv index.html to your web directory:

scp *.csv index.html dygraph-combined.js <destination>

The graphs show number of tasks run on the x axis vs performance (in operations per second) on the left y axis. We also plot the amount of idle time against the right y axis. In the ideal case we should have an X pattern, with operations per second increasing and idle time decreasing.

will-it-scale's People

Contributors

antonblanchard avatar davehansenintel avatar kiryl avatar aaronlu avatar yhuang-intel avatar

Watchers

James Cloos avatar Amitay Isaacs 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.