<small id='O6Mb'></small> <noframes id='QlGHsxcw07'>

  • <tfoot id='530G'></tfoot>

      <legend id='cs3H7Jrh'><style id='l9a4'><dir id='7j06XO'><q id='REc7rpiLQ'></q></dir></style></legend>
      <i id='N9whsaUA'><tr id='KhnG76l0Cx'><dt id='W4AbFDQgx'><q id='9gfhA7o'><span id='xZaYpgVD9R'><b id='OuvmATG7k'><form id='2Ub7'><ins id='0aA1R'></ins><ul id='TQm32Ba6'></ul><sub id='PL1l'></sub></form><legend id='nx2bsmj'></legend><bdo id='kRiTmQB4OK'><pre id='CnomONA'><center id='sGPMQIbi'></center></pre></bdo></b><th id='8fOcGn9'></th></span></q></dt></tr></i><div id='Y75olNJH'><tfoot id='oX7v'></tfoot><dl id='e2iCg8jvH'><fieldset id='xjsY'></fieldset></dl></div>

          <bdo id='hqTVUp'></bdo><ul id='bcsy'></ul>

          1. <li id='9for'></li>
            登陆

            CPU、内存、磁盘IO性能如何压测?

            admin 2019-11-20 277人围观 ,发现0个评论

            介绍

            • SysBench 是一款开源的、跨渠道的、模块化的、多线程的功能测验东西, 能够履行 CPU/内存/线程/IO/数据库 等方面的功能测验. 用于评价操作系统的功能参数.
            * oltp_*.lua: a collection CPU、内存、磁盘IO性能如何压测?of OLTP-like database benchmarks
            * fileio: a filesystem-level benchmark
            * cpu: a simple CPU benchmark
            * memory: a memory access benchmark
            * threads: a thread-based scheduler benchmark
            * mutex: a POSIX mutex benchmark
            • 首要包括如下几种测验

            装置 sysbench

            • yum -y install sysbench

            一 、CPU功能测验 (cpu测验首要是进行素数的加法运算)

            • 协助指令 sysbench cpu help
            sysbench 1.0.17 (using system LuaJIT 2.0.4)
            cpu options:
            --cpu-max-prime=N upper limit for primes generator [10000] 最大质数发生器数量。默许是10000
            • 测验指令 sysbench cpu --cpu-max-prime=20000 --threads=2 run

            二、内存分配及传输速度

            • 协助指令 sysbench memory help
            sysbench 1.0.17 (using system LuaJIT 2.0.4)
            memory options:
            --memory-block-size=SIZE size of memory block for test [1K]
            --memory-total-size=SIZE total size of data to transfer [100G]
            --memory-scope=STRING memory access scope {global,local} [global]
            --memory-hugetlb[=on|off] allocate memory from HugeTLB pool [off]
            --memory-oper=STRING type of memory operations {read, write, none} [write]
            --memory-access-mode=STRING memory access mode {seq,rnd} [seq]
            • 测验指令 sysbench memory --memory-block-size=8k --memory-total-sizeCPU、内存、磁盘IO性能如何压测?=2G run

            三、磁盘IO功能测验

            • 协助指令 sysbench fileio help
            fileio options:
            --file-num=N number of files to create [128]
            --file-block-size=N block size to use in all IO operations [16384]
            --file-total-size=SIZE total size of files to create [2G]
            --file-test-mode=STRING test mode {seqwr, seqrewr, seqrd, rndrd, rndwr, rndrw}
            --file-io-mode=STRING file operatiCPU、内存、磁盘IO性能如何压测?ons mode {sync,async,mmap} [sync]
            --file-async-backlog=N number of asynchronous operatons to queue per thread [128]
            --file-extra-flags=[LIST,...] list of additional flags to use to open files {sync,dsync,direct} []
            --file-fsync-freq=N do fsync() after this number of requests (0 - don't use fsync()) [100]
            --file-fsync-all[=on|off] do fsync() after each write operation [off]
            --file-fsync-end[=on|off] do fsync() at the end of test [on]
            --file-fsync-mode=STRING which method to use for synchronization {fsync, fdatasync} [fsync]
            --file-merged-requests=N merge at most this number of IO requeCPU、内存、磁盘IO性能如何压测?sts if possible (0 - don't merge) [0]
            --file-rw-ratio=N reads/writes ratio for combined test [1.5]
            • 测验指令
            • 1、prepare阶段,生成需求的测验文件,完成后会在CPU、内存、磁盘IO性能如何压测?当时目录下生成许多小文件
            sysbench fileio --threads=2 --file-total-size=1G --file-test-mode=rndrw prepare

            • 2、run阶段
            sysbench fileio --threads=2 --file-total-size=1G --file-test-mode=rndrw run

            • 3、整理测验时生成的文件
            sysbench fileio --threads=2 --file-total-size=1G --file-test-mode=rndrw cleanup

            四、 mutex功能测验

            • 协助指令 sysbench mutex help
            mutex options:
            --mutex-num=N total size of mutex array [4096] 数组互斥的总巨细
            --mutex-locks=N number of mutex locks to do per thread [50000] 每个线程互斥锁的数量
            --mutex-loops=N number of empty loops to do outside mutex l赵丽颖合成ocCPU、内存、磁盘IO性能如何压测?k [10000] 内部互斥锁的空循环数量
            • 指令测验 sysbench mutex --threads=2 --mutex-num=4096 --mutex-locks=50000 --mutex-loops=10000 run

            五、POSXI线程功能

            • 协助测验 sysbench threads help
            threads options:
            --thread-yields=N number of yields to do per request [1000] 每个恳求发生多少个线程。
            --thread-locks=N number of locks per thread [8] 每个线程的锁的数量
            • 指令测验 sysbench threads --threads=2 --thread-yields=100 --thread-locks=4 run

            六、数据库功能(OLTP基准测验)

            待定后续~

            • 官方文档:https://github.com/akopytov/sysbench

            爱运维、爱共享,感兴趣请帮重视或转发~~

            请关注微信公众号
            微信二维码
            不容错过
            Powered By Z-BlogPHP