Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Stress server testing tool

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Stress stress testing tool in order to test the load of the server, we recommend Stress as a stress testing tool. Stress is a tool for generating Cpu/Memory/IO/Disk load on Posix systems. Project address: http://weather.ou.edu/~apw/prostress installation: centos7:# enable tripartite source $rpm-ivh http://apt.sw.be/redhat/el7/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm# installation Stress$ yum install stresscentos6:# enable tripartite source $yum install epel-release# installation Stress$ yum install stressstress parameter description: Usage: stress [OPTION [ARG]]. -? -- help show this help statement-- version show version statement-v,-- verbose be verbose-Q,-- quiet be quiet-n,-- dry-run show what would have been done-t,-- timeout N timeout after N seconds-- backoff N wait factor of N microseconds before work starts-c,-- cpu N spawn N workers spinning on sqrt ()-I -- io N spawn N workers spinning on sync ()-m,-- vm N spawn N workers spinning on malloc () / free ()-- vm-bytes B malloc B bytes per vm worker (default is 256MB)-- vm-stride B touch a byte every B bytes (default is 4096)-- vm-hang N sleep N secs before free (default is none, 0 is inf)-vm-keep redirty memory instead of freeing and reallocating-d -- hdd N spawn N workers spinning on write () / unlink ()-- hdd-bytes B write B bytes per hdd worker (default is 1GB)-- hdd-noclean do not unlink files created by hdd workersExample: stress-- cpu 8-- io 4-- vm 2-- vm-bytes 128m-- timeout 10sMurray? Display help information-v display version number-Q does not show run information-NLRIMARALLYMAY run shows the execution of completed instructions-t-- timeout N specifies to run for N seconds and then stops-backoff N waits for N subtleties to start running-c-cpu generates n processes each process repeatedly calculates the square root of random numbers-I-io generates n processes each process repeatedly calls sync () Sync () is used to write the contents of memory to the hard disk-m-- vm n produces n processes, each process constantly calling the memory allocation malloc and memory release free functions-vm-bytes B specifies the number of bytes of memory when malloc (default 256MB)-vm-hang N indicates that each memory-consuming process goes to sleep after being allocated to memory, as opposed to the normal process of unlimited allocation and memory release This helps to simulate a machine with only a small amount of memory-- d-- hadd n produces n processes executing write and unlink functions-- hadd-bytes B specifies the number of bytes to write, default is 1GB-- hadd-noclean do not write random ASCII data to the file Unlink time unit can be seconds s, minutes m, hour h, day d, year y The unit of file size can be KGStress use example: generate 13 cpu processes, 4 io processes, then stop running $stress-c 13-I 4-- verbose-- timeout 1m generate 3 cpu processes, 3 io processes, 2 10m malloc () / free () processes, and the bytes of malloc in the vm process do not release $stress-cpu 3-io 3-vm 2-vm-bytes 10000000-vm-keep-verbose test hard disk Through mkstemp () to generate 800K size files to write to the hard disk, the use of CPU, memory requirements are very low $stress-D1-- hdd-noclean-- hdd-bytes 800k produces 13 processes, each process repeatedly calculates the square root of random numbers generated by rand () $stress-c 13 produces 1024 processes, only displays the error message $stress-- quiet-- cpu 1k produces 4 processes, each process repeatedly calls sync () Sync () is used to write the contents of memory to the hard disk $stress-I 4 to write a fixed-size file to the disk. This file is generated by calling mkstemp () and saved in the current directory. By default, the unlink operation is performed after the file is generated, but you can use the-- hdd-bytes option to save all the resulting files in the current directory. This will gradually deplete your disk space # generate small files $stress-d 1-- hdd-noclean-- hdd-bytes 1 generate large files $stress-d 1-- hdd-noclean-- hdd-bytes 3G reference documentation http://www.google.comhttp://my.oschina.net/guol/blog/700571http://www.cnblogs.com/javaee6/p/4642744.html

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report