Skip to content

Instantly share code, notes, and snippets.

@cyounkins
Created January 20, 2021 18:01
Show Gist options
  • Save cyounkins/633f5bec6623d8d466412f405617c083 to your computer and use it in GitHub Desktop.
Save cyounkins/633f5bec6623d8d466412f405617c083 to your computer and use it in GitHub Desktop.
Testing niceness inside docker containers
$ docker run -it --rm --cap-add SYS_NICE systester /bin/sh -c 'time nice --10 /home/build/systester/pkg/systester/usr/bin/systester-cli -gausslg 8M -threads 8'
System Stability Tester. CLI Version 1.5.1.
Distributed under the terms of the GPL v2.
Type -help for command line options.
http://systester.sourceforge.net
Intel(R) Xeon(R) CPU E31220 @ 3.10GHz
Running Linux x86_64 at 3099 MHz
System memory: 32092 MB
Hardware threads: 4
GMP version: GMP 6.2.1
Compiler used for GMP: gcc with flags:
-march=x86-64 -mtune=generic -O2 -pipe -fno-plt
Compiled for 64 bit environments
Operating mode: Test
Calculating 8388608 digits of pi
-----------------------------------------
Turn: 1 Errors: 0 Threads: 8
Running For: 0h 0m 0.000s ChkErr: 0
Failed After: 0s
-----------------------------------------
Loop Digits State Time
---------------------------------
0 1 OK 0h 0m 4.086s
1 2 OK 0h 0m 7.551s
2 4 OK 0h 0m 12.301s
3 8 OK 0h 0m 17.001s
4 16 OK 0h 0m 22.011s
5 32 OK 0h 0m 26.821s
6 64 OK 0h 0m 31.700s
7 128 OK 0h 0m 36.380s
8 256 OK 0h 0m 41.063s
9 512 OK 0h 0m 46.074s
10 1K OK 0h 0m 50.720s
11 2K OK 0h 0m 55.197s
12 4K OK 0h 0m 59.971s
13 8K OK 0h 1m 4.311s
14 16K OK 0h 1m 9.219s
15 32K OK 0h 1m 13.901s
16 64K OK 0h 1m 18.431s
17 128K OK 0h 1m 22.972s
18 256K OK 0h 1m 27.721s
19 512K OK 0h 1m 32.621s
20 1M OK 0h 1m 37.161s
21 2M OK 0h 1m 41.905s
22 4M OK 0h 1m 46.223s
23 8M OK 0h 1m 50.002s
Checksum validation...Gauss PASSED!!!
real 1m52.232s
user 3m28.374s
sys 0m2.864s
$ docker run -it --rm --cap-add SYS_NICE systester /bin/sh -c 'time nice -0 /home/build/systester/pkg/systester/usr/bin/systester-cli -gausslg 8M -threads 8'
System Stability Tester. CLI Version 1.5.1.
Distributed under the terms of the GPL v2.
Type -help for command line options.
http://systester.sourceforge.net
Intel(R) Xeon(R) CPU E31220 @ 3.10GHz
Running Linux x86_64 at 3099 MHz
System memory: 32092 MB
Hardware threads: 4
GMP version: GMP 6.2.1
Compiler used for GMP: gcc with flags:
-march=x86-64 -mtune=generic -O2 -pipe -fno-plt
Compiled for 64 bit environments
Operating mode: Test
Calculating 8388608 digits of pi
-----------------------------------------
Turn: 1 Errors: 0 Threads: 8
Running For: 0h 0m 0.000s ChkErr: 0
Failed After: 0s
-----------------------------------------
Loop Digits State Time
---------------------------------
0 1 OK 0h 0m 5.629s
1 2 OK 0h 0m 9.495s
2 4 OK 0h 0m 14.111s
3 8 OK 0h 0m 18.791s
4 16 OK 0h 0m 23.511s
5 32 OK 0h 0m 27.901s
6 64 OK 0h 0m 32.582s
7 128 OK 0h 0m 37.595s
8 256 OK 0h 0m 42.021s
9 512 OK 0h 0m 46.711s
10 1K OK 0h 0m 51.482s
11 2K OK 0h 0m 56.081s
12 4K OK 0h 1m 0.946s
13 8K OK 0h 1m 5.751s
14 16K OK 0h 1m 10.618s
15 32K OK 0h 1m 15.390s
16 64K OK 0h 1m 20.261s
17 128K OK 0h 1m 25.154s
18 256K OK 0h 1m 29.930s
19 512K OK 0h 1m 34.351s
20 1M OK 0h 1m 39.071s
21 2M OK 0h 1m 43.561s
22 4M OK 0h 1m 47.726s
23 8M OK 0h 1m 50.657s
Checksum validation...Gauss PASSED!!!
real 1m52.741s
user 3m28.265s
sys 0m2.785s
FROM archlinux:latest
RUN pacman -Sy --noconfirm base-devel git
RUN mkdir /home/build
RUN chgrp nobody /home/build
RUN chmod g+ws /home/build
RUN setfacl -m u::rwx,g::rwx /home/build
RUN setfacl -d --set u::rwx,g::rwx,o::- /home/build
USER nobody
WORKDIR /home/build
RUN git clone https://aur.archlinux.org/systester.git
WORKDIR /home/build/systester
RUN makepkg
USER root
$ sudo nice --10 sudo -u craig time systester-cli -gausslg 8M -threads 8
System Stability Tester. CLI Version 1.5.1.
Distributed under the terms of the GPL v2.
Type -help for command line options.
http://systester.sourceforge.net
Intel(R) Xeon(R) CPU E31220 @ 3.10GHz
Running Linux x86_64 at 3099 MHz
System memory: 32092 MB
Hardware threads: 4
GMP version: GMP 6.2.0
Compiler used for GMP: gcc with flags:
-march=x86-64 -mtune=generic -O2 -pipe -fno-plt
Compiled for 64 bit environments
Operating mode: Test
Calculating 8388608 digits of pi
-----------------------------------------
Turn: 1 Errors: 0 Threads: 8
Running For: 0h 0m 0.000s ChkErr: 0
Failed After: 0s
-----------------------------------------
Loop Digits State Time
---------------------------------
0 1 OK 0h 0m 3.425s
1 2 OK 0h 0m 5.373s
2 4 OK 0h 0m 7.999s
3 8 OK 0h 0m 10.638s
4 16 OK 0h 0m 13.094s
5 32 OK 0h 0m 15.832s
6 64 OK 0h 0m 18.447s
7 128 OK 0h 0m 21.136s
8 256 OK 0h 0m 23.649s
9 512 OK 0h 0m 26.229s
10 1K OK 0h 0m 28.816s
11 2K OK 0h 0m 31.535s
12 4K OK 0h 0m 34.319s
13 8K OK 0h 0m 36.899s
14 16K OK 0h 0m 39.506s
15 32K OK 0h 0m 42.385s
16 64K OK 0h 0m 44.960s
17 128K OK 0h 0m 47.441s
18 256K OK 0h 0m 49.911s
19 512K OK 0h 0m 52.724s
20 1M OK 0h 0m 55.337s
21 2M OK 0h 0m 57.938s
22 4M OK 0h 1m 0.366s
23 8M OK 0h 1m 2.402s
Checksum validation...Gauss PASSED!!!
205.24user 3.28system 1:04.65elapsed 322%CPU (0avgtext+0avgdata 655420maxresident)k
0inputs+0outputs (0major+1738846minor)pagefaults 0swaps
$ sudo nice -0 sudo -u craig time systester-cli -gausslg 8M -threads 8
System Stability Tester. CLI Version 1.5.1.
Distributed under the terms of the GPL v2.
Type -help for command line options.
http://systester.sourceforge.net
Intel(R) Xeon(R) CPU E31220 @ 3.10GHz
Running Linux x86_64 at 3099 MHz
System memory: 32092 MB
Hardware threads: 4
GMP version: GMP 6.2.0
Compiler used for GMP: gcc with flags:
-march=x86-64 -mtune=generic -O2 -pipe -fno-plt
Compiled for 64 bit environments
Operating mode: Test
Calculating 8388608 digits of pi
-----------------------------------------
Turn: 1 Errors: 0 Threads: 8
Running For: 0h 0m 0.000s ChkErr: 0
Failed After: 0s
-----------------------------------------
Loop Digits State Time
---------------------------------
0 1 OK 0h 0m 14.534s
1 2 OK 0h 0m 29.723s
2 4 OK 0h 0m 49.476s
3 8 OK 0h 1m 4.088s
4 16 OK 0h 1m 7.026s
5 32 OK 0h 1m 9.346s
6 64 OK 0h 1m 11.742s
7 128 OK 0h 1m 14.065s
8 256 OK 0h 1m 16.462s
9 512 OK 0h 1m 18.742s
10 1K OK 0h 1m 21.224s
11 2K OK 0h 1m 23.638s
12 4K OK 0h 1m 25.915s
13 8K OK 0h 1m 28.247s
14 16K OK 0h 1m 30.556s
15 32K OK 0h 1m 33.230s
16 64K OK 0h 1m 35.544s
17 128K OK 0h 1m 37.989s
18 256K OK 0h 1m 40.288s
19 512K OK 0h 1m 42.751s
20 1M OK 0h 1m 45.008s
21 2M OK 0h 1m 47.418s
22 4M OK 0h 1m 49.555s
23 8M OK 0h 1m 51.374s
Checksum validation...Gauss PASSED!!!
205.53user 3.02system 1:53.42elapsed 183%CPU (0avgtext+0avgdata 652360maxresident)k
0inputs+0outputs (0major+1742264minor)pagefaults 0swaps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment