项目作者: f18m

项目描述 :
Simple benchmarking scripts to run on any machine to compare different C/C++ malloc implementations.
高级语言: C
项目地址: git://github.com/f18m/malloc-benchmarks.git
创建时间: 2018-02-01T18:29:51Z
项目社区:https://github.com/f18m/malloc-benchmarks

开源协议:GNU Lesser General Public License v2.1

下载


malloc-benchmarks

Simple benchmarking scripts to run on any machine to compare different C/C++ malloc implementations.
The scripts are not meant to face any possible problem, quite the opposite.
They will:

  • download and build GNU libc, Google perftools, Jemalloc
  • use GNU libc malloc multi-thread benchmarking utility to generate JSON results for different combinations
    of malloc implementation and number of threads
  • use Python matplotlib to produce a summary figure

How to collect benchmark results and view them

  1. git clone https://github.com/f18m/malloc-benchmarks.git
  2. cd malloc-benchmarks
  3. make

How to collect benchmark results on a machine and plot them from another one

On the machine where you want to collect benchmark results:

  1. git clone https://github.com/f18m/malloc-benchmarks.git
  2. cd malloc-benchmarks
  3. make download build collect_results
  4. scp -r results IP_OF_OTHER_MACHINE:

On the other machine where you want to plot results:

  1. git clone https://github.com/f18m/malloc-benchmarks.git
  2. cd malloc-benchmarks
  3. mv ../results .
  4. make plot_results

Example benchmarks

The following are some pictures obtained on different HW systems using however the same benchmarking utility written by
GNU libc developers. They give an idea on how much performances can be different on different CPU/memory HW and varying the number of threads.
Of course the closer the curves are to zero, the better they are (the lower the better!).






























Relevant HW information of machine used for testing available here

‘system_default’ is GNU libc version 2.23 (default for Ubuntu 16.04 LTS)

‘glibc’ is GNU libc version 2.26

‘tcmalloc’ is Google gperftools version 2.6.3

‘jemalloc’ is Google gperftools version 5.0.1






Relevant HW information of machine used for testing available here

‘system_default’ is GNU libc version 2.23 (default for Ubuntu 16.04 LTS)

‘glibc’ is GNU libc version 2.26

‘tcmalloc’ is Google gperftools version 2.6.3

‘jemalloc’ is Google gperftools version 5.0.1






Relevant HW information of machine used for testing available here

‘system_default’ is GNU libc version 2.17 (default for Centos 7)

‘glibc’ curve is missing: the default GCC of Centos 7 is too old to build a recent GNU libc version.

‘tcmalloc’ is Google gperftools version 2.6.3

‘jemalloc’ is Google gperftools version 5.0.1

Contribute your own benchmarks

If you would like to contribute your benchmarks running on different hardware please
contact me at francesco DOT montorsi AT gmail DOT com.
Thanks.