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

mariadb-stress-test

MariaDB starting with 10.4.6

From MariaDB 10.4.6, mariadb-stress-test is a symlink to mysql-stress-test, the script for assisting with adding users or databases or changing passwords in MariaDB.

MariaDB starting with 10.5.2

From MariaDB 10.5.2, mysql-stress-test is the symlink, and mariadb-stress-test the binary name.

Contents

  1. Syntax
  2. Options

mariadb-stress-test.pl is a Perl script that performs stress-testing of the MariaDB server. It requires a version of Perl that has been built with threads support.

Syntax

mariadb-stress-test.pl [options]

Options

OptionDescription
--helpDisplay a help message and exit.
--abort-on-error=NCauses the program to abort if an error with severity less than or equal to N was encountered. Set to 1 to abort on any error.
--check-tests-filePeriodically check the file that lists the tests to be run. If it has been modified, reread the file. This can be useful if you update the list of tests to be run during a stress test.
--cleanupForce cleanup of the working directory.
--log-error-detailsLog error details in the global error log file.
--loop-count=NIn sequential test mode, the number of loops to execute before exiting.
--mysqltest=pathThe path name to the mysqltest program.
--server-database=db_nameThe database to use for the tests. The default is test.
--server-host=host_namehe host name of the local host to use for making a TCP/IP connection to the local server. By default, the connection is made to localhost using a Unix socket file.
--server-logs-dir=pathThis option is required. path is the directory where all client session logs will be stored. Usually this is the shared directory that is associated with the server used for testing.
--server-password=passwordThe password to use when connecting to the server.
--server-port=port_numThe TCP/IP port number to use for connecting to the server. The default is 3306.
--server-socket=file_nameFor connections to localhost, the Unix socket file to use, or, on Windows, the name of the named pipe to use. The default is /tmp/mysql.sock.
--server-user=user_nameThe MariaDB user name to use when connecting to the server. The default is root.
--sleep-time=NThe delay in seconds between test executions.
--stress-basedir=pathThis option is required and specified the path is the working directory for the test run. It is used as the temporary location for result tracking during testing.
--stress-datadir=pathThe directory of data files to be used during testing. The default location is the data directory under the location given by the --stress-suite-basedir option.
--stress-init-file[=path]file_name is the location of the file that contains the list of tests to be run once to initialize the database for the testing. If missing, the default file is stress_init.txt in the test suite directory.
--stress-mode=modeThis option indicates the test order in stress-test mode. The mode value is either random to select tests in random order or seq to run tests in each thread in the order specified in the test list file. The default mode is random.
--stress-suite-basedir=pathThis option is required and specifies the directory that has the t and r subdirectories containing the test case and result files. This directory is also the default location of the stress-test.txt file that contains the list of tests. (A different location can be specified with the --stress-tests-file option.)
--stress-tests-file[=file_name]Use this option to run the stress tests. file_name is the location of the file that contains the list of tests. If omitted, the default file is stress-test.txt in the stress suite directory. (See --stress-suite-basedir.)
--suite=suite_nameRun the named test suite. The default name is main (the regular test suite located in the mysql-test directory).
--test-count=NThe number of tests to execute before exiting.
--test-duration=NThe duration of stress testing in seconds.
--threads=NThe number of threads. The default is 1.
--verboseVerbose mode. Print more information about what the program does
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.