Linux服务器怎么进行性能测试
发表于:2025-02-22 作者:千家信息网编辑
千家信息网最后更新 2025年02月22日,今天小编给大家分享一下Linux服务器怎么进行性能测试的相关知识点,内容详细,逻辑清晰,相信大部分人都还太了解这方面的知识,所以分享这篇文章给大家参考一下,希望大家阅读完这篇文章后有所收获,下面我们一
千家信息网最后更新 2025年02月22日Linux服务器怎么进行性能测试
今天小编给大家分享一下Linux服务器怎么进行性能测试的相关知识点,内容详细,逻辑清晰,相信大部分人都还太了解这方面的知识,所以分享这篇文章给大家参考一下,希望大家阅读完这篇文章后有所收获,下面我们一起来了解一下吧。
1、Install sysbench
yum -y install sysbench
check it
man sysbench
2、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
3、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)
*1*|4**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服务器怎么进行性能测试"这篇文章的所有内容,感谢各位的阅读!相信大家阅读完这篇文章都有很大的收获,小编每天都会为大家更新不同的知识,如果还想学习更多的知识,请关注行业资讯频道。
性能
测试
结果
知识
篇文章
运行
服务器
进行性
能测
服务
内容
数据
不同
很大
大部分
就是
文件
更多
知识点
行业
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
羚羊网络技术服务有限公司
外聘软件开发
鞍山货币量化交易软件开发费用
广东妞酷网络技术有限公司
超密集网络技术简介
数据库本机服务器
手机app软件开发官网
软件开发什么好书
国家网络安全征文700
沈阳app软件开发招聘信息
连接数据库有哪些软件
计算机网络安全评估内容
群晖作为打印服务器
智慧互联网络技术专业
网络安全内容英文
不安全网站连接服务器失败
常用的数据库软件
华为网络安全认证书籍
服务器连接网络慢怎么办
网络安全大课堂活动体会
大连企业软件开发
浦东新区咨询软件开发机构整顿
达梦数据库读取BIT类型
qcon全球软件开发
成功处置一起网络安全事件
网络安全心得体会5000字
数据库查询考点
长沙法度互联网科技有限公司招聘
维护网络安全建言献策
天龙八部最早公测服务器