網(wǎng)上有很多關(guān)于pos機(jī)清理內(nèi)存,磁盤IO性能如何壓測(cè)的知識(shí),也有很多人為大家解答關(guān)于pos機(jī)清理內(nèi)存的問(wèn)題,今天pos機(jī)之家(www.afbey.com)為大家整理了關(guān)于這方面的知識(shí),讓我們一起來(lái)看下吧!
本文目錄一覽:
pos機(jī)清理內(nèi)存
介紹SysBench 是一款開(kāi)源的、跨平臺(tái)的、模塊化的、多線程的性能測(cè)試工具, 可以執(zhí)行 CPU/內(nèi)存/線程/IO/數(shù)據(jù)庫(kù) 等方面的性能測(cè)試. 用于評(píng)估操作系統(tǒng)的性能參數(shù).* oltp_*.lua: a collection 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主要包含如下幾種測(cè)試安裝 sysbenchyum -y install sysbench一 、CPU性能測(cè)試 (cpu測(cè)試主要是進(jìn)行素?cái)?shù)的加法運(yùn)算)幫助命令 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] 最大質(zhì)數(shù)發(fā)生器數(shù)量。默認(rèn)是10000測(cè)試命令 sysbench cpu --cpu-max-prime=20000 --threads=2 run二、內(nèi)存分配及傳輸速度幫助命令 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]測(cè)試命令 sysbench memory --memory-block-size=8k --memory-total-size=2G run三、磁盤IO性能測(cè)試幫助命令 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 operations 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 requests if possible (0 - don\'t merge) [0] --file-rw-ratio=N reads/writes ratio for combined test [1.5]測(cè)試命令1、prepare階段,生成需要的測(cè)試文件,完成后會(huì)在當(dāng)前目錄下生成很多小文件
sysbench fileio --threads=2 --file-total-size=1G --file-test-mode=rndrw prepare2、run階段
sysbench fileio --threads=2 --file-total-size=1G --file-test-mode=rndrw run3、清理測(cè)試時(shí)生成的文件
sysbench fileio --threads=2 --file-total-size=1G --file-test-mode=rndrw cleanup四、 mutex性能測(cè)試幫助命令 sysbench mutex help
mutex options: --mutex-num=N total size of mutex array [4096] 數(shù)組互斥的總大小 --mutex-locks=N number of mutex locks to do per thread [50000] 每個(gè)線程互斥鎖的數(shù)量 --mutex-loops=N number of empty loops to do outside mutex lock [10000] 內(nèi)部互斥鎖的空循環(huán)數(shù)量命令測(cè)試 sysbench mutex --threads=2 --mutex-num=4096 --mutex-locks=50000 --mutex-loops=10000 run五、POSXI線程性能幫助測(cè)試 sysbench threads help
threads options: --thread-yields=N number of yields to do per request [1000] 每個(gè)請(qǐng)求產(chǎn)生多少個(gè)線程。 --thread-locks=N number of locks per thread [8] 每個(gè)線程的鎖的數(shù)量命令測(cè)試 sysbench threads --threads=2 --thread-yields=100 --thread-locks=4 run六、數(shù)據(jù)庫(kù)性能(OLTP基準(zhǔn)測(cè)試)
待定后續(xù)~
官方文檔:https://github.com/akopytov/sysbench愛(ài)運(yùn)維、愛(ài)分享,感興趣請(qǐng)幫關(guān)注或轉(zhuǎn)發(fā)~~
以上就是關(guān)于pos機(jī)清理內(nèi)存,磁盤IO性能如何壓測(cè)的知識(shí),后面我們會(huì)繼續(xù)為大家整理關(guān)于pos機(jī)清理內(nèi)存的知識(shí),希望能夠幫助到大家!
