Howto modify systemd DefaultTasksMax / TasksMax / UserTasksMax settings
This document (000015901) is provided subject to the disclaimer at the end of this document.
SUSE Linux Enterprise Server 12 SP2 and later ServicePacks
SUSE Linux Enterprise Server for SAP Applications 15 GA and later ServicePacks
SUSE Linux Enterprise Server for SAP Applications 12 SP2 and later ServicePacks
In certain occasions the default resource limitations are not sufficient, or perhaps found to be too restrictive, and some of the of the systemd's TasksMax settings may need specific adjustments.
Changing the TasksMax values:
Example of the /etc/systemd/system.conf file:
Example for sshd.service in /etc/systemd/system/sshd.service.d/override.conf file:
Example of /etc/systemd/logind.conf file:
[Login] UserTasksMax = 12288
Create a drop-in for the individual user. For example, if the target user's UID is 1001, create:
Upon the next login by that user, the value should come into effect. You could also give the following command to change the user's current value on-the-fly:
systemctl set-property user-1001.slice TasksMax=18000
Verifying the current settings :
- Looking at the system level DefaultTasksMax settings:
systemctl show --property DefaultTasksMax
- Looking for a service (e.g.: sshd.service) TaskMax value:
systemctl status sshd.service |grep -e Tasks
Tasks: 1 (limit: 18100)
- Looking for what is the current TasksMax set for a specific user:
Checking TasksMax value for user repair1 which uid is 1001.
This translates to user-slice : user-1001.slice
Knowing the user-slice we can check the TasksMax value :
systemd-analyze dump | sed -n "/-> Unit user-1001.slice:/,/-> Unit /p"| grep -e "TasksMax="
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:000015901
- Creation Date: 14-May-2021
- Modified Date:14-May-2021
- SUSE Linux Enterprise Server
- SUSE Linux Enterprise Server for SAP Applications
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com