Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-30236

set TaskMax=inifinity in the MariaDB systemd unit

Details

    • Task
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.4.33
    • Server
    • 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.

      Attachments

        Activity

          danblack Daniel Black added a comment -

          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)?

          danblack Daniel Black added a comment - 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 )?

          People

            danblack Daniel Black
            rpizzi Rick Pizzi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.