0

By default systemd assigns resource limits through CGroups like TaskMax, here's a example of this:

$ systemctl status sshd
● sshd.service - OpenSSH Daemon
     Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; preset: disabled)
     Active: active (running) since Fri 2023-08-18 08:24:27 CEST; 37min ago
   Main PID: 936 (sshd)
      Tasks: 1 (limit: 76994)
(...)

$ systemctl show --property DefaultTasksMax
DefaultTasksMax=76994

Furthermore it's possible to monitor current resource usage with $ systemd-cgtop (it doesn't show limits though..).

Where can you actually find logs or monitor if a CGroup limit is reached to better understand the needs of the system?

1 Answer 1

0

There aren't logs per se - although instantaneous values of Pressure on CPU, Memory etc. can be read from the "files" in the cgroup hierarchy.

In order to make suggestions it would help if you could explain more about what you are trying to do? In particular:
What are you trying to measure?
Is there a particular usage or load profile?

Thanks

4
  • Thanks for taking a look. I hit a CGroup limit for PIDS in Podman which was difficult to debug as processes weren't responsive and logs misleading. I'm looking for a generic answer here to view all limits and current usage to determinate if anything needs to be rised to avoid potential headaches in the future!
    – GrabbenD
    Commented Sep 21, 2023 at 14:12
  • Interesting. Just a thought... monitoring "all limits" will likely cause the process that's doing the monitoring to distort the loading on the node. So worth trying to reduce the scope..and define a realistic use case. Could - "monitor the things that cause the node to become unresponsive" (e.g. CPU usage)... be a useful refinement? What would that leave out that might worry you?
    – LXTune
    Commented Sep 22, 2023 at 11:51
  • Once again, thanks for taking a look @TuneLinux. The problem which I'm trying to tackle here is identifying all limits (CPU/Storage/Network/..) and seeing the current usage (something like htop but for CGroups). There is no specific process/scope which I'm trying to investigate as I want to evaluate the system as a whole while under load. The reason for this is, I don't know what limits even exist in my system and I don't know the usage (which is what caused me to waste a lot of time debugging unresponsive apps from a PID limit in Podman which lead me to asking this question).
    – GrabbenD
    Commented Sep 28, 2023 at 9:36
  • Would you be up for a chat? I'm wondering whether it's worth creating such a facility....and have questions on who else would want it, why, what it would enable them to do differently? And I guess you have insights... Lets connect via linkedin.com/in/vernonriley
    – LXTune
    Commented Sep 29, 2023 at 11:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .