Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> 電腦軟體教學 >> 伺服器技術 >> 關於伺服器

VPS 效能基準測試:UnixBench 一鍵腳本完整使用指南

編輯:關於伺服器

工具簡介

UnixBench 是 Linux 平台經典的單核/多核效能基準測試套件,涵蓋整數/浮點運算、檔案 I/O、程序建立、Shell 腳本、系統呼叫等 10 項測試,輸出綜合分數(Index Score)供跨平台比較。

一鍵執行腳本

wget https://www.CTOHome.com/linux-vps-pack/unixbench.sh; sh ./unixbench.sh
  • 自動下載、編譯、執行完整測試套件
  • 耗時 5-10 分鐘(視 CPU/IO 效能而定)
  • 無需手動編譯、安裝依賴套件

測試結果範例解讀

BYTE UNIX Benchmarks (Version 4.1-wht.2)
System: Linux vps59.ctohome.com 2.6.18... i686 GNU/Linux

TEST                              BASELINE    RESULT      INDEX
Dhrystone 2 (register vars)      376783.7   16303866.8   432.7
Double-Precision Whetstone           83.1      1299.8    156.4
Execl Throughput                    188.3      7725.8    410.3
File Copy 1024 bufsize 2000        2672.0    165150.0    618.1
File Copy 256 bufsize 500          1077.0     55402.0    514.4
File Read 4096 bufsize 8000       15382.0   1577261.0   1025.4
Pipe-based Context Switching      15448.6    600615.4    388.8
Pipe Throughput                  111814.6   2184246.1    195.3
Process Creation                    569.3     22116.2    388.5
Shell Scripts (8 concurrent)         44.8      1213.8    270.9
System Call Overhead              114433.5   1758851.2    153.7
                                                                    ========
FINAL SCORE                                                            354.5

分數參考標準

分數區間等級典型配置
< 100低效能舊款 P4 單核、嚴重超售 VPS
100 - 300入門/中階雙核/四核共享核心、標準 VPS
300 - 600高效能獨立核心、NVMe 儲存、輕度超售
> 600頂級獨享 CPU、全閃存陣列、專用主機

重要提醒

  • VPS 為共享資源:分數反映「當下可用算力」,不代表獨佔效能
  • 跑分期間請勿執行其他高負載任務,避免干擾
  • 建議多次測試取中位數,單次結果波動可能達 10-15%
  • 僅作為相對參考,實際應用效能仍取決於具體工作負載(Web、DB、編碼等)

進階用法

# 僅跑單核測試
./Run -c 1

# 指定測試項目
./Run dhry2reg whetstone-double execl

# 多核測試(N 為核心數)
./Run -c N
Copyright © Windows教程網 All Rights Reserved