873 瀏覽數

System test tool – LMbench

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

  • bw_file_rd
    Reading and summing of a file via the read interface.
  • bw_mem
    先前測試記憶體有 bw_mem_cp (memory copy) ,bw_mem_rd (memory reading and summing) , bw_mem_wr (memory writing). 現統一使用這一程式.主要在測試 processor 與 memory 之間的傳輸速度.
  • bw_mmap_rd
    這邊主要在測試 memory 到 檔案之間的速度.
  • bw_pipe
    Reading of data via a pipe.
  • bw_tcp
    Reading of data via a TCP/IP socket.
  • bw_unix
    Reading data from a UNIX socket.

Latency benchmarks

  • lat_connect
    The time it takes to establish a TCP/IP connection.
  • lat_ctx
    Context switching; the number and size of processes is varied.
  • lat_fcntl
    Fcntl file locking.
  • lat_fifo
    “hot potato” transaction through a UNIX FIFO.
  • lat_fs
    Creating and deleting small files.
  • lat_pagefault
    The time it takes to fault in a page from a file.
  • lat_mem_rd
    主要在測試 memory 的讀取延遲 (latency).
  • lat_mmap
    這邊主要在測試 memory 到 檔案之間的延遲 (latency).
  • 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_select
    Select latency
  • lat_sig
    Signal installation and catch latencies. Also protection fault signal latency.
  • lat_syscall
    Non trivial entry into the system.
  • lat_tcp
    “hot potato” transaction through TCP.
  • lat_udp
    “hot potato” transaction through UDP.
  • lat_unix
    “hot potato” transaction through UNIX sockets.
  • lat_unix_connect
    The time it takes to establish a UNIX socket connection.

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
    John McCalpin’s stream benchmark
  • par_mem
    測試記憶體系統可以並行 (parallelism) 執行多少個請求.
  • par_ops
    Basic processor operation parallelism.
  • lmbench
    System benchmarks
  • lmdd
    Move io for performance and debugging tests

工具有點太多了,下面以不同的元件 (CPU, Memory , I/O) 來區分.

  1. Memory – http://benjr.tw/98285
    bw_mem , bw_mmap_rd , lat_mem_rd , lat_mmap , stream , par_mem

發表迴響