How to increase DefaultTasksMax in RHEL/CentOS 8 onwards ?

Let us see how to increase the DefaultTasksMax in RHEL, or CentOS 8 Operating system onwards.

The default maximum tasks in RHEL/CentOS8 is quite low when you run any database server.

It is usually assigned at 80%, which we can increase a maximum to 100% or Infinity.

Lets see how to do this.

Check current DefaultTasksMax and change it to 100% or infinity.

[root@ngelinux saket]# systemctl show --property DefaultTasksMax
DefaultTasksMax=23685

Steps to do it:
1. Change DefaultTasksMax in /etc/systemd/system.conf to infinity.

[root@ngelinux scratch]# cat /etc/sysctl.conf
# sysctl settings are defined through files in
# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
#
# Vendors settings live in /usr/lib/sysctl.d/.
# To override a whole file, create a new file with the same in
# /etc/sysctl.d/ and put new settings there. To override
# only specific settings, add a file with a lexically later
# name in /etc/sysctl.d/ and put new settings there.
#
# For more information, see sysctl.conf(5) and sysctl.d(5).
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
kernel.threads-max=984400000
[root@ngelinux scratch]#

[root@ngelinux scratch]# systemctl show --property DefaultTasksMax
DefaultTasksMax=4194303

[root@ngelinux scratch]# cat /etc/systemd/system.conf | grep -i tasks
#DefaultTasksAccounting=yes
#DefaultTasksMax=18446744073709551615
DefaultTasksMax=100%
#DefaultTasksMax=infinity
[root@ngelinux scratch]#

2. Reload the systemd:

# systemctl daemon-reload

 

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments