mariadb-slap & mysqlslap for MariaDB Enterprise Server 23.08


The mariadb-slap utility is used to emulate client load and perform diagnostics with MariaDB Enterprise Server 23.08. It operates as though multiple clients were accessing the server.

MariaDB Enterprise Server 23.08 also provides a symbolic link to the utility's legacy name (mysqlslap).

mariadb-slap Options for MariaDB Enterprise Server 23.08



--auto-generate-sql (-a)

Generate SQL where not supplied by file or command line.


Add an AUTO_INCREMENT column to auto-generated tables.


Set this number to generate a set number of queries to run.


Add GUID based primary keys to auto-generated tables.


Specify test load type: mixed, update, write, key, or read; default is mixed.


Number of secondary indexes to add to auto-generated tables.


Number of unique queries to generate for automatic tests.


Number of unique queries to generate for auto-generate-sql-write-number.


Number of row inserts to perform for each thread (default is 100).


Directory for character set files.


Commit records every X number of statements.

--compress (-C)

Use compression in server/client protocol.

--concurrency (-c)

Number of clients to simulate for query to run.


File or string to use create tables.


Schema to run tests in.


Generate CSV output to named file or to stdout if no file is named.

--debug (-#)

This is a non-debug version. Catch this and exit.


Check memory and open file usage at exit.

--debug-info (-T)

Print some debug info at exit.


Default authentication client-side plugin to use.


Read this file after the global files are read.


Only read default options from the given file #.


Additionally read default groups with # appended as a suffix.

--delimiter (-F)

Delimiter to use in SQL statements supplied in file or command line.


Detach (close and reopen) connections after X number of requests.

--engine (-e)

Comma separated list of storage engines to use for creating the table. The test is run for each engine. You can also specify an option for an engine after a `:', like memory:max_row=2300

--help (-?)

Display this help and exit.

--host (-h)

Connect to host.


SQL Command to execute when connecting to MariaDB server. Will automatically be re-executed when reconnecting.

--iterations (-i)

Number of times to run the tests.


Don't read default options from any option file.


Do not drop the schema after the test.

--number-char-cols (-x)

Number of VARCHAR columns to create in table if specifying --auto-generate-sql.

--number-int-cols (-y)

Number of INT columns to create in table if specifying --auto-generate-sql.


Limit each client to this number of queries (this is not exact).


Do not connect to the databases, but instead print out what would have been done.

--password (-p)

Password to use when connecting to server. If password is not given it's asked from the tty.


Directory for client-side plugins.

--port (-P)

Port number to use for connection.


Query to run or file containing query to execute after tests have completed.


system() string to execute after tests have completed.


Query to run or file containing query to execute before running tests.


system() string to execute before running tests.


Print the program argument list and exit.


The protocol to use for connection (tcp, socket, pipe).

--query (-q)

Query to run or file containing query to run.

--silent (-s)

Run program in silent mode - no output.

--socket (-S)

The socket file to use for connection.


Enable SSL for connection (automatically enabled with other flags). (Defaults to on; use --skip-ssl to disable.)


CA file in PEM format (check OpenSSL docs, implies --ssl).


CA directory (check OpenSSL docs, implies --ssl).


X509 cert in PEM format (implies --ssl).


SSL cipher to use (implies --ssl).


Certificate revocation list (implies --ssl).


Certificate revocation list path (implies --ssl).


X509 key in PEM format (implies --ssl).


Verify server's "Common Name" in its cert against hostname used when connecting. This option is disabled by default.


TLS protocol version for secure connection.

--user (-u)

User for login if not current user.

--verbose (-v)

More verbose output; you can use this multiple times to get even more verbose output.

--version (-V)

Output version information and exit.

To see options supported in other versions, see "mariadb-slap & mysqlslap Options by MariaDB Server Version".