Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions

  




 

 

8.14. mysqlslap — Load Emulation Client

mysqlslap is a diagnostic program designed to emulate client load for a MySQL server and to report the timing of each stage. It works as if multiple clients are accessing the server. mysqlslap is available as of MySQL 5.1.4.

Invoke mysqlslap like this:

shell> mysqlslap [options]

mysqlslap supports the following options:

  • --help, -?

    Display a help message and exit.

  • --auto-generate-sql, -a

    Generate SQL statements automatically when they are not supplied in files or via command options.

  • --compress, -C

    Compress all information sent between the client and the server if both support compression.

  • --concurrency, -c

    The number of clients to simulate when issuing the SELECT statement.

  • --create=value

    The file or string to use for creating the table.

  • --create-schema=value

    The schema in which to run the tests. This option was added in MySQL 5.1.5.

  • --csv[=file]

    Generate output in comma-separated values format. The output goes the the named file, or to the standard output if no file is given. This option was added in MySQL 5.1.5.

  • --debug[=debug_options], -# [debug_options]

    Write a debugging log. The debug_options string often is 'd:t:o,file_name'.

  • --delimiter=str, -F str

    The delimiter to use in SQL statements supplied in files or via command options.

  • --engine=engine_name, -e engine_name

    The storage engine to use for creating the table.

  • --host=host_name, -h host_name

    Connect to the MySQL server on the given host.

  • --iterations=N, -i N

    The number of times to run the tests.

  • --lock-directory=path

    The directory to use for storing locks. This option was added in MySQL 5.1.5.

  • --number-char-cols=N, -x N

    The number of VARCHAR columns to use if --auto-generate-sql is specified.

  • --number-int-cols=N, -y N

    The number of INT columns to use if --auto-generate-sql is specified.

  • --number-of-queries=N

    Limit each client to approximately this number of queries. This option was added in MySQL 5.1.5.

  • --only-print

    Do not connect to databases. mysqlslap only prints what it would have done. This option was added in MySQL 5.1.5.

  • --password[=password], -p[password]

    The password to use when connecting to the server. If you use the short option form (-p), you cannot have a space between the option and the password. If you omit the password value following the --password or -p option on the command line, you are prompted for one.

    Specifying a password on the command line should be considered insecure. See Section 5.8.6, “Keeping Your Password Secure”.

  • --port=port_num, -P port_num

    The TCP/IP port number to use for the connection.

  • --protocol={TCP|SOCKET|PIPE|MEMORY}

    The connection protocol to use.

  • --preserve-schema

    Preserve the schema from the mysqlslap run. This option was added in MySQL 5.1.5.

  • --query=value, -q value

    The file or string containing the SELECT statement to use for retrieving data.

  • --silent, -s

    Silent mode. No output.

  • --skip-query, -Q

    Don't run any SELECT statements.

  • --slave

    Follow master locks for other mysqlslap clients. Use this option if you are trying to synchronize around onem master server with --lock-directory plus NFS. This option was added in MySQL 5.1.5.

  • --socket=path, -S path

    For connections to localhost, the Unix socket file to use, or, on Windows, the name of the named pipe to use.

  • --use-threads

    On Unix, the default is to use fork() calls. This option causes pthread calls to be used instead. On Windows, the default is to use pthread calls and the option has no effect. This option was added in MySQL 5.1.6.

  • --user=user_name, -u user_name

    The MySQL username to use when connecting to the server.

  • --verbose, -v

    Verbose mode. Print more information about what the program does.

  • --version, -V

    Display version information and exit.


 
 
  Published under the terms of the GNU General Public License Design by Interspire