Commit 3f8df011 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-25425 Useless message "If the mysqld execution user is authorized page...

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

On startup, InnoDB tried to increase the priority of the page cleaner
thread. This would usually fail, resulting in a server log message.

When the page cleaner code was 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.

Besides, starting with MariaDB Server 10.5, the executable is called
mariadbd, not mysqld.
parent de746304
......@@ -40,13 +40,6 @@ Created 11/11/1995 Heikki Tuuri
#include "log0crypt.h"
#include "srv0mon.h"
#include "fil0pagecompress.h"
#ifdef UNIV_LINUX
/* include defs for CPU time priority settings */
#include <unistd.h>
#include <sys/syscall.h>
#include <sys/time.h>
#include <sys/resource.h>
#endif /* UNIV_LINUX */
#ifdef HAVE_LZO
# include "lzo/lzo1x.h"
#elif defined HAVE_SNAPPY
......@@ -2083,21 +2076,6 @@ static os_thread_ret_t DECLARE_THREAD(buf_flush_page_cleaner)(void*)
ut_ad(!srv_read_only_mode);
ut_ad(buf_page_cleaner_is_active);
#ifdef UNIV_DEBUG_THREAD_CREATION
ib::info() << "page_cleaner thread running, id "
<< os_thread_get_curr_id();
#endif /* UNIV_DEBUG_THREAD_CREATION */
#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 */
ulint last_pages= 0;
timespec abstime;
set_timespec(abstime, 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment