User:Alicef/Gentoo Edison/Performance/IntelBoard

From Gentoo Wiki
Jump to:navigation Jump to:search

https://wiki.gentoo.org/wiki/Sysbench

root #
root@edison:~/sysbench# sysbench --test=cpu --cpu-max-prime=20000 --num-threads=2
WARNING: the --test option is deprecated. You can pass a script name or path on the command line without any options.
WARNING: --num-threads is deprecated, use --threads instead
sysbench 1.1.0-4668ee2 (using bundled LuaJIT 2.1.0-beta2)

Running the test with following options:
Number of threads: 2
Initializing random number generator from current time


Prime numbers limit: 20000

Initializing worker threads...

Threads started!


General statistics:
	total time:                          10.0395s
	total number of events:              404

Latency (ms):
		 min:                                 49.28
		 avg:                                 49.66
		 max:                                 52.36
		 95th percentile:                     50.11
		 sum:                              20061.72

Threads fairness:
	events (avg/stddev):           202.0000/1.00
	execution time (avg/stddev):   10.0309/0.00

root@edison:~/sysbench# sysbench --test=fileio --file-total-size=1G prepare
root@edison:~/sysbench# sysbench --test=fileio --file-total-size=1G --file-test-mode=rndrw --max-time=300 --max-requests=0 run
WARNING: the --test option is deprecated. You can pass a script name or path on the command line without any options.
WARNING: --max-time is deprecated, use --time instead
sysbench 1.1.0-4668ee2 (using bundled LuaJIT 2.1.0-beta2)

Running the test with following options:
Number of threads: 1
Initializing random number generator from current time


Extra file open flags: 0
128 files, 8MiB each
1GiB total file size
Block size 16KiB
Number of IO requests: 0
Read/Write ratio for combined random IO test: 1.50
Periodic FSYNC enabled, calling fsync() each 100 requests.
Calling fsync() at the end of test, Enabled.
Using synchronous I/O mode
Doing random r/w test
Initializing worker threads...

Threads started!


File operations:
	reads/s:                      527.97
	writes/s:                     351.98
	fsyncs/s:                     1126.16

Throughput:
	read, MiB/s:                  8.25
	written, MiB/s:               5.50

General statistics:
	total time:                          300.0159s
	total number of events:              601866

Latency (ms):
		 min:                                  0.02
		 avg:                                  0.49
		 max:                                430.36
		 95th percentile:                      1.32
		 sum:                             294509.57

Threads fairness:
	events (avg/stddev):           601866.0000/0.00
	execution time (avg/stddev):   294.5096/0.00




root@edison:~/sysbench# sysbench --test=threads --thread-locks=1 run
WARNING: the --test option is deprecated. You can pass a script name or path on the command line without any options.
sysbench 1.1.0-4668ee2 (using bundled LuaJIT 2.1.0-beta2)

Running the test with following options:
Number of threads: 1
Initializing random number generator from current time


Initializing worker threads...

Threads started!


General statistics:
	total time:                          10.0042s
	total number of events:              1739

Latency (ms):
		 min:                                  5.59
		 avg:                                  5.74
		 max:                                  6.52
		 95th percentile:                      5.99
		 sum:                               9988.16

Threads fairness:
	events (avg/stddev):           1739.0000/0.00
	execution time (avg/stddev):   9.9882/0.00


root@edison:~/sysbench# sysbench --test=mutex --num-threads=64 run
WARNING: the --test option is deprecated. You can pass a script name or path on the command line without any options.
WARNING: --num-threads is deprecated, use --threads instead
sysbench 1.1.0-4668ee2 (using bundled LuaJIT 2.1.0-beta2)

Running the test with following options:
Number of threads: 64
Initializing random number generator from current time


Initializing worker threads...

Threads started!


General statistics:
	total time:                          4.1155s
	total number of events:              64

Latency (ms):
		 min:                               2459.67
		 avg:                               3717.59
		 max:                               4000.79
		 95th percentile:                   3982.86
		 sum:                             237925.98

