Giter Site home page Giter Site logo

lmbench's Introduction

README for lmbench 2alpha8 net release.

To run the benchmark, you should be able to say:

	cd src
	make results

If you want to see how you did compared to the other system results
included here, say

	make see

Be warned that many of these benchmarks are sensitive to other things
being run on the system, mainly from CPU cache and CPU cycle effects.
So make sure your screen saver is not running, etc.

It's a good idea to do several runs and compare the output like so

	make results
	make rerun
	make rerun
	make rerun
	cd Results && make LIST=<your OS>/*

lmbench's People

Contributors

bradwalker avatar ricpacca avatar songha1x avatar wenhuizhang 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  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  avatar  avatar

lmbench's Issues

Failed to understand the argument when executing single benchmark test

Testing with the whole suite takes a long time, and it's unnecessary if there's only one benchmark's result of interest. In my case it's Prot Fault which belongs to File&VM system latencies group.
After successfully building the whole lmbench suite, I tried to run the single benchmark case by going to the /bin/$ARCH-pc-linux-gnu directory under the lmbench directory and runing command ./lat_sig prot . However, it prompts the following info, seems like my usage was somewhat wrong.

root@jys-optiplex7060:/opt/lmbench-3.0-a9-1/bin/x86_64-pc-linux-gnu# ./lat_sig prot
Usage: ./lat_sig [-P <parallelism>] [-W <warmup>] [-N <repetitions>] install|catch|prot [file]

And then I ran as following but it still look wrong.

root@jys-optiplex7060:/opt/lmbench-3.0-a9-1/bin/x86_64-pc-linux-gnu# ./lat_sig prot /usr/tmp
mmap: Bad file descriptor

I tried my best but failed to figure out the correct way to define the argument [file]. Can anybody help? many thanks!

`seekto'

gcc -O -DRUSAGE -DHAVE_uint=1 -DHAVE_int64_t=1 -DHAVE_DRAND48 -DHAVE_SCHED_SETAFFINITY=1 '-I/usr/include/tirpc' '-ltirpc' -o ../bin/x86_64-linux-gnu/disk disk.c ../bin/x86_64-linux-gnu/lmbench.a -lm
/usr/bin/ld: /tmp/ccvJmd0S.o: in function seekto': disk.c:(.text+0x2f): undefined reference to llseek'
collect2: error: ld returned 1 exit status
gmake[2]: *** [Makefile:323: ../bin/x86_64-linux-gnu/disk] Error 1
gmake[2]: Leaving directory '/root/enabling/test/lmbench/src'
make[1]: *** [Makefile:114: lmbench] Error 2
make[1]: Leaving directory '/root/enabling/test/lmbench/src'
make: *** [Makefile:20: build] Error 2

`make results` error on aarch64 platform

There is an error when we run scripts/results script.

$ bash -x results
++ ../scripts/os
../scripts/gnu-os: unable to guess system type

This script, last modified 2004-08-18, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from

    ftp://ftp.gnu.org/pub/gnu/config/

If the version you run (../scripts/gnu-os) is already up to date, please
send the following data and any information you think might be
pertinent to <[email protected]> in order to provide the needed
information to handle your system.

config.guess timestamp = 2004-08-18

uname -m = aarch64
uname -r = 4.19.0-9-arm64
uname -s = Linux
uname -v = #1 SMP Debian 4.19.118-2 (2020-04-29)

/usr/bin/uname -p = unknown
/bin/uname -X     =

hostinfo               =
/bin/universe          =
/usr/bin/arch -k       =
/bin/arch              = aarch64
/usr/bin/oslevel       =
/usr/convex/getsysinfo =

UNAME_MACHINE = aarch64
UNAME_RELEASE = 4.19.0-9-arm64
UNAME_SYSTEM  = Linux
UNAME_VERSION = #1 SMP Debian 4.19.118-2 (2020-04-29)
+ OS=
++ ../scripts/config
+ CONFIG=CONFIG.debian
+ RESULTS=results/
++ uname -n
+ BASE=../results//debian
+ EXT=0
+ '[' '!' -f ../bin//CONFIG.debian ']'
+ . ../bin//CONFIG.debian
++ DISKS=
++ DISK_DESC=
++ OUTPUT=/dev/null
++ ENOUGH=5000
++ FASTMEM=NO
++ FILE=/var/tmp/XXX
++ FSDIR=/var/tmp
++ INFO=INFO.debian
++ LINE_SIZE=128
++ LOOP_O=0.00000054
++ MAIL=no
++ TOTAL_MEM=32170
++ MB=8
++ MHZ='1997 MHz, 0.5008 nanosec clock'
++ MOTHERBOARD=
++ NETWORKS=
++ OS=
++ PROCESSORS=8
++ REMOTE=
++ SLOWFS=NO
++ SYNC_MAX=1
++ LMBENCH_SCHED=DEFAULT
++ TIMING_O=0
++ RSH=rsh
++ RCP=rcp
++ VERSION=lmbench-3alpha4
++ BENCHMARK_HARDWARE=YES
++ BENCHMARK_OS=YES
++ BENCHMARK_SYSCALL=
++ BENCHMARK_SELECT=
++ BENCHMARK_PROC=
++ BENCHMARK_CTX=
++ BENCHMARK_PAGEFAULT=
++ BENCHMARK_FILE=
++ BENCHMARK_MMAP=
++ BENCHMARK_PIPE=
++ BENCHMARK_UNIX=
++ BENCHMARK_UDP=
++ BENCHMARK_TCP=
++ BENCHMARK_CONNECT=
++ BENCHMARK_RPC=
++ BENCHMARK_HTTP=
++ BENCHMARK_BCOPY=
++ BENCHMARK_MEM=
++ BENCHMARK_OPS=
+ '[' '!' -d ../results/ ']'
+ RESULTS=../results//debian.0
+ '[' -f ../results//debian.0 ']'
+ cd ../bin/
+ PATH=.:/home/xiaojun/spack/opt/spack/linux-debian10-aarch64/gcc-9.3.0/lmbench-master-hjvodsgdjzuqyxn4tk47ell434eqylgi/bin:/home/xiaojun/spack/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/xiaojun/spack/spack/bin:/home/xiaojun/spack/opt/spack/linux-centos8-aarch64/gcc-8.2.1/py-flake8-3.7.8-3l5xcyug2ebxiflw5g3lvf35ep2xjnki/bin:/home/xiaojun/spack/spack/bin:/home/xiaojun/spack/opt/spack/linux-centos8-aarch64/gcc-8.2.1/py-flake8-3.7.8-3l5xcyug2ebxiflw5g3lvf35ep2xjnki/bin
+ export PATH
+ export SYNC_MAX
+ export OUTPUT
+ lmbench CONFIG.debian
results: line 30: ../../results//debian.0: No such file or directory
+ '[' Xno = Xyes ']'
+ exit 0

I can work around it by using this patch:

diff --git a/scripts/results b/scripts/results
index cd07c15..282ed19 100755
--- a/scripts/results
+++ b/scripts/results
@@ -27,7 +27,7 @@ cd ../bin/$OS
 PATH=.:${PATH}; export PATH
 export SYNC_MAX
 export OUTPUT
-lmbench $CONFIG 2>../${RESULTS}
+lmbench $CONFIG 2>${RESULTS}

 if [ X$MAIL = Xyes ]
 then	echo Mailing results

But maybe we need a better patch to fix this issue?

tirpc/rpc/rpc.h no such file ot directory

Hi

I cloned the lmbench source to ubuntu 16.04 , I am trying to run the lmbench with x86 gcc but i am getting error with rpc.h header . Error Details are below ,

commands:

cd src
make

error :

In file included from lib_tcp.c:9:0:
bench.h:41:27: fatal error: tirpc/rpc/rpc.h: No such file or directory
compilation terminated.
Makefile:246: recipe for target '../bin/x86_64-linux-gnu/lib_tcp.o' failed
make[1]: *** [../bin/x86_64-linux-gnu/lib_tcp.o] Error 1

How can i solve this issue ?

Regards
Megha

Confusing about outputing bw_mem to stderr

I have tried to catch the outputs of bw_mem, but did not get them until they were found in stderr.
I still did not get it why the outputs should be redirected to stderr.
Do you mind give me a tips about this design?

SCCS missing

gmake[2]: *** No rule to make target '../SCCS/s.ChangeSet', needed by 'bk.ver'. Stop.

solved this by doing what below before making
mkdir ./SCCS
touch ./SCCS/s.ChangeSet

lmbench takes too long for large nvme disks

Ran lmbench after obtaining source from https://github.com/intel/lmbench/ and getting binary after compilation.

Following command was used to run lmbench:
#lmbench

Following is the config file content :

DISKS=""
DISK_DESC=""
OUTPUT="/dev/tty"
ENOUGH=5000
FASTMEM="NO"
FILE="/usr/tmp/XXX"
FSDIR="/usr/tmp"
INFO=INFO.myserver.com
LINE_SIZE=128
LOOP_O=0.00000030
MAIL=no
TOTAL_MEM=509856.46875
MB=407885
MHZ="1494 MHz, 0.6693 nanosec clock
"
MOTHERBOARD=
NETWORKS=
OS=x86_64-Linux
PROCESSORS=40
REMOTE=
SLOWFS="NO"
SYNC_MAX="1"
LMBENCH_SCHED="DEFAULT"
TIMING_O=0
RSH=rsh
RCP=rcp
VERSION=3.0-20100921

BENCHMARK_HARDWARE=NO
BENCHMARK_OS=NO
BENCHMARK_SYSCALL=NO
BENCHMARK_SELECT=NO
BENCHMARK_SIG=NO
BENCHMARK_PROC=NO
BENCHMARK_CTX=NO
BENCHMARK_PAGEFAULT=NO
BENCHMARK_FILE=NO
BENCHMARK_MMAP=NO
BENCHMARK_PIPE=NO
BENCHMARK_UNIX=NO
BENCHMARK_UDP=NO
BENCHMARK_TCP=NO
BENCHMARK_CONNECT=NO
BENCHMARK_RPC=NO
BENCHMARK_HTTP=NO
BENCHMARK_BCOPY=NO
BENCHMARK_MEM=NO
BENCHMARK_OPS=NO
DISKS=/dev/nvme0n1p2
DISK_DESC="none"


With large size nvme disks (2TB or more) lmbench sometimes goes for hours (even for more than a day) , and gets stuck at "Calculating disk zone bw & seek times" of output.
This unusual long time for lmbench completion is not seen with non-nvme disks. This is seen only with large size nvme disk (in TBs).

bw_mem calculation

hi,
when i was run test bw_mem 1M rd ,it give results in number but i did´t get how those values are calculated(calculation formula).can anyone clear me...

Compile failure after GCC 7.3.0 version

Env:

LMbench 3

Error Message:

#make results make[1]: Entering directory '/root/lmbench3/src' gcc -O -DRUSAGE -DHAVE_uint=1 -DHAVE_int64_t=1 -DHAVE_DRAND48 -DHAVE_SCHED_SETAFFINITY=1 -o ../bin/x86_64-linux-gnu/disk disk.c ../bin/x86_64-linux- gnu/lmbench.a -lm /usr/bin/ld: /tmp/ccvsfTiW.o: in function seekto':
disk.c:(.text+0x37): undefined reference to llseek' collect2: error: ld returned 1 exit status make[1]: *** [Makefile:323: ../bin/x86_64-linux-gnu/disk] Error 1 make[1]: Leaving directory '/root/lmbench3/src' make: *** [Makefile:114: lmbench] Error 2

#define BIGSEEK (1<<30)
int
seekto(int fd, uint64 off)
{
#ifdef linux
extern loff_t llseek(int, loff_t, int);

    if (**llseek**(fd, (loff_t)off, SEEK_SET) == (loff_t)-1) {
            return(-1);
    }
    return (0);

#else
uint64 here = 0;
lseek(fd, 0, 0);
while ((uint64)(off - here) > (uint64)BIGSEEK) {
if (lseek(fd, BIGSEEK, SEEK_CUR) == -1) break;
here += BIGSEEK;
}
assert((uint64)(off - here) <= (uint64)BIGSEEK);
if (lseek(fd, (int)(off - here), SEEK_CUR) == -1) return (-1);
return (0);
#endif
}

root@iZbp176gmwpuh1u0d4zudlZ:~# gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none:hsa OFFLOAD_TARGET_DEFAULT=1 Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.3.0-17ubuntu1~20.04' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-HskZEa/gcc-9-9.3.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)

Analysis:

Check disk.c, line292, found seekto is using llseek funtion. After GCC 7.3.0 version, llseek is replaced by lseek64. so replace have fixed this issue.
image

rpc

cd src && make
make[1]: Entering directory '/root/enabling/lmbench/src'
gmake[2]: Entering directory '/root/enabling/lmbench/src'
gcc -O -DRUSAGE -DHAVE_uint=1 -DHAVE_int64_t=1 -DHAVE_DRAND48 -DHAVE_SCHED_SETAFFINITY=1 -c lib_tcp.c -o ../bin/x86_64-linux-gnu/lib_tcp.o
In file included from lib_tcp.c:9:
bench.h:38:10: fatal error: rpc/rpc.h: No such file or directory
#include <rpc/rpc.h>
^~~~~~~~~~~
compilation terminated.
gmake[2]: *** [Makefile:246: ../bin/x86_64-linux-gnu/lib_tcp.o] Error 1
gmake[2]: Leaving directory '/root/enabling/lmbench/src'
make[1]: *** [Makefile:114: lmbench] Error 2
make[1]: Leaving directory '/root/enabling/lmbench/src'
make: *** [Makefile:20: build] Error 2

assert.h: No such file or directory

make[1]: Entering directory '/xxx/lmbench-master/src'
gcc -O -DSYS5 -Dvalloc=malloc -DS_IFIFO=S_IFFIFO -c lib_tcp.c -o ../bin/x86_64-linux-gnu/lib_tcp.o
In file included from lib_tcp.c:9:
bench.h:12:10: fatal error: assert.h: No such file or directory
12 | #include <assert.h>
| ^~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:246: ../bin/x86_64-linux-gnu/lib_tcp.o] Error 1

How about install hello as hello.lmbench

Hi, Dear maintainers

As lmbench installs this rather generically-named /usr/bin/hello binary, it may conflicts with others also provide this, eg: mbedtls.
How about just install it as hello.lmbench. If this is accepted, I can also send a patch for this.

Thanks

build fail undefined reference to PMAP

Testing on Ubuntu 22.04 with GCC12. Cloned git, cd src, make (or 'make results').

First I hit this issue, followed these steps to work around:
#16

Now I get this failure:

root@ce-2-jrgruher:~/lmbench/src# make results LDFLAGS=-ltirpc
gmake[1]: Entering directory '/root/lmbench/src'
cc -O -DRUSAGE -DHAVE_uint=1 -DHAVE_int64_t=1 -DHAVE_DRAND48 -DHAVE_SCHED_SETAFFINITY=1  -ltirpc -o ../bin/x86_64-linux-gnu/bw_tcp bw_tcp.c ../bin/x86_64-linux-gnu/lmbench.a -lm
bw_tcp.c: In function ‘main’:
bw_tcp.c:74:44: warning: implicit declaration of function ‘lmbench_usage’ [-Wimplicit-function-declaration]
   74 |                         if (parallel <= 0) lmbench_usage(ac, av, usage);
      |                                            ^~~~~~~~~~~~~
bw_tcp.c: In function ‘initialize’:
bw_tcp.c:142:25: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘int’ [-Wformat=]
  142 |         sprintf(buf, "%lu", state->msize);
      |                       ~~^   ~~~~~~~~~~~~
      |                         |        |
      |                         |        int
      |                         long unsigned int
      |                       %u
bw_tcp.c: In function ‘main’:
bw_tcp.c:63:25: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   63 |                         write(conn, "0", 1);
      |                         ^~~~~~~~~~~~~~~~~~~
/usr/bin/ld: ../bin/x86_64-linux-gnu/lmbench.a(lib_tcp.o): in function `tcp_done':
lib_tcp.c:(.text+0x1b): undefined reference to `pmap_unset'
/usr/bin/ld: ../bin/x86_64-linux-gnu/lmbench.a(lib_tcp.o): in function `tcp_connect':
lib_tcp.c:(.text+0x3bd): undefined reference to `pmap_getport'
/usr/bin/ld: ../bin/x86_64-linux-gnu/lmbench.a(lib_tcp.o): in function `tcp_server':
lib_tcp.c:(.text+0x5cd): undefined reference to `pmap_unset'
/usr/bin/ld: lib_tcp.c:(.text+0x5e9): undefined reference to `pmap_set'
collect2: error: ld returned 1 exit status
gmake[1]: *** [Makefile:311: ../bin/x86_64-linux-gnu/bw_tcp] Error 1
gmake[1]: Leaving directory '/root/lmbench/src'
make: *** [Makefile:114: lmbench] Error 2
root@ce-2-jrgruher:~/lmbench/src# 

fix compilation error 'fatal error: rpc/rpc.h: No such file or directory'

first
replace #include <rpc/xxx> by #include <tirpc/rpc/xxx>

second
and there are some problems in '/usr/include/tirpc/rpc' directory, cd into it , then

grep '#include <rpc' ./ -lr | xargs sed -i 's/#include <rpc\//#include <tirpc\/rpc\//g'

grep '#include <netconfig' ./ -lr | xargs sed -i 's/#include <netconfig.h>/#include \"..\/netconfig.h\"/g'

finally

make results LDFLAGS=-ltirpc

the problem will be fixed, tested successfully on manjaro 20

lmbench analysis for RISCV

Hello,
I have built/run lmbench on RISCV HiFive Unleashed which has yocto linux kernel 5.4.3.
These are the results:
root@exaleapsemi:/mnt/kiran/lmbench3/bin/riscv64-linux-# ./bw_mem 1M rd
1.05 1770.58
root@exaleapsemi:/mnt/kiran/lmbench3/bin/riscv64-linux-# ./bw_mem 2M rd


2.10 974.06
root@exaleapsemi:/mnt/kiran/lmbench3/bin/riscv64-linux-# ./bw_mem 3M rd


3.15 600.90
root@exaleapsemi:/mnt/kiran/lmbench3/bin/riscv64-linux-# ./bw_mem 4M rd


4.19 506.86
root@exaleapsemi:/mnt/kiran/lmbench3/bin/riscv64-linux-# ./bw_mem 200M rd


209.72 424.38
root@exaleapsemi:/mnt/kiran/lmbench3/bin/riscv64-linux-# ./bw_mem 600M rd


629.15 441.76
root@exaleapsemi:/mnt/kiran/lmbench3/bin/riscv64-linux-# ./bw_mem 879M rd


921.70 437.99

Could some one please help me understand how we get 921.70 (last result) when 879Mb data is read and also the impact on speed, 437.99 Mbps?
Any other pointers will be helpful.

Thanks

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.