Linux 服务器性能测试报告

我们使用linux 工具sysbench 来测试linux服务器性能,目前在Centos上进行操作

Install sysbench

yum -y install sysbench

check it

man sysbench

CPU Benchmark(运行性能)

测试CPU运行性能

sysbench --test=cpu --cpu-max-prime=20000 run

测试结果

$ sysbench --test=cpu --cpu-max-prime=20000 run
sysbench 0.4.12: multi-threaded system evaluation benchmark
Running the test with following options:
Number of threads: 1
Doing CPU performance benchmark
Threads started!
Done.
Maximum prime number checked in CPU test: 20000 Test execution summary:
total time: 23.5990s
total number of events: 10000
total time taken by event execution: 23.5983
per-request statistics:
min: 2.34ms
avg: 2.36ms
max: 5.32ms
approx. 95 percentile: 2.41ms
Threads fairness:
events (avg/stddev): 10000.0000/0.00
execution time (avg/stddev): 23.5983/0.00

记录数据 total time taken by event execution: 23.5983

Memory Benchmark(运行性能)

测试读性能

sysbench --test=memory --memory-block-size=1K --memory-scope=global --memory-total-size=100G --memory-oper=read run

测试结果

$ sysbench --test=memory --memory-block-size=1K --memory-scope=global --memory-total-size=100G --memory-oper=read run
sysbench 0.4.12: multi-threaded system evaluation benchmark Running the test with following options:
Number of threads: 1 Doing memory operations speed test
Memory block size: 1K Memory transfer size: 102400M Memory operations type: read
Memory scope type: global
Threads started!
Done. Operations performed: 104857600 (6045253.78 ops/sec) 102400.00 MB transferred (5903.57 MB/sec) Test execution summary:
total time: 17.3454s
total number of events: 104857600
total time taken by event execution: 12.1786
per-request statistics:
min: 0.00ms
avg: 0.00ms
max: 0.06ms
approx. 95 percentile: 0.00ms Threads fairness:
events (avg/stddev): 104857600.0000/0.00
execution time (avg/stddev): 12.1786/0.00

记录数据 102400.00 MB transferred (5903.57 MB/sec)

测试写性能

sysbench --test=memory --memory-block-size=1K --memory-scope=global --memory-total-size=100G --memory-oper=write run

测试结果

$ sysbench --test=memory --memory-block-size=1K --memory-scope=global --memory-total-size=100G --memory-oper=write run
sysbench 0.4.12: multi-threaded system evaluation benchmark Running the test with following options:
Number of threads: 1 Doing memory operations speed test
Memory block size: 1K Memory transfer size: 102400M Memory operations type: write
Memory scope type: global
Threads started!
Done. Operations performed: 104857600 (4056443.11 ops/sec) 102400.00 MB transferred (3961.37 MB/sec) Test execution summary:
total time: 25.8496s
total number of events: 104857600
total time taken by event execution: 20.6986
per-request statistics:
min: 0.00ms
avg: 0.00ms
max: 0.08ms
approx. 95 percentile: 0.00ms Threads fairness:
events (avg/stddev): 104857600.0000/0.00
execution time (avg/stddev): 20.6986/0.00

记录结果

102400.00 MB transferred (3961.37 MB/sec)

IO Benchmark(运行性能)

创建文件

sysbench --test=fileio --file-total-size=1G prepare

$ sysbench --test=fileio --file-total-size=1G prepare
sysbench 0.4.12: multi-threaded system evaluation benchmark 128 files, 8192Kb each, 1024Mb total
Creating files for the test...

测试读写性能

sysbench --test=fileio --file-total-size=1G --file-test-mode=rndrw --init-rng=on --max-time=300 --max-requests=0 run

$ sysbench --test=fileio --file-total-size=1G --file-test-mode=rndrw --init-rng=on --max-time=300 --max-requests=0 run
sysbench 0.4.12: multi-threaded system evaluation benchmark Running the test with following options:
Number of threads: 1
Initializing random number generator from timer. Extra file open flags: 0
128 files, 8Mb each
1Gb total file size
Block size 16Kb
Number of random requests for random IO: 0
Read/Write ratio for combined random IO test: 1.50
Periodic FSYNC enabled, calling fsync() each 100 requests.
Calling fsync() at the end of test, Enabled.
Using synchronous I/O mode
Doing random r/w test
Threads started!
Time limit exceeded, exiting...
Done. Operations performed: 33000 Read, 22000 Write, 70340 Other = 125340 Total
Read 515.62Mb Written 343.75Mb Total transferred 859.38Mb (2.8644Mb/sec)
183.32 Requests/sec executed Test execution summary:
total time: 300.0153s
total number of events: 55000
total time taken by event execution: 0.4013
per-request statistics:
min: 0.00ms
avg: 0.01ms
max: 0.10ms
approx. 95 percentile: 0.01ms Threads fairness:
events (avg/stddev): 55000.0000/0.00
execution time (avg/stddev): 0.4013/0.00

记录结果

