RHEL6Sysbench performance test

Source: Internet
Author: User
Tags ranges
Sysbench is an open-source multi-threaded performance testing tool that can perform performance tests on CPU, memory, thread, IO, and database. The database currently supports MySQL, Oracle, and PostgreSQL. This article only briefly demonstrates the usage of several tests. Specific parameter settings must be adjusted according to different test requirements. Test Environment Ø DELLr310PCServerMEM: 16GRAID0: 500G Ø sysbench is an open-source multi-threaded performance testing tool that can perform performance tests on CPU, memory, thread, IO, and database. The database currently supports MySQL, Oracle, and PostgreSQL. This article only briefly demonstrates the usage of several tests. Specific parameter settings must be adjusted according to different test requirements. Test Environment Ø DELL r310 PC Server MEM: 16G RAID0: 500G Ø RHEL6.1 X86_64 Ø sysbench-0.4.12 compilation and Installation
#Wget http://sourceforge.net/projects/sysbench/files/latest/download#Tar zxvf sysbench-0.4.12.tar.gz#Cd sysbench-0.4.12#./Configure \-- With-mysql-nodes des =/usr/local/mysql/include /\-- With-mysql-libs =/usr/local/mysql/lib/#Make & make install
To test Oracle/PostgreSQL, add the -- with-oracle or -- with-pgsql parameter to configure.
#SysbenchTest Case: sysbench [general-options]… -Test = [Test-options]… Command common options: -- num-threads = N number of test threads created. The default value is 1. -- max-requests = N. The default value is limit. 0 indicates no limit. -- Max-time = N maximum execution time, in seconds. The default value is 0. -- Forced-shutdown = STRING is forcibly interrupted when the value of max-time is exceeded. The default value is off. -- Thread-stack-size = SIZE the stack size of each thread. The default value is 32 KB. -- Init-rng = [on | off] whether to initialize the random number generator at the beginning of the test. The default value is off. -- Test = STRING specifies the name of the test project. -- Debug = [on | off]: whether to display more debugging information. The default value is off. -- Validate = [on | off] perform a verification check if possible. The default value is off. Test Project: fileio-File I/O testcpu-CPU performance testmemory-Memory functions speed testthreads-Threads subsystem performance testmutex-Mutex performance test (Mutex performance test) oltp-OLTP test ( Online Transaction Processing System) Command: prepare (preparations before test) run (formal test) cleanup (delete test data after test) help versionSee 'sysbench-test = Help 'for a list of options for each test. view more options for each test item.
 
#./Sysbench-test = fileio help-- File-num = N: Number of test files created. The default value is 128 -- file-block-size = N. The default value is 16384 (16 K) -- file-total-size = SIZE. The default value is 2 GB -- file-test-mode = STRING file test mode {seqwr (sequential write), seqrewr (sequential read/write), seqrd (sequential read), rndrd (random read ), rndwr (random write), rndrw (random read/write)} -- file-io-mode = STRING file operation mode {sync (synchronous), async (asynchronous ), faw.map (fast map ing), slowmmap (slow map ing )}. The default value is sync -- file-extra-flags = STRING. The extra sign is used to open the file {sync, dsync, direct }. The default value is null. -- file-fsync-freq = N: the frequency at which fsync () is executed. (0-do not use fsync ()). The default value is 100 -- file-fsync-all = [on | off] fsync is executed every time a write operation is executed. The default value is off -- file-fsync-end = [on | off]. fsync is executed at the end of the test. The default value is on -- file-fsync-mode = STRING. which method is used for synchronization? {fsync, fdatasync }. The default value is fsync -- file-merged-requests = N. If yes, the maximum number of I/O requests to be merged (0 indicates that the request is not merged ). The default value is 0 -- file-rw-ratio = N. The default value is 1.5.
 
#Sysbench -- test = cpu help-- Cpu-max-prime = N maximum number of prime generators. The default value is 10000.
 
