process-scaler

command module
v0.0.0-...-f9cff6a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2024 License: GPL-3.0 Imports: 18 Imported by: 0

README

Process scaler

Description

A program that starts a process and limits its resource usage during its execution.
The process is limited so that resources are used at a 90% rate. A 10% margin is left so that other processes can expand their resource usage if needed, without affecting their performance.
The readjustment of the resource limits is done every second.

Requirements

  • Linux system
  • cgroups v2
  • dd, hdparm, lsblk, mount, rm, sync, umount commands

Usage

sudo ./process_scaler <program> <args>

Resources supported

Resources that are limited:

  • CPU usage
  • Memory usage
  • (WIP)

Usefulness

A major use case for this program is in the case you buy a whole server (you don't pay for what you use) but you only use a small part of it.
What you can do is for example run a cryptocurrency miner to use the remaining resources. The problem is that the miner will use all the resources it can get, and the main process will probably be slowed down.
This program solves this problem by limiting the resources of the miner to a certain percentage (keeps 10% of free resources), so that the main process can run without performance issues.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL