# mysql-stress-test.pl

## NAME



           mariadb-stress-test.pl - server stress test program
    


## SYNOPSIS



    
           **mariadb-stress-test.pl [**_options_**]**
    


## DESCRIPTION



           The **mariadb-stress-test.pl** Perl script performs stress-testing of
           the MariaDB server.
    
           **mariadb-stress-test.pl** requires a version of Perl that has been
           built with threads support.
    
           Invoke **mariadb-stress-test.pl** like this:
    
               shell> **mariadb-stress-test.pl [**_options_**]**
    
           **mariadb-stress-test.pl** supports the following options:
    
           •   **--help**
    
               Display a help message and exit.
    
           •   **--abort-on-error=**_N_
    
               Causes 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-file**
    
               Periodically 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.
    
           •   **--cleanup**
    
               Force cleanup of the working directory.
    
           •   **--log-error-details**
    
               Log error details in the global error log file.
    
           •   **--loop-count=**_N_
    
               In sequential test mode, the number of loops to execute before
               exiting.
    
           •   **--mariadb-test=**_path_
    
               The path name to the **mariadb-test** program.
    
           •   **--server-database=**_db_name_
    
               The database to use for the tests. The default is test.
    
           •   **--server-host=**_host_name_
    
               The 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=**_path_
    
               This 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=**_password_
    
               The password to use when connecting to the server.
    
           •   **--server-port=**_port_num_
    
               The TCP/IP port number to use for connecting to the server.
               The default is 3306.
    
           •   **--server-socket=**_file_name_
    
               For connections to localhost, the Unix socket file to use, or,
               on Windows, the name of the named pipe to use. The default is
               /tmp/mariadb.sock.
    
           •   **--server-user=**_user_name_
    
               The MariaDB user name to use when connecting to the server.
               The default is root.
    
           •   **--sleep-time=**_N_
    
               The delay in seconds between test executions.
    
           •   **--stress-basedir=**_path_
    
               This option is required.  _path_ is the working directory for
               the test run. It is used as the temporary location for result
               tracking during testing.
    
           •   **--stress-datadir=**_path_
    
               The 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=**_mode_
    
               This 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=**_path_
    
               This option is required.  _path_ is 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
               _file_name_ is omitted, the default file is stress-test.txt in
               the stress suite directory. (See **--stress-suite-basedir**.)
    
           •   **--suite=**_suite_name_
    
               Run the named test suite. The default name is main (the
               regular test suite located in the mariadb-test directory).
    
           •   **--test-count=**_N_
    
               The number of tests to execute before exiting.
    
           •   **--test-duration=**_N_
    
               The duration of stress testing in seconds.
    
           •   **--threads=**_N_
    
               The number of threads. The default is 1.
    
           •   **--verbose**
    
               Verbose mode. Print more information about what the program
               does.
    


* * *