LMbench 是用來測試系統效能的工具, Ubuntu 下可以直接使用 apt 來下載 lmbench .
測試環境為 Ubuntu 16.04 x86_64 .
root@ubuntu:~# apt-get install lmbench
安裝完成的 LMbench 程式目錄位於 /usr/lib/lmbench/bin/x86_64-linux-gnu/ ,來看看提供了哪一些工具可供測試,項目如下.
root@ubuntu:~# cd /usr/lib/lmbench/bin/x86_64-linux-gnu/
Bandwidth benchmarks
- 測試記憶體 – https://benjr.tw/98285
- bw_file_rd
檔案 (硬碟) 到 memory 之間產生 mapping 並測試其讀取速度. - bw_mem
主要在測試 processor 與 memory 之間的傳輸速度. - bw_mmap_rd
從檔案 (硬碟) 到 memory 測試其讀取速度.
- bw_file_rd
- 測試處理器 – https://benjr.tw/98333
- bw_pipe
產生兩個 processes (行程) 彼此交換 (pipe) 資料並測試其速度. - bw_unix
產生了 parent (reader) , child (writer) processes彼 此交換 (pipe) 資料並測試其速度.
- bw_pipe
- 測試網路
- bw_tcp
Reading of data via a TCP/IP socket.
- bw_tcp
Latency benchmarks
- 測試記憶體 – https://benjr.tw/98338
- lat_pagefault
The time it takes to fault in a page from a file. - lat_mem_rd
主要在測試 processor 與 memory 的讀取延遲 (latency). - lat_mmap
這邊主要在測試 memory 到 檔案 (硬碟) 之間的延遲 (latency).
- lat_pagefault
- 測試處理器
- lat_ctx
Context switching; the number and size of processes is varied. - lat_fifo
“hot potato” transaction through a UNIX FIFO. - lat_ops
Basic processor operations, such as integer XOR, ADD, SUB, MUL, DIV, and MOD, and float ADD, MUL, DIV, and double ADD, MUL, DIV. - lat_pipe
“hot potato” transaction through a Unix pipe. - lat_proc
Process creation times (various sorts). - lat_rpc
“hot potato” transaction through Sun RPC over UDP or TCP. - lat_unix
“hot potato” transaction through UNIX sockets.
- lat_ctx
- 測試網路
- lat_connect
The time it takes to establish a TCP/IP connection. - lat_tcp
“hot potato” transaction through TCP. - lat_udp
“hot potato” transaction through UDP. - lat_unix_connect
The time it takes to establish a UNIX socket connection.
- lat_connect
- 檔案
- lat_fcntl
Fcntl file locking. - lat_fs
Creating and deleting small files. - lat_select
Select latency
- lat_fcntl
- Other -TBD
- lat_sig
Signal installation and catch latencies. Also protection fault signal latency. - lat_syscall
Non trivial entry into the system.
- lat_sig
Miscellaneous
- mhz
Processor cycle time - tlb
TLB size and TLB miss latency - line
Cache line size (in bytes) - cache
Cache statistics, such as line size, cache sizes, memory parallelism. - stream (測試記憶體) – https://benjr.tw/98356
John McCalpin’s stream benchmark - par_mem (測試記憶體) – https://benjr.tw/98365
測試記憶體系統可以並行 (parallelism) 執行多少個請求. - par_ops
Basic processor operation parallelism. - lmbench-run
System benchmarks - lmdd (測試硬碟) – https://benjr.tw/98399
lmdd 類似 dd 用來測試硬碟速度的方法.
沒有解決問題,試試搜尋本站其他內容