服务器性能测试

简介:

#!/bin/bash

logfile=/tmp/streelog.log

echo "stress -c 4 -i 4 --verbose --timeout 1m" >> logfile

stress -c 4 -i 4 --verbose --timeout 1m & >> $logfile

sleep 30

top -b -n 1 | head -n 15 >> $logfile

vmstat 2 1 >> $logfile

sleep 20

top -b -n 1 | head -n 15 >> $logfile

vmstat 2 1 >> $logfile


echo "" >> $logfile

/opt/soft/memtester-4.3.0/memtester 1G 1 >> $logfile


echo "" >> $logfile

echo "fio --filename=/tmp/mytest.txt --direct=1 --iodepth 1 --thread --rw=randread --ioengine=psync --bs=4k --size=2G --numjobs=10 --runtime=100 --group_reporting --name=mytest" >> $logfile

fio --filename=/tmp/mytest.txt --direct=1 --iodepth 1 --thread --rw=randread --ioengine=psync --bs=4k --size=2G --numjobs=10 --runtime=100 --group_reporting --name=mytest >> $logfile


echo "fio --filename=/tmp/mytest.txt --direct=1 --iodepth 1 --thread --rw=read --ioengine=psync --bs=4k --size=2G --numjobs=10 --runtime=100 --group_reporting --name=mytest" >>$logfile

fio --filename=/tmp/mytest.txt --direct=1 --iodepth 1 --thread --rw=read --ioengine=psync --bs=4k --size=2G --numjobs=10 --runtime=100 --group_reporting --name=mytest >> $logfile


echo "fio --filename=/tmp/mytest.txt --direct=1 --iodepth 1 --thread --rw=randwrite --ioengine=psync --bs=4k --size=2G --numjobs=10 --runtime=100 --group_reporting --name=mytest" >>$logfile

fio --filename=/tmp/mytest.txt --direct=1 --iodepth 1 --thread --rw=randwrite --ioengine=psync --bs=4k --size=2G --numjobs=10 --runtime=100 --group_reporting --name=mytest >>$logfile


echo "fio --filename=/tmp/mytest.txt --direct=1 --iodepth 1 --thread --rw=write --ioengine=psync --bs=4k --size=2G --numjobs=10 --runtime=100 --group_reporting --name=mytest" >>$logfile

fio --filename=/tmp/mytest.txt --direct=1 --iodepth 1 --thread --rw=write --ioengine=psync --bs=4k --size=2G --numjobs=10 --runtime=100 --group_reporting --name=mytest >>$logfile


echo "fio --filename=/tmp/mytest.txt --direct=1 --iodepth 1 --thread --rw=randrw --rwmixread=70 --ioengine=psync --bs=4k --size=2G --numjobs=10 --runtime=100 --group_reporting --name=mytest --ioscheduler=noop" >>$logfile

fio --filename=/tmp/mytest.txt --direct=1 --iodepth 1 --thread --rw=randrw --rwmixread=70 --ioengine=psync --bs=4k --size=2G --numjobs=10 --runtime=100 --group_reporting --name=mytest --ioscheduler=noop >> $logfile


本文转自 emma_cql 51CTO博客,原文链接:http://blog.51cto.com/chenql/1954898
相关实践学习
通过性能测试PTS对云服务器ECS进行规格选择与性能压测
本文为您介绍如何利用性能测试PTS对云服务器ECS进行规格选择与性能压测。
相关文章
|
6天前
|
网络协议 安全 测试技术
手撕测试tcp服务器效率工具——以epoll和io_uring对比为例
手撕测试tcp服务器效率工具——以epoll和io_uring对比为例
53 2
|
6天前
|
NoSQL 关系型数据库 MySQL
涉及rocketMQ,jemeter等性能测试服务器的安装记录
涉及rocketMQ,jemeter等性能测试服务器的安装记录
22 1
|
6天前
|
JSON 应用服务中间件 Linux
skywalking内部测试服务器安装记录
skywalking内部测试服务器安装记录
14 0
|
6天前
|
监控 测试技术 Apache
如何测试服务器性能?
通过以上步骤,您可以全面评估服务器的性能,找出潜在问题,并采取措施来提高服务器的性能和稳定性。这对于确保服务器在实际生产环境中能够高效运行非常重要。
23 1
|
6天前
|
弹性计算 运维 监控
|
6天前
|
弹性计算 分布式计算 DataWorks
DataWorks报错问题之ecs自建数据库连通性测试报错如何解决
DataWorks是阿里云提供的一站式大数据开发与管理平台,支持数据集成、数据开发、数据治理等功能;在本汇总中,我们梳理了DataWorks产品在使用过程中经常遇到的问题及解答,以助用户在数据处理和分析工作中提高效率,降低难度。
|
6天前
|
弹性计算 缓存 测试技术
阿里云2核4g服务器(费用价格/性能测试/支持人数)
阿里云2核4g服务器能支持多少人访问?2核4G服务器并发数性能测试,阿小云账号下的2核4G服务器支持20人同时在线访问,然而应用不同、类型不同、程序效率不同实际并发数也不同,2核4G服务器的在线访问人数取决于多个变量因素
|
6天前
|
弹性计算 缓存 测试技术
2核4g服务器能支持多少人访问?阿里云2核4G服务器并发数测试
2核4g服务器能支持多少人访问?阿里云2核4G服务器并发数测试,2核4G服务器并发数性能测试,阿小云账号下的2核4G服务器支持20人同时在线访问,然而应用不同、类型不同、程序效率不同实际并发数也不同,2核4G服务器的在线访问人数取决于多个变量因素
|
6天前
|
存储 负载均衡 监控
epoll服务器百万并发测试
epoll服务器百万并发测试
32 1
|
6天前
|
弹性计算 数据中心
阿里云香港服务器详细介绍_BGP多线精品测试_CN2高速网络
阿里云香港服务器中国香港数据中心网络线路类型BGP多线精品,中国电信CN2高速网络高质量、大规格BGP带宽,运营商精品公网直连中国内地,时延更低,优化海外回中国内地流量的公网线路,可以提高国际业务访问质量。阿里云百科来详细介绍阿里云香港云服务器

热门文章

最新文章