stress-ng | ng upstream project git repository | Testing library
kandi X-RAY | stress-ng Summary
kandi X-RAY | stress-ng Summary
This is the stress-ng upstream project git repository. 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 various operating system kernel interfaces.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of stress-ng
stress-ng Key Features
stress-ng Examples and Code Snippets
Community Discussions
Trending Discussions on stress-ng
QUESTION
I need to stress memory to about 50% of system memory bandwidth capacity(say 3000MT/s is system memory bandwidth capacity).
is this the right command for it?
...ANSWER
Answered 2022-Feb-22 at 17:49You can exercise the memory bandwidth with the stress-ng memrate stressor, e.g.
QUESTION
I am trying to use AWS FIS to stress CPU on an ubuntu VM thru ssm send command (aws:ssm:send-command/AWSFIS-Run-CPU-Stress
).
When I ssh to the VM and use 'top' command I see the CPU shooting up successfully from 0.3% to 99.9% but surprisingly the FIS experiment ends up in 'failed' state with a tag:'Not authorized to perform the required action'.
Since the cpu definitely increased and I even see COMMAND name 'stress-ng-cpu' against the 99.9% cpu entry, any idea why it is still saying 'not authorized' and ending up in failed status?
Thanks.
...ANSWER
Answered 2022-Feb-14 at 11:21It worked after I completely removed mine and applied the permissions as shown here: https://chaos-engineering.workshop.aws/en/030_basic_content/030_basic_experiment/10-permissions.html
Posting this for the benefit of others who might run into similar issues.
QUESTION
I am trying to stress a ubuntu container's memory. Typing free in my command terminal provides the following result:
...ANSWER
Answered 2021-Sep-22 at 22:26stress-ng --vm-bytes 10%
will use sysconf(_SC_AVPHYS_PAGES)
to determine the available memory. This sysconf() system call will return the number of pages that the application can use without hindering any other process. So this is approximately what the free command is returning for the free memory statistic.
Note that stress-ng will allocate the memory with mmap, so it may be that during run time mmap'd pages may not necessarily be physically backed at the time you check how much real memory is being used.
It may be worth trying to also use the --vm-populate
option; this will try and ensure the pages are physically populated on the mmap'd memory that stress-ng is exercising. Also try --vm-madvise willneed
to use the madvise() system call to hint that the pages will be required fairly soon.
QUESTION
I stressed my system to see how it affects some program i wrote using stress-ng.
The program itself is a neural network, mainly composed of some nested loops doing some multiplication and using about 1G of RAM overall coded in C++.
I imposed some memory stress on the system using:
...ANSWER
Answered 2020-Aug-13 at 16:56It's important to remember that modern CPUs, especially those made by Intel, have variable clock frequencies. The CPU will run slowly when lightly loaded to conserve power, which extends battery life, but can ramp up under load.
The limiting factor is thermals, that is the CPU will only be allowed to get so hot before the frequency is trimmed to reduce power consumption, and by extension, heat generation.
On a chip with more than one core, a single core can be run very quickly without hitting thermal throttling. Two cores must run slower, they're producing effectively twice the heat, and when using all four cores each has to share a smaller slice of the overall thermal budget.
It's worth checking your CPU temperature as the tests are running as it will likely be hitting some kind of cap.
QUESTION
I'm currently doing some experiments, and I need to record all the events that are generated during the execution of normal stress-ng execution cyle like this /usr/bin/stress-ng -c 80 -t 30 --times --exec 50 --exec-ops 50
, specifically the ones related to exec (sched:sched_process_exec
and syscalls:sys_enter_execve
).
Unfortunately when analysing the trace file, I get some processes that didn't generated any sys_execve
, but were captured by the sched_process_exec
, which to me makes no sense.
This happened even though no events where lost (in the trace file the entries in buffer/written are the same, and trace-cmd doesn't warn about events lost).
Given this situation I can't understand why this happens, and the only explanation I can give is that these events are not being recorded. Any help would be appreciated.
Here's an example for reference of trace file I get
To be clear in what I'm saying, these lines should be the norm:
...ANSWER
Answered 2020-Jun-20 at 08:43I solved this problem by also capturing the event syscalls:sys_enter_execve
. Between the two of them I was able to get every instance of exec called.
QUESTION
I'm trying to get my kubernetes cluster to trigger a MemoryPressure state, for the purpose of testing, and I can't seem to get it to happen. Even when I'm getting the Warning "Out of Memory", running kubectl describe pod still shows MemoryPressure == false.
I did this by creating a deployment that is running containers that do: stress-ng -m 4 --vm-bytes 800M --vm-keep
And I keep scaling until I see Out of Memory -- but still no MemoryPressure flag!
I have tried this on KIND and Minikube with no success. Any ideas?
...ANSWER
Answered 2020-May-20 at 08:56MemoryPressure
is a node metrics. You could run the stress
command on the node directly to create an artificial memory pressure on the node. Kubelet will notice this(with a caveat) and should report that the node is under MemoryPressure
.
The caveat as per the doc is
The kubelet currently polls cAdvisor to collect memory usage stats at a regular interval. If memory usage increases within that window rapidly, the kubelet may not observe MemoryPressure fast enough, and the OOMKiller will still be invoked. We intend to integrate with the memcg notification API in a future release to reduce this latency, and instead have the kernel tell us when a threshold has been crossed immediately
QUESTION
I am using stress-ng docker image from https://hub.docker.com/r/polinux/stress-ng/dockerfile to stress my system. I want to use perf tool to monitor metrics.
perf stat -- stress-ng --cpu 2 --timeout 10
runs stress-ng for 10 seconds and returns performance metrics. I tried to do the same with the docker image by using perf stat -- docker run -ti --rm polinux/stress-ng --cpu 2 --timeout 10
. This returns metrics but not the metrics of stress-ng.
The output I got when using 'perf stat' on stress-ng:
...ANSWER
Answered 2020-May-03 at 13:02Carrying on from comments by @osgx,
As is mentioned here, by default, the perf stat
command will monitor not only all the threads of the process to be monitored, but also its child processes and threads.
The problem in this situation is that by running perf stat
and monitoring the docker run stress-ng
command, you are not monitoring the actual stress-ng
process. It is important to note that, the processes running as part of the container, will actually not be started by the docker
client, but rather by the docker-containerd-shim
process (which is a grandchild process of the dockerd
process).
If you run the docker command to run stress-ng
inside the container and observe the process-tree, it becomes evident.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install stress-ng
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page