Giter Club home page Giter Club 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 plotly, a client side javascript graphing package.

To generate html files for generated results:

./postprocess.py

Then load the generated html file in the browser.

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

aaronlu avatar amitay avatar antonblanchard avatar davehansenintel avatar daxtens avatar doranand avatar kiryl avatar krytarowski avatar rantala avatar yhuang-intel avatar zhengjunxing 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

will-it-scale's Issues

mmap2_threads takes extremly long time to create threads on 256 cores macine

Hi Anton,
I recently found the mmap2_threads test couldn't finish in a reasonable time on a 256 cores machine. Investigation revealed that the main thread is contending severely with the spawned threads on the single mm->mmap_sem. The reason is the main thread needs also to do mmap() due to things like malloc() for task's argument, etc.

To make the main thread proceed properly, I have a patch to let all spawned tasks/threads wait for an event from main thread that is only delivered after task/thread creation is done. What do you think of this patch, is it worth? Thanks.

aaronlu@7f0b4fb

testcase do not exit when run ‘malloc1_threads’

Hi

'malloc1_threads' is not exit when run end.
stopped and not exit after put "average:12343"

will-it-scale# ./malloc1_threads -t 2 -s 1
testcase:malloc/free of 128MB
warmup
min:4940 max:8187 total:13127
min:4866 max:7876 total:12742
min:5815 max:5989 total:11804
min:5658 max:6697 total:12355
min:5861 max:5868 total:11729
min:5803 max:6031 total:11834
measurement
min:5386 max:6957 total:12343
average:12343

will-it-scale# ldd ./malloc1_threads
linux-vdso.so.1 (0x00007ffd97a8a000)
libhwloc.so.0 => /usr/lib/x86_64-linux-gnu/libhwloc.so.0 (0x00007fdf07c69000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fdf07c48000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fdf07a87000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fdf07904000)
libudev.so.1 => /lib/x86_64-linux-gnu/libudev.so.1 (0x00007fdf078de000)
/lib64/ld-linux-x86-64.so.2 (0x00007fdf07d01000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fdf078d4000)

BTW: make by gcc-9

NetBSD port request

I've been suggested to verify the NetBSD system with this renowned tool. What are the plans for a NetBSD port?

context_switch1_threads: tests/context_switch1.c:33: child: Assertion `ret == 1' failed.

Hi,
When I run the context_switch1 test case, it always has "Assertion `ret == 1' failed" error logs print.
Is it a bug in the context_switch1 test case or anything I miss set in my test environment? Thanks.

./runtest.py context_switch1

tasks,processes,processes_idle,threads,threads_idle,linear
0,0,100,0,100,0
1,68256,95.36,66138,94.85,68256
2,76699,90.28,73780,89.28,136512
3,84784,85.62,81063,83.96,204768
4,88903,80.67,84356,78.38,273024
5,88330,75.48,85081,72.51,341280
6,85265,70.19,81569,66.29,409536
7,58732,64.09,55989,59.40,477792
8,47108,57.85,44998,52.48,546048
9,42748,52.49,41092,45.95,614304
10,41694,45.56,39321,38.94,682560
context_switch1_threads: tests/context_switch1.c:33: child: Assertion ret == 1' failed. Aborted (core dumped) 11,39928,39.31,-1,32.14,750816 12,39229,23.49,37818,21.88,819072 context_switch1_threads: tests/context_switch1.c:33: child: Assertion ret == 1' failed.
Aborted (core dumped)
13,40762,29.42,-1,21.74,887328
context_switch1_threads: tests/context_switch1.c:33: child: Assertion ret == 1' failed. context_switch1_threads: tests/context_switch1.c:33: child: Assertion ret == 1' failed.
Aborted (core dumped)
14,42321,27.15,-1,19.65,955584
context_switch1_threads: tests/context_switch1.c:33: child: Assertion ret == 1' failed. Aborted (core dumped) 15,43718,24.91,-1,17.53,1023840 context_switch1_threads: tests/context_switch1.c:33: child: Assertion ret == 1' failed.
context_switch1_threads: tests/context_switch1.c:33: child: Assertion ret == 1' failed. Aborted (core dumped) 16,45299,22.78,-1,15.62,1092096 context_switch1_threads: tests/context_switch1.c:33: child: Assertion ret == 1' failed.
Aborted (core dumped)
17,46794,20.72,-1,13.85,1160352
context_switch1_threads: tests/context_switch1.c:33: child: Assertion ret == 1' failed. context_switch1_threads: tests/context_switch1.c:33: child: Assertion ret == 1' failed.
context_switch1_threads: tests/context_switch1.c:33: child: Assertion ret == 1' failed. Aborted (core dumped) 18,48335,18.68,-1,12.17,1228608 context_switch1_threads: tests/context_switch1.c:33: child: Assertion ret == 1' failed.
context_switch1_threads: tests/context_switch1.c:33: child: Assertion ret == 1' failed. Aborted (core dumped) 19,50144,16.81,-1,10.37,1296864 context_switch1_threads: tests/context_switch1.c:33: child: Assertion ret == 1' failed.
context_switch1_threads: tests/context_switch1.c:33: child: Assertion ret == 1' failed. Aborted (core dumped) 20,51297,15.15,-1,8.61,1365120 context_switch1_threads: tests/context_switch1.c:33: child: Assertion ret == 1' failed.
context_switch1_threads: tests/context_switch1.c:33: child: Assertion ret == 1' failed. context_switch1_threads: tests/context_switch1.c:33: child: Assertion ret == 1' failed.
Aborted (core dumped)
21,52643,13.47,-1,7.00,1433376
context_switch1_threads: tests/context_switch1.c:33: child: Assertion ret == 1' failed. context_switch1_threads: tests/context_switch1.c:33: child: Assertion ret == 1' failed.
context_switch1_threads: tests/context_switch1.c:33: child: Assertion ret == 1' failed. Aborted (core dumped) 22,53904,11.86,-1,5.52,1501632 context_switch1_threads: tests/context_switch1.c:33: child: Assertion ret == 1' failed.
context_switch1_threads: tests/context_switch1.c:33: child: Assertion ret == 1' failed. context_switch1_threads: tests/context_switch1.c:33: child: Assertion ret == 1' failed.
Aborted (core dumped)
23,55055,10.40,-1,4.14,1569888
context_switch1_threads: tests/context_switch1.c:33: child: Assertion ret == 1' failed. context_switch1_threads: tests/context_switch1.c:33: child: Assertion ret == 1' failed.
Aborted (core dumped)
24,56513,9.05,-1,2.79,1638144

ulimit -a

core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 190679
max locked memory (kbytes, -l) 65536
max memory size (kbytes, -m) unlimited
open files (-n) 1048576
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 1048576
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited

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.