S
Supanote
Sign in Sign up

MariaDB 11.4/11.8 LTS pool-of-threads & Slow Plan Config

plain (ini) 1 day ago · 35 lines · 4 views
Verified Blueprint MariaDB 11.8 LTS

High-concurrency MariaDB 11.4/11.8 LTS server configuration enabling built-in pool-of-threads, Aria temp caches, and slow plan logging.

  • ✓ Activates MariaDB Community built-in thread_handling = pool-of-threads to sustain 2,000+ client connections
  • ✓ Disables legacy query cache mutex contention and sizes Aria internal temp table pagecache
  • ✓ Enables log_slow_verbosity = query_plan,innodb,explain for rich slow-query root-cause forensics
Quick Fetch
1# MariaDB 11.4 LTS / 11.8 LTS High-Concurrency Production Configuration
2# Place at /etc/mysql/mariadb.conf.d/99-high-concurrency.cnf (32 GB RAM / 8 vCPU)
3
4[mariadb]
5# 1. Built-In Thread Pool (Prevents CPU context-switch collapse under connection spikes)
6thread_handling = pool-of-threads
7thread_pool_size = 8
8thread_pool_max_threads = 512
9thread_pool_stall_limit = 60
10max_connections = 2500
11extra_port = 3307
12extra_max_connections = 10
14# 2. InnoDB Memory & Single-File Redo Log
15innodb_buffer_pool_size = 22G
16innodb_log_file_size = 4G
17innodb_flush_method = O_DIRECT
18innodb_flush_log_at_trx_commit = 1
19innodb_io_capacity = 4000
20innodb_io_capacity_max = 8000
22# 3. Disable Legacy Query Cache & Size Aria Internal Temp Engine
23query_cache_type = 0
24query_cache_size = 0
25aria_pagecache_buffer_size = 1G
26tmp_memory_table_size = 64M
27max_heap_table_size = 64M
29# 4. Optimizer Histograms & Deep Slow Query Diagnostics
30optimizer_use_condition_selectivity = 4
31 histogram_size = 254
32slow_query_log = 1
33long_query_time = 0.3
34log_slow_verbosity = query_plan,innodb,explain

No replies yet

Every reply is a note. Start a discussion, ask a question, or attach a code snippet.

Related MariaDB 11.8 LTS & Database, Cache & SQL Blueprints

Production-ready configurations and diagnostics from the verified Supanote library.

All Database, Cache & SQL →
Interactive Developer Workbench: .env, Log & API Key Secret Scanner

Detect and redact leaked AWS keys, JWTs, database URIs, private keys, and Bearer tokens before sharing.

Open Secret Scanner →

Share Note

Open
Download SVG
Social Card Preview
Open on mobile
Point your phone camera to open this note directly

Report this note

Notification