Skip to content

The system resource restriction utilities, one component of the SonmiHPC system.

Notifications You must be signed in to change notification settings

sonmihpc/tokamak

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tokamak

A straightforward tool that utilizes CGroup to regulate system users' resource usage, including CPU and memory. This tool finds application in scenarios like shared HPC cluster login nodes and multi-user servers.

Features

  • Support CGroup v1 and v2, auto detect
  • Limit the system users' CPU usage
  • Limit the system users' memory usage

Installation

You can download the rpm file and directly install it.

  rpm -ivh tokamakd-1.0.0-1.el9.x86_64.rpm

Or manually compile from the source file.

  git clone https://github.com/sonmihpc/tokamak.git
  cd tokamak
  make build
  make install

Usage/Configure

How to enable CGroup v1 in Rocky Linux 9?

  grubby --update-kernel=ALL --args="systemd.unified_cgroup_hierarchy=0 systemd.legacy_systemd_cgroup_controller"
  systemctl reboot

How to enable CGroup V2 in Rocky Linux 9?

  grubby --update-kernel=ALL --args="systemd.unified_cgroup_hierarchy=1"
  systemctl reboot

After install the tokamakd, you can start the service.

  systemctl start tokamakd
  systemctl enable tokamakd

You also can adjust the setup by edit the /etc/tokamak/config.yaml

cgroup:
  check-interval-ms: 1000 # 1000ms
  user-cpu-percent: 30    # 30% every user can consume the largest CPU percent of all logic cores.
  user-mem-percent: 30    # 30% every user can consume the largest memory percent of all memory.
  disable-oom-killer: true
  exclude-uids:           # which user exclude from restriction
    - 1240
    - 1250

Feedback

If you have any feedback, please reach out to us at sonmihpc@gmail.com.

About

The system resource restriction utilities, one component of the SonmiHPC system.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published