LAB 2.6 foo.slice doesn't have any impact
Somehow CPU usage stays 100%.
I also tried to make a [Slice] in foo.service.
I did the stop / reload-deamon /start.
I tried reboot once.
I tried to make /usr/lib/systemd/system/foo.slice
Operating System is Manjaro.
/etc/systemd/system >>> cat foo.service foo.slice [Unit] Description=Example service unit to run stress] Slice=foo.slice [Service] ExecStart=/usr/bin/stress --cpu 2 --io 2 --vm 4 --vm-bytes 256M [Install] WantedBy=multi-user.target [Unit] Description="stress slice" [Slice] CPUQuota=30%
It just stays under the system.slice
/etc/systemd/system >>> sudo systemctl status -l foo.service [1]
● foo.service - Example service unit to run stress]
Loaded: loaded (/etc/systemd/system/foo.service; disabled; vendor preset: disabled)
Active: active (running) since Fri 2021-02-26 17:12:40 CET; 57s ago
Main PID: 22562 (stress)
Tasks: 9 (limit: 4555)
Memory: 697.5M
CGroup: /system.slice/foo.service
├─22562 /usr/bin/stress --cpu 2 --io 2 --vm 4 --vm-bytes 256M
├─22563 /usr/bin/stress --cpu 2 --io 2 --vm 4 --vm-bytes 256M
├─22564 /usr/bin/stress --cpu 2 --io 2 --vm 4 --vm-bytes 256M
├─22565 /usr/bin/stress --cpu 2 --io 2 --vm 4 --vm-bytes 256M
├─22566 /usr/bin/stress --cpu 2 --io 2 --vm 4 --vm-bytes 256M
├─22567 /usr/bin/stress --cpu 2 --io 2 --vm 4 --vm-bytes 256M
├─22568 /usr/bin/stress --cpu 2 --io 2 --vm 4 --vm-bytes 256M
├─22569 /usr/bin/stress --cpu 2 --io 2 --vm 4 --vm-bytes 256M
└─22570 /usr/bin/stress --cpu 2 --io 2 --vm 4 --vm-bytes 256M
Feb 26 17:12:40 blabla systemd[1]: Started Example service unit to run stress].
Feb 26 17:12:40 blabla stress[22562]: stress: info: [22562] dispatching hogs: 2 cpu, 2 io, 4 vm, 0 hdd
Comments
-
Thank you for bringing this to our attention, investigating.
Lee0 -
Hi Lee
I just tied to add the connection of the .slice under [Service] as in the Arch Wiki but it's not working either.
https://wiki.archlinux.org/index.php/Cgroups#Grouping_unit_under_a_sliceI also checked the solutions of the lab exercise but the
Slice=foo.sliceentry is missing completely. (Solutions are attached to the post)/usr/.../systemd/system >>> cat foo.service foo.slice [Unit] Description=Example service unit to run stress [Service] Slice=foo.slice ExecStart=/usr/bin/stress --cpu 4 --io 4 --vm 2 --vm-bytes 256M [Install] WantedBy=multi-user.target [Unit] Description="stress slice" [Slice] CPUQuota=30%
0 -
Is the script track-STRESS.sh showing system.slice or foo.slice in the output?
There may have been a default config option change causing cgroupsV2 to be activated.Thanks Lee
0 -
system.slice as in the
systemctl status -l foounder CGroup:CGroup: /system.slice/foo.service0 -
That may be the clue I was looking for, it should be foo.slice. I'll check it out and get back to you.
Lee
0
Categories
- All Categories
- 177 LFX Mentorship
- 177 LFX Mentorship: Linux Kernel
- 754 Linux Foundation IT Professional Programs
- 374 Cloud Engineer IT Professional Program
- 170 Advanced Cloud Engineer IT Professional Program
- 74 DevOps IT Professional Program - Discontinued
- 5 DevOps & GitOps IT Professional Program
- 100 Cloud Native Developer IT Professional Program
- 7.6K Training Courses & Learning Paths
- 2 AI & ML Training
- 1 Blockchain & Decentralized Identity Training
- 5 Cloud & Containers Training
- 1 Cybersecurity Training
- 2 DevOps & Site-Reliability Training
- 1 Linux Kernel Development Training
- 1 Networking Training
- 2 Open Source Best Practice Training
- 2 System Administration Training
- 1 System Engineering Training
- 1 Web & Application Development Training
- 794 Hardware
- 202 Drivers
- 68 I/O Devices
- 37 Monitors
- 95 Multimedia
- 173 Networking
- 91 Printers & Scanners
- 89 Storage
- 769 Linux Distributions
- 81 Debian
- 68 Fedora
- 22 Linux Mint
- 13 Mageia
- 24 openSUSE
- 150 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 356 Ubuntu
- 465 Linux System Administration
- 31 Cloud Computing
- 73 Command Line/Scripting
- Github systems admin projects
- 98 Linux Security
- 78 Network Management
- 101 System Management
- 46 Web Management
- 111 Mobile Computing
- 19 Android
- 77 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 393 Off Topic
- 121 Introductions
- 182 Small Talk
- 29 Study Material
- 976 Programming and Development
- 310 Kernel Development
- 648 Software Development
- 990 Software
- 382 Applications
- 182 Command Line
- 5 Compiling/Installing
- 68 Games
- 317 Installation
- Archived
- 2 LFD140 Class Forum
- 1.4K LFS258 Class Forum
Upcoming Training
-
August 20, 2018
Kubernetes Administration (LFS458)
-
August 20, 2018
Linux System Administration (LFS301)
-
August 27, 2018
Open Source Virtualization (LFS462)
-
August 27, 2018
Linux Kernel Debugging and Security (LFD440)
