// mysql · memory

innodb_dedicated_server

Let InnoDB size the buffer pool and redo log from the server's memory and CPU count.

デフォルト
OFF
Range
ON, OFF
Restart needed
はい
Default checked on
MySQL 8.4 LTS

何ができるか

When ON, InnoDB sets innodb_buffer_pool_size (128MB under 1GB of RAM, 50% at 1-4GB, 75% above 4GB) and innodb_redo_log_capacity (logical processors / 2, in GB, up to 16GB) automatically, unless they are set explicitly.

デフォルト値

OFF. OFF (MySQL 8.4).

Check the current value

SHOW GLOBAL VARIABLES LIKE 'innodb_dedicated_server';

SELECT VARIABLE_NAME, VARIABLE_SOURCE, MIN_VALUE, MAX_VALUE, SET_TIME
FROM performance_schema.variables_info
WHERE VARIABLE_NAME = 'innodb_dedicated_server';

Change it

-- SET PERSIST_ONLY innodb_dedicated_server fails: error 1238, non persistent read only variable.
-- Add this line under [mysqld] in my.cnf, then restart mysqld:
--   innodb_dedicated_server = ON

Restart required, and the variable cannot be persisted: SET GLOBAL and SET PERSIST_ONLY both fail with error 1238. Set it under [mysqld] in my.cnf or on the mysqld command line.

When to change it

On a host or container that runs nothing but MySQL, as a sane starting point.

What can go wrong

It reads the memory it can see; in a container without a memory limit that may be the whole host's RAM.

Questions about innodb_dedicated_server

What is the default value of innodb_dedicated_server in MySQL?

OFF. OFF (MySQL 8.4).

Does changing innodb_dedicated_server require a restart?

Yes. Restart required, and the variable cannot be persisted: SET GLOBAL and SET PERSIST_ONLY both fail with error 1238. Set it under [mysqld] in my.cnf or on the mysqld command line.

When should I change innodb_dedicated_server?

On a host or container that runs nothing but MySQL, as a sane starting point.

Back to all MySQL settings, or check the MySQL manual for every option.

// one client for every engine

Check innodb_dedicated_server on your own server

SQLly runs the query above against MySQL and the other engines in this reference, from one desktop app on macOS, Windows and Linux.