码迷,mamicode.com
首页 > 其他好文 > 详细

服务器性能测试

时间:2017-08-09 23:36:44      阅读:105      评论:0      收藏:0      [点我收藏+]

标签:压测   性能测试   

#!/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


本文出自 “一直在路上” 博客,请务必保留此出处http://chenql.blog.51cto.com/8732050/1954898

服务器性能测试

标签:压测   性能测试   

原文地址:http://chenql.blog.51cto.com/8732050/1954898

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!