summaryrefslogtreecommitdiff
path: root/sql/threadpool.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.4 into 10.5Marko Mäkelä2020-08-011-0/+1
|\
| * Merge 10.3 into 10.4Marko Mäkelä2020-07-311-0/+1
| |\
| | * MDEV-21101 unexpected wait_timeout with pool-of-threadsVladislav Vaintroub2020-07-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to restricted size of the threadpool, execution of client queries can be delayed (queued) for a while. This delay was interpreted as client inactivity, and connection is closed, if client idle time + queue time exceeds wait_timeout. But users did not expect queue time to be included into wait_timeout. This patch changes the behavior. We don't close connection anymore, if there is some unread data present on connection, even if wait_timeout is exceeded. Unread data means that client was not idle, it sent a query, which we did not have time to process yet.
* | | Removed function declaration of a non-existing functionVladislav Vaintroub2020-05-291-3/+0
| | |
* | | Remove some trailing whitespaces.Vladislav Vaintroub2020-05-291-1/+1
| | |
* | | Merge 10.4 into 10.5Marko Mäkelä2020-03-301-7/+4
|\ \ \ | |/ /
| * | num_worker_threads my_atomic to Atomic_counterSergey Vojtovich2020-03-271-1/+1
| | |
* | | MDEV-19312 Make throttling interval depend on thread_pool_stall_limitVladislav Vaintroub2019-05-311-1/+2
| | | | | | | | | | | | | | | A thread_pool_stall_limit which is smaller than default would result in quicker creation of threads.
* | | Add some variables to the generic threadpool, that could help to analyzeVladislav Vaintroub2019-05-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | stalls etc better. - thread_pool_exact_stats - uses high precision timestamp for the time when connection was added to the queue. This timestamp helps calculating queuing time shown in I_S.THREADPOOL_QUEUES entries. - If thread_pool_dedicated_listener is on, then each group will have its own dedicated listener, that does not convert to worker. With this variable on, the queueing time in I_S.THREADPOOL_QUEUES , and actual queue size in I_S.THREADPOOOL_GROUPS will be more exact, since IO request are immediately dequeued from poll, without delay. Part of MDEV-19313.
* | | MDEV-19313 Threadpool : provide information schema tables for internals of ↵Vladislav Vaintroub2019-05-261-2/+2
|/ / | | | | | | | | | | | | generic threadpool Added thread_pool_groups, thread_pool_queues, thread_pool_waits and thread_pool_stats tables to information_schema.
* | Merge branch '10.3' into 10.4Oleksandr Byelkin2019-05-191-1/+1
|\ \ | |/
| * Merge 10.1 into 10.2Marko Mäkelä2019-05-131-1/+1
| |\
| | * Merge branch '5.5' into 10.1Vicențiu Ciorbaru2019-05-111-1/+1
| | |\
| | | * Update FSF addressMichal Schorm2019-05-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit is based on the work of Michal Schorm, rebased on the earliest MariaDB version. Th command line used to generate this diff was: find ./ -type f \ -exec sed -i -e 's/Foundation, Inc., 59 Temple Place, Suite 330, Boston, /Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, /g' {} \; \ -exec sed -i -e 's/Foundation, Inc. 59 Temple Place.* Suite 330, Boston, /Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, /g' {} \; \ -exec sed -i -e 's/MA.*.....-1307.*USA/MA 02110-1335 USA/g' {} \; \ -exec sed -i -e 's/Foundation, Inc., 59 Temple/Foundation, Inc., 51 Franklin/g' {} \; \ -exec sed -i -e 's/Place, Suite 330, Boston, MA.*02111-1307.*USA/Street, Fifth Floor, Boston, MA 02110-1335 USA/g' {} \; \ -exec sed -i -e 's/MA.*.....-1307/MA 02110-1335/g' {} \;
* | | | MDEV-19274 mariadb does not build on OSes that do not have HAVE_POOL_OF_THREADSbb-10.4-aix-build-fixVladislav Vaintroub2019-04-181-0/+7
|/ / / | | | | | | | | | | | | | | | | | | | | | Do not try to compile threadpool_common.cc, if threadpool is not available on current OS. Also introduced undocumented/uncached CMake variable DISABLE_THREADPOOL, to emulate builds on exotic OSes.
* | | Merge branch '10.1' into 10.2Sergei Golubchik2017-03-301-1/+1
|\ \ \ | |/ /
| * | Correct FSF addressiangilfillan2017-03-101-1/+1
| | |
* | | MDEV-10297 Add priorization to threadpoolVladislav Vaintroub2016-09-221-18/+103
| | | | | | | | | | | | Also MDEV-10385 Threadpool refactoring
* | | Fix leak from missing my_thread_endVladislav Vaintroub2016-03-091-1/+0
| | |
* | | Fix threadpool after it was broken by MDEV-6150Vladislav Vaintroub2016-03-081-1/+1
| | |
* | | Fix compilation10.2-sslVladislav Vaintroub2016-02-101-2/+0
| | |
* | | MDEV-6150 Speed up connection speed by moving creation of THD to new threadMonty2016-02-071-1/+3
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Creating a CONNECT object on client connect and pass this to the working thread which creates the THD. Split LOCK_thread_count to different mutexes Added LOCK_thread_start to syncronize threads Moved most usage of LOCK_thread_count to dedicated functions Use next_thread_id() instead of thread_id++ Other things: - Thread id now starts from 1 instead of 2 - Added cast for thread_id as thread id is now of type my_thread_id - Made THD->host const (To ensure it's not changed) - Removed some DBUG_PRINT() about entering/exiting mutex as these was already logged by mutex code - Fixed that aborted_connects and connection_errors_internal are counted in all cases - Don't take locks for current_linfo when we set it (not needed as it was 0 before)
* | Merge branch '10.0' into 10.1Sergei Golubchik2015-12-211-0/+1
|\ \
| * | MDEV-9156 : Fix tp_add_connection()'s error handlingVladislav Vaintroub2015-12-041-0/+1
| |/ | | | | | | Avoid possible my_thread_end() in the main polling thread.
* | Improve performance for calculating memory allocationMonty2015-02-011-1/+2
|/ | | | Extend interface for 'show variables' with current scope
* MDEV-5205 - MariaDB does not start if more than 128 cpu's are availableSergey Vojtovich2013-11-051-1/+2
| | | | | | | | | | | - thread_pool_size command line option upper limit increased to 100 000 (same as for max_connections) - thread_pool_size system variable upper limit is maximum of 128 or the value given at command line - thread groups are now allocated dynamically Different limit for command line option and system variable was done to avoid additional mutex for all_groups and threadpool_max_size.
* Added copiright, some more commentsVladislav Vaintroub2012-02-171-0/+14
|
* address second round review commentsVladislav Vaintroub2012-02-161-2/+1
|
* small cleanupsVladislav Vaintroub2012-01-241-0/+6
|
* Get rid of idle thread counter atomic variable.Vladislav Vaintroub2012-01-151-2/+5
| | | | | Instead, use function that loops over groups and calculates idle threads for "show status".
* Threadpool -address review commentsVladislav Vaintroub2012-01-151-17/+15
|
* Allow for faster creation of threads in corner cases where pool would be ↵Vladislav Vaintroub2011-12-311-0/+1
| | | | | | | | overloaded with long non-yielding queries. To allow it, change minimum of thread_pool_stall_limit to be 10 milliseconds. Also introduce a new parameter to oversubscribe a group . Number of threads running in parallel would be higher than it normally should, leading to thrashing, but it may improving preemptiveness, which is useful for the described corner case.
* Make threadpool_stall_limit variable really dynamicVladislav Vaintroub2011-12-291-0/+1
|
* allow changing thread_pool_size without server restartVladislav Vaintroub2011-12-191-0/+3
|
* Small adjustements to threadpoolVladislav Vaintroub2011-12-181-3/+0
|
* Initial threadpool implementation for MariaDB 5.5Vladislav Vaintroub2011-12-081-0/+47