운영체제 깨알지식 웹핵






#라떼판다 #LattePanda #LattePanda 4G/64G #라즈베리파이 #Raspberry Pi #Raspberry Pi 3B+ #sysbench #성능비교평가 #Benchmark Test #라즈비안 #칼리리눅스

[2020년 02월 12일]

간단한 리눅스용 성능 비교평가 도구 sysbench 기반의 라즈베리파이/라떼판다 비교

요약

  • sudo apt install sysbench
  • sysbench cpu run
  • sysbench fileio --file-test-mode=seqwr run

본문

라즈베리파이 3B와 라떼판다의 CPU 성능을 간단하게나마 비교해보고 싶어서 sysbench를 설치하여 실행해 보았다.

jinsuk@panda:~$ sudo apt-get install sysbench
패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다       
상태 정보를 읽는 중입니다... 완료
다음 새 패키지를 설치할 것입니다:
  sysbench
0개 업그레이드, 1개 새로 설치, 0개 제거 및 0개 업그레이드 안 함.
112 k바이트 아카이브를 받아야 합니다.
이 작업 후 360 k바이트의 디스크 공간을 더 사용하게 됩니다.
받기:1 http://ftp.harukasan.org/kali kali-rolling/main amd64 sysbench amd64 1.0.18+ds-1 [112 kB]
내려받기 112 k바이트, 소요시간 1초 (90.8 k바이트/초)
Selecting previously unselected package sysbench.
(데이터베이스 읽는중 ...현재 259129개의 파일과 디렉터리가 설치되어 있습니다.)
Preparing to unpack .../sysbench_1.0.18+ds-1_amd64.deb ...
Unpacking sysbench (1.0.18+ds-1) ...
sysbench (1.0.18+ds-1) 설정하는 중입니다 ...
Processing triggers for kali-menu (2020.1.7) ...
Processing triggers for man-db (2.9.0-2) ...
jinsuk@panda:~$ 

위는 LattePanda 4GB/64GB에 설치한 Kali Linux에 sysbench를 설치한 것이다. 그리고 다음은 sysbench의 기본 도움말이다.

jinsuk@panda:~$ sysbench --help
Usage:
  sysbench [options]... [testname] [command]

Commands implemented by most tests: prepare run cleanup help

General options:
  --threads=N                     number of threads to use [1]
  --events=N                      limit for total number of events [0]
  --time=N                        limit for total execution time in seconds [10]
  --forced-shutdown=STRING        number of seconds to wait after the --time limit before forcing shutdown, or 'off' to disable [off]
  --thread-stack-size=SIZE        size of stack per thread [64K]
  --rate=N                        average transactions rate. 0 for unlimited rate [0]
  --report-interval=N             periodically report intermediate statistics with a specified interval in seconds. 0 disables intermediate reports [0]
  --report-checkpoints=[LIST,...] dump full statistics and reset all counters at specified points in time. The argument is a list of comma-separated values representing the amount of time in seconds elapsed from start of test when report checkpoint(s) must be performed. Report checkpoints are off by default. []
  --debug[=on|off]                print more debugging info [off]
  --validate[=on|off]             perform validation checks where possible [off]
  --help[=on|off]                 print help and exit [off]
  --version[=on|off]              print version and exit [off]
  --config-file=FILENAME          File containing command line options
  --tx-rate=N                     deprecated alias for --rate [0]
  --max-requests=N                deprecated alias for --events [0]
  --max-time=N                    deprecated alias for --time [0]
  --num-threads=N                 deprecated alias for --threads [1]

Pseudo-Random Numbers Generator options:
  --rand-type=STRING random numbers distribution {uniform,gaussian,special,pareto} [special]
  --rand-spec-iter=N number of iterations used for numbers generation [12]
  --rand-spec-pct=N  percentage of values to be treated as 'special' (for special distribution) [1]
  --rand-spec-res=N  percentage of 'special' values to use (for special distribution) [75]
  --rand-seed=N      seed for random number generator. When 0, the current time is used as a RNG seed. [0]
  --rand-pareto-h=N  parameter h for pareto distribution [0.2]

Log options:
  --verbosity=N verbosity level {5 - debug, 0 - only critical messages} [3]

  --percentile=N       percentile to calculate in latency statistics (1-100). Use the special value of 0 to disable percentile calculations [95]
  --histogram[=on|off] print latency histogram in report [off]

