mariadb-slap & mysqlslap for MariaDB Enterprise Server 10.3

Overview

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

MariaDB Enterprise Server 10.3 does not provide a symbolic link to the utility's new name (mariadb-slap), so the legacy name must be used.

mysqlslap Options for MariaDB Enterprise Server 10.3

Option

Description

--auto-generate-sql (-a)

Generate SQL where not supplied by file or command line.

--auto-generate-sql-add-autoincrement

Add an AUTO_INCREMENT column to auto-generated tables.

--auto-generate-sql-execute-number

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

--auto-generate-sql-guid-primary

Add GUID based primary keys to auto-generated tables.

--auto-generate-sql-load-type

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

--auto-generate-sql-secondary-indexes

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

--auto-generate-sql-unique-query-number

Number of unique queries to generate for automatic tests.

--auto-generate-sql-unique-write-number

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

--auto-generate-sql-write-number

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

--character-sets-dir

Directory for character set files.

--commit

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.

--create

File or string to use create tables.

--create-schema

Schema to run tests in.

--csv

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.

--debug-check

Check memory and open file usage at exit.

--debug-info (-T)

Print some debug info at exit.

--default-auth

Default authentication client-side plugin to use.

--defaults-extra-file

Read this file after the global files are read.

--defaults-file

Only read default options from the given file #.

--defaults-group-suffix

Additionally read default groups with # appended as a suffix.

--delimiter (-F)

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

--detach

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.

--init-command

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

--iterations (-i)

Number of times to run the tests.

--no-defaults

Don't read default options from any option file.

--no-drop

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.

--number-of-queries

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

--only-print

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.

--plugin-dir

Directory for client-side plugins.

--port (-P)

Port number to use for connection.

--post-query

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

--post-system

system() string to execute after tests have completed.

--pre-query

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

--pre-system

system() string to execute before running tests.

--print-defaults

Print the program argument list and exit.

--protocol

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

--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.

--ssl

Enable SSL for connection (automatically enabled with other flags).

--ssl-ca

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

--ssl-capath

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

--ssl-cert

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

--ssl-cipher

SSL cipher to use (implies --ssl).

--ssl-crl

Certificate revocation list (implies --ssl).

--ssl-crlpath

Certificate revocation list path (implies --ssl).

--ssl-key

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

--ssl-verify-server-cert

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

--tls-version

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".