Read 515.62Mb Written 343.75Mb Total transferred 859.38Mb (2.8644Mb/sec)

Linux 服务器性能测试报告-sysbench命令实践的更多相关文章

  1. 用十条命令在一分钟内检查Linux服务器性能

    转自:http://www.infoq.com/cn/news/2015/12/linux-performance 如果你的Linux服务器突然负载暴增,告警短信快发爆你的手机,如何在最短时间内找出L ...

  2. 1分钟内检查Linux服务器性能的10条命令

    如果你的Linux服务器突然负载暴增,告警短信快发爆你的手机,如何在最短时间内找出Linux性能问题所在?Netflix性能工程团队的Brendan Gregg写下了这篇博文,来看他们是怎样通过十条命 ...

  3. 如何用十条命令在一分钟内检查Linux服务器性能

    “如果你的Linux服务器突然负载暴增,报警短信快发爆你的手机,如何在最短时间内找出Linux性能问题所在?来看Netflix性能工程团队的这篇博文,看它们通过十条命令在一分钟内对机器性能问题进行诊断 ...

  4. 用十条命令在一分钟内检查 Linux 服务器性能

    原文地址: http://www.oschina.net/news/69132/linux-performance 如果你的Linux服务器突然负载暴增,告警短信快发爆你的手机,如何在最短时间内找出L ...

  5. 检查Linux服务器性能的关键十条命令

    检查Linux服务器性能的关键十条命令 概述 通过执行以下命令,可以在1分钟内对系统资源使用情况有个大致的了解. uptime dmesg | tail vmstat 1 mpstat -P ALL ...

  6. 转:用十条命令在一分钟内检查Linux服务器性能

    转自:http://www.infoq.com/cn/news/2015/12/linux-performance?utm_campaign=rightbar_v2&utm_source=in ...

  7. [转帖]如何用十条命令在一分钟内检查 Linux 服务器性能

    如何用十条命令在一分钟内检查 Linux 服务器性能 时间:2016-09-28   作者:admin 分类:新手入门 阅读:246次 http://embeddedlinux.org.cn/emb- ...

  8. 检查Linux服务器性能

    如果你的Linux服务器突然负载暴增,告警短信快发爆你的手机,如何在最短时间内找出Linux性能问题所在? 概述通过执行以下命令,可以在1分钟内对系统资源使用情况有个大致的了解. • uptime• ...

  9. [转载]Linux服务器性能评估与优化

    转载自:Linux服务器性能评估与优化 一.影响Linux服务器性能的因素 1. 操作系统级 CPU 内存 磁盘I/O带宽 网络I/O带宽 2.        程序应用级 二.系统性能评估标准 影响性 ...

随机推荐

  1. Emmet & VSCode

    Emmet & VSCode Emmet - the essential toolkit for web-developers https://emmet.io/ https://emmet. ...

  2. macOS 录屏 gif

    macOS 录屏 gif LICEcap bug 授权问题? 如何在 Mac 上录制屏幕 https://support.apple.com/zh-cn/HT208721 Command + Shif ...

  3. write a node cli tools, step by step

    write a node cli tools, step by step how to write a node cli tools node cli tools, step by step, nod ...

  4. ES2019 features & ES-Next

    ES2019 features & ES-Next https://github.com/tc39/proposals Object.fromEntries(), trimStart(), t ...

  5. C++算法代码——众数

    好久没更新了-- 题目来自:http://218.5.5.242:9018/JudgeOnline/problem.php?id=1615 题目描述 N 个 1 到 30000 间无序数正整数,其中 ...

  6. Mybatis-05 注解开发

    Mybatis-05 注解开发 注解开发 注解的核心是反射机制 面向接口编程的根本原因:解耦,可拓展,提高复用,分层开发中.上层不用管具体的实现,大家都遵守共同的标准,使得开发变得容易,规范性好. 1 ...

  7. oracle创建和删除序列

    创建序列语法: CREATE SEQUENCE 序列名 [START WITH n] [INCREMENT BY n] [{MINVALUE n}] [{MAXVALUE n|NOMAXVALUE}] ...

  8. # PyComCAD介绍及开发方法

    项目地址:https://github.com/JohnYang1210/PycomCAD 1.综述 ​ 提到Autocad在工业界的二次开发,VB或者Lisp可能作为常用的传统的编程语言.但是,Py ...

  9. 第39天学习打卡(多线程 Thread Runnable 初始并发问题 Callable )

    多线程详解 01线程简介 Process与Thread 程序:是指令和数据的有序集合,其本身没有任何运行的含义,是一个静态的概念. 进程则是执行程序的一次执行过程,它是一个动态的概念.是系统资源分配的 ...

  10. 一个基于 Vue3 的开源项目,3个月时间 star 终于破千!

    本文主要是对如何做开源项目的一些思考. 前文回顾: <Vue3 来了,Vue3 开源商城项目重构计划正式启动!> <一个基于 Vue 3 + Vant 3 的开源商城项目> 关 ...