[MDEV-25425] Useless message "If the mysqld execution user is authorized page cleaner thread priority can be changed." Created: 2021-04-15  Updated: 2021-04-15  Resolved: 2021-04-15

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.2, 10.3, 10.4, 10.5, 10.6
Fix Version/s: 10.5.10, 10.6.0

Type: Bug Priority: Major
Reporter: Marko Mäkelä Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: performance

Issue Links:
Relates
relates to MDEV-23855 InnoDB log checkpointing causes regre... Closed

 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.


Generated at Thu Feb 08 09:37:36 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.