maria-developers team mailing list archive
Mailing list archive
Re: safe patches to backport -- pool-of-threads
From: MARK CALLAGHAN <mdcallag@xxxxxxxxx>
Sent: Sat, 28 Feb 2009 10:41 pm
Subject: [Maria-developers] safe patches to backport -- pool-of-threads
One of the features listed here
http://askmonty.org/wiki/index.php/MariaDB_versus_MySQL as a potential
backport is support for pool-of-threads. I am not sure how safe this
feature is today.
describes some of the problems that might cause a server to hang when
pool-of-threads is used.
http://bugs.mysql.com/bug.php?id=42288 describes the performance
overhead of pool-of-threads. The overhead is significant for workloads
with fast queries such as sysbench.
I think that pool-of-threads needs a lot of work before it can be
considered safe. We backported this to our 5.0 branch at work and have
begun to search for fixes.
Mailing list: https://launchpad.net/~maria-developers
Post to : maria-developers@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~maria-developers
More help : https://help.launchpad.net/ListHelp
One way to deal with the overhead of the thread pool is to support multiple thread pools. The selection of which connection
goes to which pool could be based more than just on listening port value. Ideally each pool would have its own connection listener/
request assembly thread, distinct from the connection manager thread(s) listening on ports. The thread pool selection
could be based on some rules like 'everything from user X goes to pool Y'. The rules could be stored in a dictionary table.
The documentation is wrong IMO in that pool-of-threads makes innodb_thread_concurrency control unnecessary.
If the workload calls for setting innodb_thread_concurrency=4 then it has to be 4, thread pool or not. There's an obvious
problem that in this case you may end up with all 20 threads in pool-of-threads either doing the innodb stuff or waiting
on entering innodb, then new connections cannot be serviced even if they wouldn't use InnoDB. Again multiple thread pools
could help here.
The opinion(s) stated above, if any, are mine and don't necessarily reflect those of my employer