stress-ng | ng upstream project git repository | Testing library

 by   ColinIanKing C Version: V0.15.09 License: GPL-2.0

kandi X-RAY | stress-ng Summary

kandi X-RAY | stress-ng Summary

stress-ng is a C library typically used in Testing applications. stress-ng has no bugs, it has no vulnerabilities, it has a Strong Copyleft License and it has medium support. You can download it from GitHub.

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

            kandi-support Support

              stress-ng has a medium active ecosystem.
              It has 1014 star(s) with 213 fork(s). There are 30 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 2 open issues and 190 have been closed. On average issues are closed in 13 days. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of stress-ng is V0.15.09

            kandi-Quality Quality

              stress-ng has 0 bugs and 0 code smells.

            kandi-Security Security

              stress-ng has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              stress-ng code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              stress-ng is licensed under the GPL-2.0 License. This license is Strong Copyleft.
              Strong Copyleft licenses enforce sharing, and you can use them when creating open source projects.

            kandi-Reuse Reuse

              stress-ng releases are not available. You will need to build from source code and install.
              Installation instructions, examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of stress-ng
            Get all kandi verified functions for this library.

            stress-ng Key Features

            No Key Features are available at this moment for stress-ng.

            stress-ng Examples and Code Snippets

            No Code Snippets are available at this moment for stress-ng.

            Community Discussions

            QUESTION

            how to use stress-ng to stress memory
            Asked 2022-Feb-22 at 17:49

            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:49

            You can exercise the memory bandwidth with the stress-ng memrate stressor, e.g.

            Source https://stackoverflow.com/questions/71186333

            QUESTION

            AWS Fault Injection Simulator returning 'Not authorized to perform the required action.'
            Asked 2022-Feb-14 at 11:21

            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:21

            It 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.

            Source https://stackoverflow.com/questions/71108333

            QUESTION

            Stress-ng stress memory with specific percentage
            Asked 2021-Sep-22 at 22:26

            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:26

            stress-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.

            Source https://stackoverflow.com/questions/69075251

            QUESTION

            Slowing down CPU Frequency by imposing memory stress
            Asked 2020-Aug-15 at 22:28

            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:56

            It'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.

            Source https://stackoverflow.com/questions/63399456

            QUESTION

            How to capture all generated events with ftrace without any loss
            Asked 2020-Jun-20 at 08:43

            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:43

            I 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.

            Source https://stackoverflow.com/questions/62429333

            QUESTION

            How do I trigger a MemoryPressure state in Kubernetes
            Asked 2020-May-20 at 08:56

            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:56

            MemoryPressure 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

            Source https://stackoverflow.com/questions/61903893

            QUESTION

            How to use perf tool with docker running stress-ng?
            Asked 2020-May-03 at 13:02

            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:02

            Carrying 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.

            Source https://stackoverflow.com/questions/61456515

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install stress-ng

            The Ubuntu stress-ng reference guide contains a brief overview and worked examples.

            Support

            Send patches to colin.i.king@gmail.com or merge requests at https://github.com/ColinIanKing/stress-ng.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/ColinIanKing/stress-ng.git

          • CLI

            gh repo clone ColinIanKing/stress-ng

          • sshUrl

            git@github.com:ColinIanKing/stress-ng.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link