ColinIanKing / stress-ng

This is the stress-ng upstream project git repository. stress-ng will stress test a computer system in various selectable ways. It was designed to exercise various physical subsystems of a computer as well as the various operating system kernel interfaces.
https://github.com/ColinIanKing/stress-ng
GNU General Public License v2.0
1.78k stars 283 forks source link

stress-ng on riscv platform #241

Closed kush930 closed 1 year ago

kush930 commented 2 years ago

Hi Colin,

I have cloned stress-ng version- 0.14.06 from github: - https://github.com/ColinIanKing/stress-ng.git. its compiled successfully on riscv64 platform without any error.

But when I am verifying class method (CPU and memory) stress test, I am facing issue:- this stressor is not implemented on this system

root@kush-Unmatched-Linux-1:~# stress-ng --class cpu --all 1 --timeout 1m

stress-ng: info:  [48344] setting to a 60 second run per stressor
stress-ng: info:  [48344] ipsec_mb: stressor will be skipped, CPU needs to be an x86-64 and a recent IPSec MB library is required.
stress-ng: info:  [48344] rdrand stressor will be skipped, CPU does not support the rdrand instruction.
stress-ng: info:  [48344] rseq stressor will be skipped, rseq system call not implemented
stress-ng: info:  [48344] dispatching hogs: 1 af-alg, 1 atomic, 1 branch, 1 bsearch, 1 context, 1 cpu, 1 crypt, 1 fp-error, 1 funccall, 1 funcret, 1 getrandom, 1 goto, 1 hash, 1 heapsort, 1 hsearch, 1 ioport, 1 jpeg, 1 judy, 1 list, 1 longjmp, 1 lsearch, 1 matrix, 1 matrix-3d, 1 mergesort, 1 nop, 1 numa, 1 opcode, 1 pkey, 1 plugin, 1 prefetch, 1 qsort, 1 radixsort, 1 regs, 1 secretmem, 1 shellsort, 1 skiplist, 1 sparsematrix, 1 str, 1 stream, 1 syncload, 1 tree, 1 tsc, 1 tsearch, 1 uprobe, 1 vecfp, 1 vecmath, 1 vecshuf, 1 vecwide, 1 wcs, 1 zlib
stress-ng: info:  [48345] stress-ng-af-alg: 17 cryptographic algorithms found in /proc/crypto
stress-ng: info:  [48345] stress-ng-af-alg: 108 cryptographic algorithms in total (with defconfigs)
stress-ng: info:  [48355] stress-ng-crypt: this stressor is not implemented on this system: riscv64 Linux 5.10.41 gcc 10.2
stress-ng: info:  [48366] stress-ng-jpeg: this stressor is not implemented on this system: riscv64 Linux 5.10.41 gcc 10.2
stress-ng: info:  [48365] stress-ng-ioport: this stressor is not implemented on this system: riscv64 Linux 5.10.41 gcc 10.2
stress-ng: info:  [48374] stress-ng-mergesort: this stressor is not implemented on this system: riscv64 Linux 5.10.41 gcc 10.2
stress-ng: info:  [48376] stress-ng-numa: system has 1 of a maximum 4 memory NUMA nodes
stress-ng: info:  [48381] stress-ng-prefetch: no L3 cache, using L2 size instead
stress-ng: info:  [48380] stress-ng-plugin: plugin shared library failed to open, skipping stressor
stress-ng: info:  [48387] stress-ng-secretmem: this stressor is not implemented on this system: riscv64 Linux 5.10.41 gcc 10.2
stress-ng: info:  [48384] stress-ng-radixsort: this stressor is not implemented on this system: riscv64 Linux 5.10.41 gcc 10.2
stress-ng: info:  [48390] stress-ng-sparsematrix: 5000 items in 500 x 500 sparse matrix (2.00% full)
stress-ng: info:  [48363] stress-ng-heapsort: this stressor is not implemented on this system: riscv64 Linux 5.10.41 gcc 10.2
stress-ng: info:  [48368] stress-ng-judy: this stressor is not implemented on this system: riscv64 Linux 5.10.41 gcc 10.2
stress-ng: info:  [48392] stress-ng-stream: no L3 cache, using L2 size instead
stress-ng: info:  [48392] stress-ng-stream: stressor loosely based on a variant of the STREAM benchmark code
stress-ng: info:  [48392] stress-ng-stream: do NOT submit any of these results to the STREAM benchmark results
stress-ng: info:  [48392] stress-ng-stream: Using CPU cache size of 2048K
stress-ng: info:  [48398] stress-ng-tree: this stressor is not implemented on this system: riscv64 Linux 5.10.41 gcc 10.2
stress-ng: info:  [48408] stress-ng-wcs: this stressor is not implemented on this system: riscv64 Linux 5.10.41 gcc 10.2
stress-ng: info:  [48412] stress-ng-zlib: this stressor is not implemented on this system: riscv64 Linux 5.10.41 gcc 10.2
stress-ng: info:  [48401] stress-ng-uprobe: cannot set uprobe_event: errno=13 (Permission denied), skipping stressor
stress-ng: info:  [48362] stress-ng-hash:         hash      hashes/sec chi squared
stress-ng: info:  [48362] stress-ng-hash:      adler32        16137.00       0.96
stress-ng: info:  [48362] stress-ng-hash:       coffin       282102.67       0.98
stress-ng: info:  [48362] stress-ng-hash:     coffin32       441039.41       1.01
stress-ng: info:  [48362] stress-ng-hash:       crc32c       151048.08       0.94
stress-ng: info:  [48362] stress-ng-hash:        djb2a       511591.94       0.96
stress-ng: info:  [48362] stress-ng-hash:        fnv1a       287437.60       0.96
stress-ng: info:  [48362] stress-ng-hash:       jenkin       202084.59       0.93
stress-ng: info:  [48362] stress-ng-hash:        kandr       278130.29       0.95
stress-ng: info:  [48362] stress-ng-hash:        knuth       308306.72       1.04
stress-ng: info:  [48362] stress-ng-hash:     loselose       357247.16       0.98
stress-ng: info:  [48362] stress-ng-hash:         mid5      1222966.24       0.98
stress-ng: info:  [48362] stress-ng-hash:     muladd32       256556.67       0.99
stress-ng: info:  [48362] stress-ng-hash:     muladd64       316113.58       1.02
stress-ng: info:  [48362] stress-ng-hash:    mulxror64       371274.91       0.93
stress-ng: info:  [48362] stress-ng-hash:   murmur3_32       286708.73       0.96
stress-ng: info:  [48362] stress-ng-hash:        nhash       189851.30       0.95
stress-ng: info:  [48362] stress-ng-hash:          pjw       194924.27       1.05
stress-ng: info:  [48362] stress-ng-hash:         sdbm       183823.50       0.97
stress-ng: info:  [48362] stress-ng-hash:          x17       356218.35       0.94
stress-ng: info:  [48362] stress-ng-hash:          xor       224238.68       1.06
stress-ng: error: [48344] process [48380] (stress-ng-plugin) aborted early, out of system resources
stress-ng: info:  [48390] stress-ng-sparsematrix: hash     160.1K       460913.76 Get/s       179913.50 Put/s
stress-ng: info:  [48390] stress-ng-sparsematrix: list     174.8K        17881.16 Get/s        10530.64 Put/s
stress-ng: info:  [48390] stress-ng-sparsematrix: mmap       1.9M       553515.34 Get/s        36944.35 Put/s
stress-ng: info:  [48390] stress-ng-sparsematrix: qhash    161.4K       513881.54 Get/s       243532.85 Put/s
stress-ng: info:  [48392] stress-ng-stream: memory rate: 29.31 MB/sec, 11.72 Mflop/sec (instance 0)
stress-ng: info:  [48381] stress-ng-prefetch: using a 2048 KB L3 cache, 1024 benchmark rounds
stress-ng: info:  [48381] stress-ng-prefetch: non-prefetch read rate @ 0.04 GB/s
stress-ng: info:  [48381] stress-ng-prefetch: best prefetch read rate @ 0.05 GB/s at offset 7744 (~146221.37 nanoseconds)
stress-ng: error: [48344] process [48401] (stress-ng-uprobe) aborted early, out of system resources
stress-ng: info:  [48344] successful run completed in 60.49s (1 min, 0.49 secs)