Threads fairness:
	events (avg/stddev):           1.0000/0.00
	execution time (avg/stddev):   3.7176/0.28

root@edison:~/sysbench# sysbench --test=memory --num-threads=4 run
WARNING: the --test option is deprecated. You can pass a script name or path on the command line without any options.
WARNING: --num-threads is deprecated, use --threads instead
sysbench 1.1.0-4668ee2 (using bundled LuaJIT 2.1.0-beta2)

Running the test with following options:
Number of threads: 4
Initializing random number generator from current time


Running memory speed test with the following options:
  block size: 1KiB
  total size: 102400MiB
  operation: write
  scope: global

Initializing worker threads...

Threads started!

Total operations: 2225837 (222574.16 per second)

2173.67 MiB transferred (217.36 MiB/sec)


General statistics:
	total time:                          10.0004s
	total number of events:              2225837

Latency (ms):
		 min:                                  0.00
		 avg:                                  0.01
		 max:                                 20.20
		 95th percentile:                      0.00
		 sum:                              17167.30

Threads fairness:
	events (avg/stddev):           556459.2500/11955.73
	execution time (avg/stddev):   4.2918/0.06


https://gist.github.com/paulocheque/7f7ea9642b500359acee
root@edison:~# python2.7 -m timeit "a = lambda:None; [a() for i in range(100)]"
10000 loops, best of 3: 184 usec per loop

00)]"edison:~# python2.7 -m timeit "A = type('A', (), {}); [A() for i in range(100)]"
1000 loops, best of 3: 422 usec per loop

root@edison:~# python2.7 -m timeit "A = type('A', (), {'a':lambda x:None}); a = A(); [a.a() for i in range(100)]"                                                                                             
1000 loops, best of 3: 511 usec per loop                                                               

root@edison:~# python2.7 -m timeit "A = type('A', (), {}); A.a = lambda x:None; a = A(); [a.a() for i in range(100)]"                                                                                                                           
1000 loops, best of 3: 504 usec per loop 

root@edison:~# ruby -e "require 'benchmark'; time = Benchmark.measure do 10000.time { (0..100).to_a.join('-') } end; puts time;"
  7.040000   0.000000   7.040000 (  7.098019)

root@edison:~# python2.7 -m timeit '"-".join(str(n) for n in range(100))'
1000 loops, best of 3: 450 usec per loop
root@edison:~# python2.7 -m timeit '"-".join(str(n) for n in xrange(100))'
1000 loops, best of 3: 455 usec per loop

https://gist.githubusercontent.com/SivoP/19402fdaaea99e80cfaf/raw/9602c7c0f340f91ab0679463d7916fc0a9776857/gistfile1.rb
root@edison:~# ruby gistfile1.rb 
this process took 1.843e-05 seconds 
this process took 1.262e-05 seconds 
this process took 1.4264e-05 seconds 

https://gist.githubusercontent.com/muayyad-alsadi/92d9bf4a13f9efb0df3e/raw/99d41a8a3f37ab25615a7c839624e8d22a60799b/primes.py

root@edison:~# python2.7 primes.py 
('dt=', 24.114875078201294)

https://gist.githubusercontent.com/willtownes/2762ba1dd73fb03ecdb24d625aa27b58/raw/d8c125d31e04c98512cf88583b67cd86d7e91af9/mp_benchmark.py

root@edison:~# python mp_benchmark.py 

Parallel processing with 2 cores
Sum of primes below 100000 is 454396537
Sum of primes below 200000 is 1709600813
Sum of primes below 300000 is 3709507114
Sum of primes below 400000 is 6458901531
Sum of primes below 500000 is 9914236195
Sum of primes below 600000 is 14071826345
Sum of primes below 700000 is 18910286312
Sum of primes below 800000 is 24465663438
Sum of primes below 900000 is 30689332265
Time elapsed:  221.499526978 s

Serial processing
100000: 454396537
200000: 1709600813
300000: 3709507114
400000: 6458901531
500000: 9914236195
600000: 14071826345
700000: 18910286312
800000: 24465663438
900000: 30689332265
Time elapsed:  460.890039921 s