From f687608e1c2d7fcfc0000b15badd70c6f1f2e501 Mon Sep 17 00:00:00 2001 From: "heikki@hundin.mysql.fi" <> Date: Mon, 18 Oct 2004 15:00:39 +0300 Subject: srv0srv.c: If innodb_thread_concurrency would be exceeded, let a thread sleep 10 ms before entering the FIFO queue; previously, the value was 50 ms, which Peter Z considered too long --- innobase/srv/srv0srv.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'innobase/srv') diff --git a/innobase/srv/srv0srv.c b/innobase/srv/srv0srv.c index d913d77fdfc..b34ae9f36f4 100644 --- a/innobase/srv/srv0srv.c +++ b/innobase/srv/srv0srv.c @@ -951,7 +951,13 @@ retry: trx->op_info = "sleeping before joining InnoDB queue"; - os_thread_sleep(50000); + /* Peter Zaitsev suggested that we take the sleep away + altogether. But the sleep may be good in pathological + situations of lots of thread switches. Simply put some + threads aside for a while to reduce the number of thread + switches. */ + + os_thread_sleep(10000); trx->op_info = ""; -- cgit v1.2.1