樹莓派Docker中跑sysbench

2021-10-18 13:07:37 字數 1638 閱讀 4436

想知道自己的樹莓派滿載情況下是多少功率,於是在usb處接上電壓電流計,然後在樹莓派中跑sysbench

由這篇文章進行精簡

1.樹莓派使用的是raspbian lite (buster版)映象

2.樹莓派已安裝docker

sudo docker pull ociotec/sysbench:arm32v7
docker run ociotec/sysbench:arm32v7 sysbench --test=cpu --cpu-max-prime=10000 --num-threads=4 run
這裡只測cpu,所以--test=cpu--cpu-max-prime=10000用來選項指定最大的素數,具體引數可以根據cpu的效能來設定,預設為10000,--num-threads=4指定執行緒數

其他引數參考下表

general options:

–num-threads=n number of threads to use [1]

–max-requests=n limit for total number of requests [10000]

–max-time=n limit for total execution time in seconds [0]

–forced-shutdown=string amount of time to wait after --max-time before forcing shutdown [off]

–thread-stack-size=size size of stack per thread [32k]

–init-rng=[on|off] initialize random number generator [off]

–test=string test to run

–debug=[on|off] print more debugging info [off]

–validate=[on|off] perform validation checks where possible [off]

–help=[on|off] print help and exit

–version=[on|off] print version and exit

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

oltp - oltp test

使用樹莓派3b+跑--cpu-max-prime=10000 --num-threads=4,大概在40s左右,這期間cpu都是滿載的,看usb電流電壓記,最大電流大致在700ma,也就是說此時功率約在3.5w左右,算是很低的了,還是比較省電的了,空載在250ma左右,也就是不到1.5w

樹莓派安裝Docker

本文介紹如何在樹莓派上安裝docker。首先,要分辨你手裡的樹莓派是幾代的,後續要根據版本的不同來選擇不同的映象。archlinux預設提供了兩個帳號root和alarm,密碼和帳號一樣。另外,超級管理員帳號root無法遠端登入。ssh alarm 192.168.94.32 pacman syyu...

樹莓派安裝Docker

服務編排 tips 執行指令碼 伺服器在國外,小烏龜跑路 curl ssl sh執行指令碼,指定阿里映象 curl fssl bash s docker mirror aliyunsudo usermod ag docker pisudo systemctl enable docker sudo s...

樹莓派安裝docker容器

或是中科大源 jessie main contrib non free rpidocker 指令碼安裝 sh修改許可權 sudo groupadd docker 新增docker使用者組 sudo gpasswd a user docker 將登陸使用者加入到docker使用者組中 newgrp d...