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

How to use the stress testing tool stress-ng under the Linux platform

2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains "how to use the stress testing tool stress-ng under the Linux platform". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to use the stress testing tool stress-ng under the Linux platform".

Installation is easy, under CentOS, you can install this tool through yum-y install stress-ng.

After the installation is successful, execute man stress-ng to view the tool's help information.

NAME stress-ng-a tool to load and stress a computer system stress-ng is a tool for stress testing of computer systems. Synopsis stress-ng [OPTION [ARG]]. Usage: stress-ng [OPTION [ARG]]... DESCRIPTION stress-ng will stress test a computer system in various selectable ways. It was designed to exercise various physical subsystems of a computer as well as the var- ious operating system kernel interfaces. Stress-ng also has a wide range of CPU specific stress tests that exercise floating point, integer, bit manipulation and control flow. Stress-ng was originally intended to make a machine work hard and trip hardware issues such as thermal overruns as well as operating system bugs that only occur when a system is being thrashed hard. Use stress-ng with caution as some of the tests can make a system run hot on poorly designed hardware and also can cause excessive system thrashing which may be difficult to stop. Stress-ng can also measure test throughput rates; this can be useful to observe performance changes across different operating system releases or types of hard- ware. However, it has never been intended to be used as a precise benchmark test suite, so do NOT use it in this manner. Running stress-ng with root privileges will adjust out of memory settings on Linux systems to make the stressors unkillable in low memory situations, so use this judiciously. With the appropriate privilege, stress-ng can allow the ionice class and ionice levels to be adjusted, again, this should be used with care. One can specify the number of processes to invoke per type of stress test; speci- fying a negative or zero value will select the number of processors available as defined by sysconf (_ SC_NPROCESSORS_CONF). Stress-ng provides an N-way to test the system. The tool can run various physical subsystems of the computer (such as CPU/ memory / network, etc.) and various OS kernel interfaces. Stress-ng has a large number of CPU stress testing methods, including testing floating point / integer / bit operations and control flow. The original purpose of stress-ng was to pressurize the machine and discover the bug of OS by overloading the system. It is important to note that stress-ng running on a poorly designed system may cause system downtime. Options General stress-ng control options:. For details, please refer to the stress-ng manual. Expands uses sample stress-ng-- vm 8-- vm-bytes 80%-t 1h run 8 virtual memory stressors that combined use 80% of the available mem- ory for 1 hour. Thus each stressor uses 10% of the available memory. Perform 8 virtual memory manometers, using a total of 80% of the available memory for a duration of 1 hour, each with about 10% of the available memory. Stress-ng-- cpu 4-- io 2-- vm 1-- vm-bytes 1G-- timeout 60s runs for 60 seconds with 4 cpu stressors, 2 io stressors and 1 vm stressor using 1GB of virtual memory. Stress-ng-- iomix 2-- iomix-bytes 10%-t 10m runs 2 instances of the mixed instances of the mixed O stressors using a total of 10% of the available file system space for 10 minutes. Each stressor will use 5% of the available file system space. Stress-ng-cpu 8-cpu-ops 800000 runs 8 cpu stressors and stops after 800000 bogo operations. Stress-ng-- sequential 2-- timeout 2m-- metrics run 2 simultaneous instances of all the stressors sequentially one by one, each for 2 minutes and summarise with performance metrics at the end. Stress-ng-cpu 4-cpu-method fft-cpu-ops 10000-metrics-brief run 4 FFT cpu stressors, stop after 10000 bogo operations and produce a summary just for the FFT results. Stress-ng-- cpu 0-- cpu-method all-t 1h run cpu stressors on all online CPUs working through all the available CPU stressors for 1 hour. Stress-ng-- all 4-- timeout 5m run 4 instances of all the stressors for 5 minutes. Stress-ng-random 64 run 64 stressors that are randomly chosen from all the available stressors. Stress-ng-- cpu 64-- cpu-method all-- verify-t 10m-- metrics-brief run 64 instances of all the different cpu stressors and verify that the computations are correct for 10 minutes with a bogo operations summary at the end. Stress-ng-- sequential 0-t 10m run all the stressors one by one for 10 minutes, with the number of instances of each stressor matching the number of online CPUs. Stress-ng-- sequential 8-- class io-t 5m-- times run all the stressors in the io class one by one for 5 minutes each, with 8 instances of each stressor running concurrently and show overall time util- isation statistics at the end of the run. Stress-ng-all 0-maximize-aggressive run all the stressors (1 instance of each per CPU) simultaneously, maximize the settings (memory sizes, file allocations, etc.) And select the most demanding/aggressive options. Stress-ng-random 32-x numa,hdd,key run 32 randomly selected stressors and exclude the numa,hdd and key stres- sors stress-ng-sequential 4-class vm-exclude bigheap,brk,stack run 4 instances of the VM stressors one after each other, excluding the bigheap Brk and stack stressors stress-ng-- taskset 0 run 2-3-- cpu 3 run 3 instances of the CPU stressor and pin them to CPUs 0 and 3. Thank you for reading, the above is the content of "how to use the stress testing tool stress-ng under the Linux platform". After the study of this article, I believe you have a deeper understanding of how to use the stress testing tool stress-ng under the Linux platform, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

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

Database

Wechat

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

12
Report