[MDEV-30236] set TaskMax=inifinity in the MariaDB systemd unit Created: 2022-12-14  Updated: 2023-11-22  Resolved: 2023-11-15

Status: Closed
Project: MariaDB Server
Component/s: Server
Fix Version/s: 10.4.33

Type: Task Priority: Major
Reporter: Rick Pizzi Assignee: Daniel Black
Resolution: Fixed Votes: 0
Labels: None


 Description   

It turns out systemd has a (stupid) limit of 4915 threads per process
This means that max_connection in server has this upper limit no matter what we set it to.

We need to distribute our systemd unit with unlimited tasks, so big shops which need to bump max connections will be able to do it.



 Comments   
Comment by Daniel Black [ 2022-12-16 ]

Wow. Still better than 512.

I think current value is a bit higher that 4915 like:

15% of pid_max for kernel 6.1.0-0.rc8.58.fc38.x86_64

$ cat /proc/sys/kernel/pid_max
4194304
 
$ echo $(( 4194304 * 15 / 100 ))
629145

Did you observer something substantially different?

And I certainly take your point that if MariaDB has limit controls they should apply rather than anything underneath.

Note for consistency the LimitNOFILE of systemd is used to autosize the max_connections/table_cache size.

You still thinking "infinity" vs say "99%" (of max-pid) vs a size size that the mariadb server can distribute/autosize its thread related variables (ref systemd manual)?

Generated at Thu Feb 08 10:14:43 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.