summaryrefslogtreecommitdiff
path: root/sql/slave.h
diff options
context:
space:
mode:
authorKonstantin Osipov <kostja@sun.com>2009-11-23 19:57:31 +0300
committerKonstantin Osipov <kostja@sun.com>2009-11-23 19:57:31 +0300
commit7edfae4e867358c76c3c21815a3f25b07372d319 (patch)
tree7a70289a8ca5b5d7d7f3e9081bdb69a4ed488e81 /sql/slave.h
parent777c3034017e3d90937e055e9928b42a48ad6adf (diff)
downloadmariadb-git-7edfae4e867358c76c3c21815a3f25b07372d319.tar.gz
Backport of:
------------------------------------------------------------- revno: 2877 committer: Davi Arnaut <Davi.Arnaut@Sun.COM> branch nick: 35164-6.0 timestamp: Wed 2008-10-15 19:53:18 -0300 message: Bug#35164: Large number of invalid pthread_attr_setschedparam calls Bug#37536: Thread scheduling causes performance degradation at low thread count Bug#12702: Long queries take 100% of CPU and freeze other applications under Windows The problem is that although having threads with different priorities yields marginal improvements [1] in some platforms [2], relying on some statically defined priorities (QUERY_PRIOR and WAIT_PRIOR) to play well (or to work at all) with different scheduling practices and disciplines is, at best, a shot in the dark as the meaning of priority values may change depending on the scheduling policy set for the process. Another problem is that increasing priorities can hurt other concurrent (running on the same hardware) applications (such as AMP) by causing starvation problems as MySQL threads will successively preempt lower priority processes. This can be evidenced by Bug#12702. The solution is to not change the threads priorities and rely on the system scheduler to perform its job. This also enables a system admin to increase or decrease the scheduling priority of the MySQL process, if intended. Furthermore, the internal wrappers and code for changing the priority of threads is being removed as they are now unused and ancient. 1. Due to unintentional side effects. On Solaris this could artificially help benchmarks as calling the priority changing syscall millions of times is more beneficial than the actual setting of the priority. 2. Where it actually works. It has never worked on Linux as the default scheduling policy SCHED_OTHER only accepts the static priority 0.
Diffstat (limited to 'sql/slave.h')
-rw-r--r--sql/slave.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/sql/slave.h b/sql/slave.h
index eff0fa49f61..8fb44007032 100644
--- a/sql/slave.h
+++ b/sql/slave.h
@@ -164,8 +164,7 @@ int start_slave_thread(pthread_handler h_func, pthread_mutex_t* start_lock,
pthread_cond_t* start_cond,
volatile uint *slave_running,
volatile ulong *slave_run_id,
- Master_info* mi,
- bool high_priority);
+ Master_info* mi);
/* If fd is -1, dump to NET */
int mysql_table_dump(THD* thd, const char* db,