Skip to content

Commit

Permalink
MDEV-25425 Useless message "If the mysqld execution user is authorize…
Browse files Browse the repository at this point in the history
…d 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.
  • Loading branch information
dr-m committed Apr 15, 2021
1 parent de74630 commit 3f8df01
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions storage/innobase/buf/buf0flu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 3f8df01

Please sign in to comment.