General database options:

  --db-driver=STRING  specifies database driver to use ('help' to get list of available drivers) [mysql]
  --db-ps-mode=STRING prepared statements usage mode {auto, disable} [auto]
  --db-debug[=on|off] print database-specific debug information [off]


Compiled-in database drivers:
  mysql - MySQL driver
  pgsql - PostgreSQL driver

mysql options:
  --mysql-host=[LIST,...]          MySQL server host [localhost]
  --mysql-port=[LIST,...]          MySQL server port [3306]
  --mysql-socket=[LIST,...]        MySQL socket
  --mysql-user=STRING              MySQL user [sbtest]
  --mysql-password=STRING          MySQL password []
  --mysql-db=STRING                MySQL database name [sbtest]
  --mysql-ssl[=on|off]             use SSL connections, if available in the client library [off]
  --mysql-ssl-cipher=STRING        use specific cipher for SSL connections []
  --mysql-compression[=on|off]     use compression, if available in the client library [off]
  --mysql-debug[=on|off]           trace all client library calls [off]
  --mysql-ignore-errors=[LIST,...] list of errors to ignore, or "all" [1213,1020,1205]
  --mysql-dry-run[=on|off]         Dry run, pretend that all MySQL client API calls are successful without executing them [off]

pgsql options:
  --pgsql-host=STRING     PostgreSQL server host [localhost]
  --pgsql-port=N          PostgreSQL server port [5432]
  --pgsql-user=STRING     PostgreSQL user [sbtest]
  --pgsql-password=STRING PostgreSQL password []
  --pgsql-db=STRING       PostgreSQL database name [sbtest]

Compiled-in tests:
  fileio - File I/O test
  cpu - CPU performance test
  memory - Memory functions speed test
  threads - Threads subsystem performance test
  mutex - Mutex performance test

See 'sysbench <testname> help' for a list of options for each test.

jinsuk@panda:~$ 
jinsuk@panda:~$ sysbench cpu run
sysbench 1.0.18 (using system LuaJIT 2.1.0-beta3)

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


Prime numbers limit: 10000

Initializing worker threads...

Threads started!

CPU speed:
    events per second:   417.51

General statistics:
    total time:                          10.0024s
    total number of events:              4180

Latency (ms):
         min:                                    2.37
         avg:                                    2.39
         max:                                    8.64
         95th percentile:                        2.48
         sum:                                 9998.28

Threads fairness:
    events (avg/stddev):           4180.0000/0.00
    execution time (avg/stddev):   9.9983/0.00

jinsuk@panda:~$ 
jinsuk@panda:~$ sysbench fileio --file-test-mode=seqwr run
sysbench 1.0.18 (using system LuaJIT 2.1.0-beta3)

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


Extra file open flags: (none)
128 files, 16MiB each
2GiB total file size
Block size 16KiB
Periodic FSYNC enabled, calling fsync() each 100 requests.
Calling fsync() at the end of test, Enabled.
Using synchronous I/O mode
Doing sequential write (creation) test
Initializing worker threads...

Threads started!


File operations:
    reads/s:                      0.00
    writes/s:                     1086.67
    fsyncs/s:                     1403.10

Throughput:
    read, MiB/s:                  0.00
    written, MiB/s:               16.98

General statistics:
    total time:                          10.0270s
    total number of events:              24846

Latency (ms):
         min:                                    0.05
         avg:                                    0.40
         max:                                   34.61
         95th percentile:                        0.92
         sum:                                 9897.28

Threads fairness:
    events (avg/stddev):           24846.0000/0.00
    execution time (avg/stddev):   9.8973/0.00

jinsuk@panda:~$ 

Raspberry Pi 3B+에서도 동일하게 진행해보았다. 칼리에서는 Sysbench 1.0인데 라즈비안에서는 0.4가 설치되어 사용법이 약간 다르다.

pi@raspbian:~ $ sudo apt install sysbench
패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다       
상태 정보를 읽는 중입니다... 완료
다음 새 패키지를 설치할 것입니다:
  sysbench
0개 업그레이드, 1개 새로 설치, 0개 제거 및 0개 업그레이드 안 함.
55.8 k바이트 아카이브를 받아야 합니다.
이 작업 후 118 k바이트의 디스크 공간을 더 사용하게 됩니다.
받기:1 http://ftp.harukasan.org/raspbian/raspbian stretch/main armhf sysbench armhf 0.4.12-1.2 [55.8 kB]
내려받기 55.8 k바이트, 소요시간 1초 (38.6 k바이트/초)
Selecting previously unselected package sysbench.
(데이터베이스 읽는중 ...현재 111105개의 파일과 디렉터리가 설치되어 있습니다.)
Preparing to unpack .../sysbench_0.4.12-1.2_armhf.deb ...
Unpacking sysbench (0.4.12-1.2) ...
Processing triggers for man-db (2.7.6.1-2) ...
sysbench (0.4.12-1.2) 설정하는 중입니다 ...
pi@raspbian:~ $ sysbench --test=cpu run
sysbench 0.4.12:  multi-threaded system evaluation benchmark

Running the test with following options:
Number of threads: 1

Doing CPU performance benchmark

Threads started!
Done.

Maximum prime number checked in CPU test: 10000


Test execution summary:
    total time:                          139.2643s
    total number of events:              10000
    total time taken by event execution: 139.2589
    per-request statistics:
         min:                                 13.89ms
         avg:                                 13.93ms
         max:                                 28.00ms
         approx.  95 percentile:              13.96ms

Threads fairness:
    events (avg/stddev):           10000.0000/0.00
    execution time (avg/stddev):   139.2589/0.00

pi@raspbian:~ $ sysbench --test=fileio --file-test-mode=seqwr run
sysbench 0.4.12:  multi-threaded system evaluation benchmark

Running the test with following options:
Number of threads: 1

Extra file open flags: 0
128 files, 16Mb each
2Gb total file size
Block size 16Kb
Periodic FSYNC enabled, calling fsync() each 100 requests.
Calling fsync() at the end of test, Enabled.
Using synchronous I/O mode
Doing sequential write (creation) test
Threads started!
Done.

Operations performed:  0 Read, 131072 Write, 128 Other = 131200 Total
Read 0b  Written 2Gb  Total transferred 2Gb  (16.391Mb/sec)
 1049.02 Requests/sec executed

Test execution summary:
    total time:                          124.9477s
    total number of events:              131072
    total time taken by event execution: 118.8120
    per-request statistics:
         min:                                  0.04ms
         avg:                                  0.91ms
         max:                               5588.14ms
         approx.  95 percentile:               0.14ms

Threads fairness:
    events (avg/stddev):           131072.0000/0.00
    execution time (avg/stddev):   118.8120/0.00

pi@raspbian:~ $ 

결과 요약

장비CPUCPU 연산시간저장장치파일작업 시간
LattePanda 4G/64G(x86) 인텔 아톰 x5-Z8350 프로세서10.00초eMMC10.03초
Raspberry Pi 3 B+(ARM)Quad Core 1.2GHz Broadcom BCM2837 64bit CPU139.3초Micro SD Card118.8초

이 웹 서버는 Raspberry Pi 3B+에서 구동중이다. 웹 서비스에는 전혀 무리가 없다. 라떼판다 4/64는 윈도우 10을 설치해서 구동했을 때는 매우 느리게 느껴졌는 데 Raspberry Pi 3B+에 비하면 - 단순비교지만 - CPU는 약 14배, 저장장치는 약 12배 빠른 편이니 웹서버로 사용하기에는 매우 훌륭할 것으로 보인다.

참고로 라즈베리파이 3B+는 5V-2.1A 마이크로5핀 충전기, 라떼판다 4/64는 5V/3.0A 마이크로5핀 충전기로 전원을 공급하고 있다. 라즈베리파이에는 별도의 전원없이 256GB SSD를 외장 USB로 연결하였다. 라떼판다에는 1TB SSD를 USB 3.0 포트에 연결해서 미디어 서버로 사용할 예정이다.

[처음 작성한 날: 2020.02.12]    [마지막으로 고친 날: 2020.02.12] 


< 이전 글 : Beelink N41의 BIOS 엉킴, 부팅 실패 - 바이오스 공장초기화 방법 (2020.02.13)

> 다음 글 : LattePanda에 리눅스를 설치해 본 간단한 경험담 (2020.02.11)


크리에이티브 커먼즈 라이선스 이 저작물은 크리에이티브 커먼즈 저작자표시 4.0 국제 라이선스에 따라 이용할 수 있습니다.
잘못된 내용, 오탈자 및 기타 문의사항은 j1n5uk{at}daum.net으로 연락주시기 바랍니다.
웹핵.다이누.넷 대문 깨알지식 대문