Code Monkey home page Code Monkey logo

spammer's Introduction

spammer

Small program that fills the available RAM with garbage and creates an many threads as CPU cores are available in the system to compute a dummy and infinite task (the prime numbers) if no params are passed.

Example of spammer

Usage

If you are using this program from CLI, the usage is as follows if you do not wish to employ all the resources of the target machine: spammer <max_mem> <percentage_memory> <num_threads> <log_level>

In case you are executing this program from podman or docker, then you shall use some environment variables

podman run -e MAX_MEM=<max_mem> -e PER_MEM=<percentage_memory> -e NUM_THREADS=<num_threads> -e LOG_LEVEL=<log_level> localhost/spammer:latest

  • max_mem: Upper limite for maximum memory to be allocated with garbage expressed on MB
  • percentage_memory: How much of the memory is really allocated expressed on %
  • num_threads: number of CPU threads created. Integer value
  • log_level: By default it is in info level. This might impact on performance due to lock/unlock

Example of use: ./spammer 500 70 8 2

This example will allocate 500 MB at 70%, 8 CPU threads and INFO_LEVEL for logs.

spammer's People

Contributors

cdonatom avatar clwheel avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

clwheel

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.