Can you guide me for running stress test on riscv64 platform.

T&R Kush kumar

ColinIanKing commented 2 years ago

Some of these are not implemented because stress-ng is not being built with various support libraries, for example:

stress-ng: info: [48355] stress-ng-crypt: this stressor is not implemented on this system: riscv64 Linux 5.10.41 gcc 10.2 needs libgcrypt

stress-ng: info: [48366] stress-ng-jpeg: this stressor is not implemented on this system: riscv64 Linux 5.10.41 gcc 10.2 needs libjpeg stress-ng: info: [48365] stress-ng-ioport: this stressor is not implemented on this system: riscv64 Linux 5.10.41 gcc 10.2 this is an x86 ioport() specific test

stress-ng: info: [48374] stress-ng-mergesort: this stressor is not implemented on this system: riscv64 Linux 5.10.41 gcc 10.2 needs libbsd

stress-ng: info: [48387] stress-ng-secretmem: this stressor is not implemented on this system: riscv64 Linux 5.10.41 gcc 10.2 secretmem not available by the kernel

stress-ng: info: [48384] stress-ng-radixsort: this stressor is not implemented on this system: riscv64 Linux 5.10.41 gcc 10.2 need libbsd

stress-ng: info: [48363] stress-ng-heapsort: this stressor is not implemented on this system: riscv64 Linux 5.10.41 gcc 10.2 need libbsd