#Sysbench -- test = memory help-- Memory-block-size = SIZE: the size of the memory block during the test. The default value is 1 K -- memory-total-size = SIZE. The default value is 100 GB -- memory-scope = STRING memory access range {global, local }. The default value is global -- memory-hugetlb = [on | off. The default value is off -- memory-memory = STRING memory operation type. {Read, write, none}: The default value is write -- memory-access-mode = STRING memory access mode {seq, rnd}. The default value is seq.
 
#Sysbench -- test = threads help-- Thread-yields = N: The number of threads each request generates. The default value is 1000 -- thread-locks = N. The number of locks for each thread. The default value is 8.
 
#Sysbench -- test = mutex help-- Mutex-num = the total size of the N Array mutex. The default value is 4096 -- mutex-locks = N. The number of mutex locks for each thread. The default value is 50000 -- mutex-loops = N. The number of empty cycles of internal mutex locks. The default value is 10000.
 
#Sysbench -- test = oltp helpOltp options: -- oltp-test-mode = STRING Execution mode {simple, complex (advanced transactional), nontrx (non-transactional), sp }. The default value is complex -- oltp-reconnect-mode = STRING reconnect mode {session (reconnect is not used. Each thread is disconnected only at the end of the test), transaction (reconnect after each transaction ends), and query (reconnect after each SQL statement is executed ), random (select the above reconnection mode randomly for each transaction )}. The default value is session -- oltp-sp-name = STRING stored procedure name. The default value is null. -- oltp-read-only = [on | off] read-only mode. The Update, delete, and insert statements cannot be executed. The default value is off -- oltp-skip-trx = [on | off]. The begin/commit statement is omitted. The default value is off -- oltp-range-size = N. Default Value: 100 -- oltp-point-selects = N number of point selects [10] -- oltp-simple-ranges = N number of simple ranges [1] -- oltp-sum-ranges = N number of sum ranges [1] -- oltp-order-ranges = N number of ordered ranges [1] -- oltp-distinct-ranges = N number of distinct ranges [1] -- oltp -index-updates = N number of index update [1] -- oltp-non-index-updates = N number of non-index updates [1] -- oltp-nontrx-mode = STRING query type for non-transaction execution mode {Select, update_key, update_nokey, insert, delete} [select] -- whether oltp-auto-inc = [on | off] AUTO_INCREMENT is enabled. The default value is on -- oltp-connect-delay = N. The default value is 10000 -- oltp-user-delay-min = N. The shortest waiting time for each request. The Unit is ms. The default value is 0 -- oltp-user-delay-max = N. The maximum waiting time for each request. The Unit is ms. The default value is 0 -- oltp-table-name = STRING. The default value is sbtest -- oltp-table-size = N. The number of records in the test table. The default value is 10000 -- oltp-dist-type = Random Number of STRING distribution {uniform (uniform distribution), Gaussian (Gaussian distribution), special (spatial distribution )}. The default value is special -- oltp-dist-iter = N. The default value is 12 -- the percentage of oltp-dist-pct = N is considered as 'special '(for special distribution ). The default value is 1 -- percentage of oltp-dist-res = N 'special. The default value is 75 General database options: -- db-driver = STRING. Specify the database driver ('help' to get list of available drivers) -- db-ps-mode = STRING report usage mode {auto, disable} [auto] Compiled-in database drivers: -- mysql-MySQL drivermysql options: -- mysql-host = [LIST,...] mySQL server host [localhost] -- mysql-port = N MySQL server port [3306] -- mysql-socket = STRING MySQL socket -- mysql-user = STRING MySQL user [sbtest] -- mysql- password = STRING MySQL password [] -- mysql-db = STRING MySQL database name [sbtest] -- mysql-table-engine = STRING storage engine to use for the test table {myisam, innodb, bdb, heap, ndbcluster, federated} [innodb] -- mysql-engine-trx = STRING whether storage engine used is transactional or not {yes, no, auto} [auto] -- mysql-ssl = [on | off] use SSL connections, if available in the client library [off] -- myisam-max-rows = N max-rows parameter for MyISAM tables [1000000] -- mysql-create-options = STRING additional options passed to CREATE TABLE []
 
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.