summaryrefslogtreecommitdiff
path: root/sql/threadpool_generic.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '10.5' into 10.6Vladislav Vaintroub2020-07-041-3/+4
|\
| * Remove some trailing whitespaces.Vladislav Vaintroub2020-05-291-1/+1
| |
| * MDEV-22696 TP_pool_generic::set_pool_size logic so that it marks each ↵Vladislav Vaintroub2020-05-251-0/+1
| | | | | | | | connection to change group before the next socket read.
| * MDEV-22578 thread_pool_info crashes with clang6, using SSE instructions on ↵Vladislav Vaintroub2020-05-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | unaligned memory Apparently, in stats_reset_table(), the innocuous memset(&group->counters, 0, sizeof(group->counters)); is converted by clang to SSE2 instructions. The problem is that "group" is not correctly aligned, despite MY_ALIGNED(CPU_LEVEL1_DCACHE_LINESIZE) in the thread_group_t declaration. It is not aligned because it was allocated with my_malloc, since commit fd9f1638, MDEV-5205. Previously all_groups was a statically allocated array. Fix is to remove MY_ALIGNED, and pad the struct instead.
* | MDEV-22990 Threadpool : Optimize network/named pipe IO for WindowsVladislav Vaintroub2020-06-261-9/+11
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch reduces the overhead of system calls prior to a query, for threadpool. Previously, 3 system calls were done 1. WSARecv() to get notification of input data from client, asynchronous equivalent of select() in one-thread-per-connection 2. recv(4 bytes) - reading packet header length 3. recv(packet payload) Now there will be usually, just WSARecv(), which pre-reads user data into a buffer, so we spared 2 syscalls Profiler shows the most expensive call WSARecv(16%CPU) becomes 4% CPU, after the patch, benchmark results (network heavy ones like point-select) improve by ~20% The buffer management was rather carefully done to keep buffers together, as Windows would keeps the pages pinned in memory for the duration of async calls. At most 1MB memory is used for the buffers, and overhead per-connection is only 256 bytes, which should cover most of the uses. SSL does not yet use the optmization, so far it does not properly use VIO for reads and writes. Neither one-thread-per-connection would get any benefit, but that should be fine, it is not even default on Windows.
* Merge 10.4 into 10.5Marko Mäkelä2020-03-301-2/+2
|
* MDEV-20372 thread_pool_info fails randomly in 10.5Vladislav Vaintroub2020-03-281-5/+9
| | | | | | Rework stats a bit, so we're not missing any queue_get() now. Don't do stats_reset_table(), if generic threadpool is off.
* MDEV-19313 Threadpool : provide information schema tables for internals of ↵Vladislav Vaintroub2019-05-261-0/+150
generic threadpool Added thread_pool_groups, thread_pool_queues, thread_pool_waits and thread_pool_stats tables to information_schema.