This is a read-only copy of the MariaDB Knowledgebase generated on 2024-12-22. For the latest, interactive version please visit https://mariadb.com/kb/.

Threadpool Benchmarks

Here are some benchmarks of some development threadpool code (the 5.5 threadpool).

The benchmarks were run on three machines:

  • facebook-maria1 (Linux, 16 cores)
  • pitbull (Linux, 24 cores)
  • windows (Windows, 8 cores)

Sysbench 0.4 was used to run some "unit" OLTP tests (point-select and update-nokey), as well as the "classic" OLTP-readonly and OLTP-readwrite. All tests were run with the number of concurrent clients ranging from 16 to 4096, with warm cache, with the sysbench table having 1M records.

The results are quite different on all of the machines tested (the machines are very different, in terms of cores, IO etc), yet threadpool has a positive effect on all 3 machines, and the positive effect seems to grow with the number of cores.

Some notes on how the benchmarks were run:

  1. The benchmark client and server used different CPUs - ('taskset' (Linux), or 'start /affinity' (Windows) were used to run the benchmark client on #CPUs/4, the rest of CPUs were used by the server). On the Linux boxes, --thread_pool_size=<N> (where N is number of cores dedicated to the server) was used.
  2. innodb_flush_log_at_trx_commit=0 and innodb_flush_method=ALL_O_DIRECT was used to avoid extensive fsyncing, which is ok for the purposes of the testing for this.
  3. Every "write" benchmark (oltp_rw and update_nokey) started with a new server (i.e. kill mysqld, remove innodb files, and restart mysqld for each test). Every "read" benchmark, on the other hand, reused the same running server instance. Starting afresh with a new server on write benchmarks is done mainly to eliminate the effects of the purge lag.
  4. The results are in queries-per-second (QPS).

OLTP_RO

OLTP_RO facebook-maria1

concurrent clients163264128256512102420484096
thread per connection394447254878486347324554434541031670
threadpool382249554991501749084716461043072962

oltp-ro-facebook-maria1

OLTP_RO pitbull

concurrent clients163264128256512102420484096
thread per connection67547905815279487924758753133827208
threadpool656677258108807979767793742965234456

oltp_ro-pitbull

OLTP_RO Windows

concurrent clients163264128256512102420484096
thread per connection18221831182518291816187918661783987
threadpool201920492024199219241897185518251403

oltp_ro-windows

OLTP_RW

OLTP_RW facebook-maria1

concurrent clients163264128256512102420484096
thread per connection2833351035453420325928181788820113
threadpool31633590349834593354311721901064506

oltp_rw-facebook-maria1

OLTP_RW pitbull

concurrent clients163264128256512102420484096
thread per connection456153165332351228742476138026553
threadpool45045382569455675302451425481186484

oltp_rw-pitbull

OLTP_RW Windows

concurrent clients163264128256512102420484096
thread per connection14801498147214771456137173132882
threadpool14491523152714921443140913651240862

oltp_rw-windows

POINT_SELECT

POINT_SELECT facebook-maria1

concurrent clients163264128256512102420484096
thread per connection9132211311611541811448411116910461226902128435038
threadpool100359115618118115120136119165113931110787109970104985

point_select-facebook-maria1

POINT_SELECT pitbull

concurrent clients163264128256512102420484096
thread per connection1486731615471697471720836903642041217754368282
threadpool143222167069167270165977164983158410148690147107143934

point_select-pitbull

POINT_SELECT Windows

concurrent clients163264128256512102420484096
thread per connection397344288544448444784172038196368443540423306
threadpool421434567947066477534672044215436774309344364

point_select-windows

UPDATE_NOKEY

UPDATE_NOKEY facebook-maria1

concurrent clients163264128256512102420484096
thread per connection60165657616772757232476122634189813265389
threadpool650926868367053641416481563047633466363862843

update_nokey-facebook-maria1

UPDATE_NOKEY pitbull

concurrent clients163264128256512102420484096
thread per connection652137168019418130081115587425645635332
threadpool649027023670037689266993069929670996237617766

update_nokey-pitbull

UPDATE_NOKEY Windows

concurrent clients163264128256512102420484096
thread per connection24790256342563925309247541942052492361824
threadpool252512525925406253272485023818231372300322047

update_nokey-windows

Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.