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

Useless message "If the mysqld execution user is authorized page cleaner thread priority can be changed."

    XMLWordPrintable

Details

    Description

      On startup, InnoDB tries to prioritize the page cleaner thread. This usually fails, resulting in a log message like the following:

      Apr 15 03:28:17 ubuntu-focal-amd64 mariadbd[4875]: 2021-04-15  3:28:17 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
      

      A search for that message in this bug reporting system reveals many community user bugs. So, it seems that this code is almost never effective and can be removed:

      #ifdef UNIV_LINUX
        /* linux might be able to set different setting for each thread.
        worth to try to set high priority for the page cleaner thread */
        const pid_t tid= static_cast<pid_t>(syscall(SYS_gettid));
        setpriority(PRIO_PROCESS, tid, -20);
        if (getpriority(PRIO_PROCESS, tid) != -20)
          ib::info() << "If the mysqld execution user is authorized,"
                        " page cleaner thread priority can be changed."
                        " See the man page of setpriority().";
      #endif /* UNIV_LINUX */
      

      When this code was heavily refactored in MDEV-23855, the throughput and latency were greatly improved even when the buf_flush_page_cleaner thread always ran the same priority with other threads in our benchmarks.

      So, this code should have no benefit in MariaDB Server 10.5.7 or later.

      Attachments

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              marko Marko Mäkelä
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.