summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2021-04-15 11:40:43 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2021-04-15 11:40:43 +0300
commit3f8df01194700a68a62e6adbc62bd48d27dfe833 (patch)
treedd2fae41cc733fb978712c752327b9f93cc0f49d
parentde746304c985b03bc3c673dc6ae1d499bb38faf9 (diff)
downloadmariadb-git-3f8df01194700a68a62e6adbc62bd48d27dfe833.tar.gz
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.
-rw-r--r--storage/innobase/buf/buf0flu.cc22
1 files changed, 0 insertions, 22 deletions
diff --git a/storage/innobase/buf/buf0flu.cc b/storage/innobase/buf/buf0flu.cc
index 77c6225e455..339b30659fe 100644
--- a/storage/innobase/buf/buf0flu.cc
+++ b/storage/innobase/buf/buf0flu.cc
@@ -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);