分享

常用的 Stress / Performance 工具 – Benjr.tw

 iasi 2017-11-17

雖然自己是從事 QA(Quality Assurance) 相關測試工作,但對於這些工具的使用還是有很多問號,下面列出 Linux 下我常用的 壓力(Stress) 與 的效能 (Performance) 測試軟體.

壓力測試 (Stress)

要如何在 Linux 下針對不同的 I/O 與系統做壓力測試,可以參考下面幾種方式.

  • SysBenchhttp:///8715
    Linux 下常見的壓力測試工具不多,而且通常很分散,要不然就是協力廠商所開發的工具需收費而且所費不貲,不過現在 Linux 下有一套比較完整的壓力測試工具 sysbench ,具有 File I/O, CPU , Memory , Threads , Mutx , OLTP 等測試.
  • Stressful Application Test (stressapptest)http:///96740
    Stressful Application Test (stressapptest) 程式可以在 memory 到 processor 與 I/O 之間產生大量的隨機流量,主要用於模擬系統在高負載情況下的壓力測試,他現在屬於 apache 2.0 license.
  • memtest86+http:///491
    在 Linux 的開機光碟中專門用來檢視記憶體模組的工具.
  • Memtesterhttp:///96460
    前面的 Memtest86+ 無法直接在 Linux 環境下直接來使用,Memtester 可以直接在 Linux 環境下執行.
  • Fio http:///96736
    Fio 提供兩個參數可共硬碟做壓力測試.

效能可以區分為兩個種類,一種是單體的效能(如 CPU , MEMORY , DISK , IO …),另外一種就是針對整個系統(單一伺服器 server , 單一儲存裝置 Storage 或是機櫃 Rack ),下面大部分使用的方式是透過 軟體+實際設備 的方式來進行效能測試.

除了這種方式外 QA 還會利用不同種類的電子量測設備來進行效能測試,如 Spirent (台灣代理 廣聯科技) ,IXIA (台灣代理 派恩科技), 以及其他的 立肯科技 或是 太克科技,使用電子量測設備的好處是可以比較快速看出系統在設計時有哪些瑕疵存在.外面廠商也有專門幫你做驗證的如 百佳泰.

單體效能 (Performance)

下面是 Linux 環境下我常用的單體效能測試工具:
CPU

  • CPU Burn-inhttp:///8738
    只能針對單核心在做運算,不推薦使用.
  • Geekbenchhttp:///94201
    針對 整數 (Integer performance) ,浮點數 (Floating point performance) 與 記憶體 (Memory performance)的運算(主要涵蓋了 加密,圖像處理,信號處理與物理模擬).
  • Lmbench 測試處理器http:///98333
    • bw_pipe
      產生兩個 processes (行程) 彼此交換 (pipe) 資料並測試其速度.
    • bw_unix
      產生了 parent (reader) , child (writer) processes彼 此交換 (pipe) 資料並測試其速度.

Memory
Lmbech 測試記憶體效能http:///98285

  • bw_file_rd
    檔案 (硬碟) 到 memory 之間產生 mapping 並測試其讀取速度.
  • bw_mem
    主要在測試 processor 與 memory 之間的傳輸速度.
  • bw_mmap_rd
    從檔案 (硬碟) 到 memory 測試其讀取速度.

Lmbech 測試記憶體延遲http:///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).

LMbench streamhttp:///98356
John McCalpin’s stream benchmark

Disk
以前用過 dd , hdparm 或是 Iometer 來測試 Disk I/O 的是速度,但 dd, hdparm 太過簡單,Iometer 太過老舊 ,目前比較多人使用的是 Fio 這一支測試工具.

Network

  • Iometerhttp:///94270
    利用 IOMeter 來測試網路效能,使用方式基本上跟 IOmeter 測試 Disk 一樣.
  • iperfhttp:///462
    免費最簡單的網路效能測試工具.
  • qperfhttp:///486
    RHEL6 預設的網路效能測試工具.
  • IxChariothttp:///470
    專業級的網路效能測試工具, IXIA 系列的產品 IxAutomate , IxExplorer , IxLoad.
  • Pktgenhttp:///93300
    Packet-Generation 它是一個 Linux 核心的模組,它可以以非常快的速度產生封包.
  • smartbitshttp:///638
  • TestCenterhttp:///633
    Smartbits (1G) / TestCenter (10G)是一套專門用來檢視網路設備的硬體檢測裝置,是由 SPIRENT 這一家公司所提供主要可以用來檢視網卡或是 switch 等網路裝置.

如果透過這些工具測試出來,發現效能不好該怎麼辦,這時候可以參考 Network 效能測試與調整 – http:///93408

系統效能 (Performance)

Web Server
在架站之後,想要了解一下你的 http service (Apache) 的效能,這時候可以使用 web server 相關的效能測試程式.

  • ab (ApacheBench)http:///94140
    Apache 內建的效能測試程式 – ab (Apache HTTP Server Benchmarking Tool)

加解密演算法

  • openssl speedhttp:///94131
    透過 SSL 的加解密演算法來看你系統的效能 (CPU 與 memory 效能測試)

資料庫的效能評比

  • Sysbench oltphttp:///95251
    SysBench 裡面有一個測試項目就是針對資料庫的 oltp (Online transaction processing,線上交易處理) .
  • Sysbech + MariaDB Galera Cluster + HAProxyhttp:///95724
    利用 MariaDB Galera Cluster , HAProxy 的架構來進行 Sysbech OLTP 測試.

雲端效能評比

  • TBD

其他待評估

  • Phoronix Test Suite + OpenBenchmarking
  • Intel® BITT
  • Bonnie++
  • BurnInTest
  • Iozone
  • stress-ng
  • Intel PTU
  • Turbostat
  • LinPack Benchmark
  • ib_read_bw(InfiniBand read bandwidth)
  • ib_write_bw(InfiniBand write bandwidth)
  • SPEC CPU2006
  • SPECjbb benchmark
  • SPEC power_ssj2008
  • VDBench
  • diskspd(Windows)
  • ATTO Disk Benchmark
  • Intel® Memory Latency Checker
  • stream memory benchmark
  • java performance testing tools
  • httperf
  • weighttp
  • httpress
  • siege
  • Apache JMeter
  • tourbus
  • nttcp
  • netperf
  • vdbench
  • Finisar Medusa Test Tool
  • TPC Benchmark™ E (TPC-E) – is a new On-Line Transaction Processing (OLTP) workload
  • The TPC Benchmark™H (TPC-H) – is a decision support benchmark
  • Google perfkit benchmarker – Perfkit Benchmarker contains set of benchmarks to measure and compare cloud offerings.
  • COSBench – Cloud Object Storage Benchmark
  • IBM – Rational Performance Tester
  • HP – Loadrunner
  • SPECjEnterprise2010 – SPECjEnterprise is an end-to-end benchmark which allows performance measurement and characterization of Java EE 5 servers and supporting infrastructure such as JVM, Database, CPU, disk and servers.

相關

Linux - SysBench

Linux - SysBench

Linux 下常見的壓力測試工具不多,而且通常很分散,要不然就是協力廠商所開發的工具需收費而且所費不…

2013-11-28

在「CPU」中

Linux command - Stressful Application Test

測試環境為 Ubuntu16.04 64bits Stressful Application Tes…

2017-03-03

在「CPU」中

測試自己

這幾年工作下來,我到底會什麼??為自己列一個清單. 你可簡單講解一下硬體架構與各 I/O單元. 這一…

2016-05-05

在「Linux」中

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多