stress-ng: info: [48368] stress-ng-judy: this stressor is not implemented on this system: riscv64 Linux 5.10.41 gcc 10.2 need Judy

stress-ng: info: [48398] stress-ng-tree: this stressor is not implemented on this system: riscv64 Linux 5.10.41 gcc 10.2 need libbsd

stress-ng: info: [48408] stress-ng-wcs: this stressor is not implemented on this system: riscv64 Linux 5.10.41 gcc 10.2 need wchar support (bsd

stress-ng: info: [48412] stress-ng-zlib: this stressor is not implemented on this system: riscv64 Linux 5.10.41 gcc 10.2 need zlib library

stress-ng: info: [48401] stress-ng-uprobe: cannot set uprobe_event: errno=13 (Permission denied), skipping stressor probably should be run with root permissions

the README.md file has a list of the libraries required for various linux systems, so refer to that to see the names of libraries than need to be installed. Once installed, re-run: make clean && make

ColinIanKing commented 1 year ago

I'm adding some extra messages in 230+ stressors that give more information why stressors are skipped. I hope to push these changes out by the end of the week, but it's quite a large changeset.

kush930 commented 1 year ago

Hi Colins,

Thanks for your this information, feels good that you are working on this, I will work on new update source and if any issue comes , I will discuss with you and hope you will guide me on that time also.

T&R Kush Kumar

ColinIanKing commented 1 year ago

update pushed to repo, commit 7ccc5fe9d18b7d467e8279c0a791df6453e5a451

kush930 commented 1 year ago

Hi Colins,

I took new updated repo https://github.com/ColinIanKing/stress-ng/commit/7ccc5fe9d18b7d467e8279c0a791df6453e5a451 first I installed libgcrypt, libjpeg, libbsd package after that I run make command , its successfully builded without any error.

then I started verifiy class method cpu stress teston riscv platform, again same issue facing:-

root@kush-Unmatched-Linux-1:~# stress-ng --class cpu --all 1 --timeout 1m

stress-ng: info:  [161629] setting to a 60 second run per stressor
stress-ng: info:  [161629] ipsec_mb: stressor will be skipped, CPU needs to be an x86-64 and a recent IPSec MB library is required.
stress-ng: info:  [161629] rdrand stressor will be skipped, CPU does not support the rdrand instruction.
stress-ng: info:  [161629] rseq stressor will be skipped, rseq system call not implemented
stress-ng: info:  [161629] dispatching hogs: 1 af-alg, 1 atomic, 1 branch, 1 bsearch, 1 context, 1 cpu, 1 crypt, 1 fp-error, 1 funccall, 1 funcret, 1 getrandom, 1 goto, 1 hash, 1 heapsort, 1 hsearch, 1 ioport, 1 jpeg, 1 judy, 1 list, 1 longjmp, 1 lsearch, 1 matrix, 1 matrix-3d, 1 mergesort, 1 nop, 1 numa, 1 opcode, 1 pkey, 1 plugin, 1 prefetch, 1 qsort, 1 radixsort, 1 regs, 1 secretmem, 1 shellsort, 1 skiplist, 1 sparsematrix, 1 str, 1 stream, 1 syncload, 1 tree, 1 tsc, 1 tsearch, 1 uprobe, 1 vecfp, 1 vecmath, 1 vecshuf, 1 vecwide, 1 wcs, 1 zlib
stress-ng: info:  [161630] af-alg: 23 cryptographic algorithms found in /proc/crypto
stress-ng: info:  [161630] af-alg: 108 cryptographic algorithms in total (with defconfigs)
stress-ng: info:  [161650] jpeg: this stressor is not implemented on this system: riscv64 Linux 5.10.41 gcc 10.2 (built without jpeg library)
stress-ng: info:  [161651] judy: this stressor is not implemented on this system: riscv64 Linux 5.10.41 gcc 10.2 (built without Judy.h or Judy library support)
stress-ng: info:  [161640] crypt: this stressor is not implemented on this system: riscv64 Linux 5.10.41 gcc 10.2 (built without gcrypt library)
stress-ng: info:  [161649] ioport: this stressor is not implemented on this system: riscv64 Linux 5.10.41 gcc 10.2 (not x86 CPU and/or not built with ioport() support)
stress-ng: info:  [161658] mergesort: this stressor is not implemented on this system: riscv64 Linux 5.10.41 gcc 10.2 (built without BSD library)
stress-ng: info:  [161685] uprobe: cannot set uprobe_event: errno=13 (Permission denied), skipping stressor
stress-ng: info:  [161693] zlib: this stressor is not implemented on this system: riscv64 Linux 5.10.41 gcc 10.2 (built without zlib library support)
stress-ng: info:  [161665] prefetch: no L3 cache, using L2 size instead
stress-ng: info:  [161661] numa: system has 1 of a maximum 4 memory NUMA nodes
stress-ng: info:  [161692] wcs: this stressor is not implemented on this system: riscv64 Linux 5.10.41 gcc 10.2 (built without wchar.h or bsd/wchar.h)
stress-ng: info:  [161664] plugin: plugin shared library failed to open, skipping stressor
stress-ng: info:  [161671] secretmem: this stressor is not implemented on this system: riscv64 Linux 5.10.41 gcc 10.2 (built with headers that did not define memfd_secret() system call)
stress-ng: info:  [161676] sparsematrix: 10000 items in 500 x 500 sparse matrix (4.00% full)
stress-ng: info:  [161669] radixsort: this stressor is not implemented on this system: riscv64 Linux 5.10.41 gcc 10.2 (built with BSD library)
stress-ng: info:  [161678] stream: no L3 cache, using L2 size instead
stress-ng: info:  [161678] stream: stressor loosely based on a variant of the STREAM benchmark code
stress-ng: info:  [161678] stream: do NOT submit any of these results to the STREAM benchmark results
stress-ng: info:  [161678] stream: Using CPU cache size of 2048K
stress-ng: info:  [161647] heapsort: this stressor is not implemented on this system: riscv64 Linux 5.10.41 gcc 10.2 (built without BSD library)
stress-ng: info:  [161646] hash:         hash      hashes/sec chi squared
stress-ng: info:  [161646] hash:      adler32        15785.78       0.95
stress-ng: info:  [161646] hash:       coffin       284397.82       1.01
stress-ng: info:  [161646] hash:     coffin32       293094.25       0.99
stress-ng: info:  [161646] hash:       crc32c       138450.32       1.05
stress-ng: info:  [161646] hash:        djb2a       326880.18       0.96
stress-ng: info:  [161646] hash:        fnv1a       277669.90       1.00
stress-ng: info:  [161646] hash:       jenkin       314932.46       1.00
stress-ng: info:  [161646] hash:        kandr       271508.94       1.00
stress-ng: info:  [161646] hash:        knuth       207758.45       1.02
stress-ng: info:  [161646] hash:     loselose       330220.41       1.04
stress-ng: info:  [161646] hash:         mid5      1371491.25       1.06
stress-ng: info:  [161646] hash:     muladd32       265200.60       1.00
stress-ng: info:  [161646] hash:     muladd64       345086.02       0.98
stress-ng: info:  [161646] hash:    mulxror64       353139.98       1.01
stress-ng: info:  [161646] hash:   murmur3_32       268707.70       1.00
stress-ng: info:  [161646] hash:        nhash       139643.49       0.95
stress-ng: info:  [161646] hash:          pjw       258109.11       0.97
stress-ng: info:  [161646] hash:         sdbm       274299.27       0.98
stress-ng: info:  [161646] hash:     sedgwick       249775.42       0.97
stress-ng: info:  [161646] hash:        sobel       234328.11       0.98
stress-ng: info:  [161646] hash:          x17       306578.49       0.99
stress-ng: info:  [161646] hash:          xor       363552.48       1.00
stress-ng: error: [161629] process [161664] (plugin) aborted early, out of system resources
stress-ng: info:  [161676] sparsematrix: hash       310.3K       322125.02 get/s       170827.12 put/s
stress-ng: info:  [161676] sparsematrix: list       249.7K        16295.60 get/s         9931.70 put/s
stress-ng: info:  [161676] sparsematrix: mmap       980.0K       490524.58 get/s       122069.76 put/s
stress-ng: info:  [161676] sparsematrix: qhash      315.0K       304030.26 get/s       264709.84 put/s
stress-ng: info:  [161665] prefetch: using a 2048 KB L3 cache, 1024 benchmark rounds
stress-ng: info:  [161665] prefetch: non-prefetch read rate @ 0.03 GB per sec
stress-ng: info:  [161665] prefetch: best prefetch read rate @ 0.05 GB per sec at offset 4288 (~75655.82 nanosecs)
stress-ng: info:  [161678] stream: memory rate: 18.65 MB read/sec, 12.43 MB write/sec, 1.63 Mflop/sec (instance 0)
stress-ng: error: [161629] process [161685] (uprobe) aborted early, out of system resources
stress-ng: info:  [161629] successful run completed in 61.32s (1 min, 1.32 secs)

Can you guide me for running stress test on riscv64 platform.

T&R Kush kumar

ColinIanKing commented 1 year ago

After pulling in any changes from the repository please ensure you run:

make clean make

The make clean will remove the previous config.h file and force the build to autodetect new libraries. Please try with the latest stress-ng.