Install and use sysbench

Source: Internet
Author: User

Sysbench is an open-source multi-threaded performance testing tool that can perform performance tests on CPU, memory, thread, IO, and database. Currently, the database supports MySQL, Oracle, and PostgreSQL installation (rhel5.8 + mysql5.5). errors are constantly reported during the installation process. Refer to a large number of online materials and you will only get this done one morning. Prepare the environment and install related software packages, mount the optical drive and configure yummount-o loop/data/rhel-server-5.9-x86_64-dvd.iso/mnt/cdrom to configure yumvi/etc/yum. repos. d/rhel58.repo [Server] name = rhel58serverbaseurl = file:///mnt/cdrom/Server/enable=1gpcheck=1gpgkey=file:///mnt/cdrom/Server/RPM-GPG-KEY-redhat-release2 To install related software packages. Otherwise, an error may be reported (note that mysql-devel must be installed) yum install automakeyum install libtoolyum install zlibyum install gccyum install gcc glibc-devel glibc-headers glibc-kernheaders 3, install A, decompress the tar zxvf sysbench-0.4.8.tar.gzb, and modify the configuration file vi configure. ac # Checks for programs. AC_PROG_CC # AC_PROG_LIBTOOLAC_PROG_RANLIBAX_CHECK_DOCBOOKC. Execute the following commands respectively ,. /autogen. sh. /configure -- with-mysql-connector des =/usr/include/mysql \ -- with-mysql-lib S =/usr/lib64/mysql \ LDFLAGS = '-ld' makemakeinstall Problems 1. copy config. guess and config. sub from/usr/share/libtool to current directory, then. /configure 2, error: client_plugin.c: 178: undefined reference to 'dlclose' sysbench problem. /config command Add LDFLAGS = '-ld' parameter specific test method 1. cpu Performance test sysbench -- test = cpu -- cpu-max-prime = 20000 run cpu test is mainly for prime numbers addition operation, in the preceding example, the maximum prime number is 20000. You can adjust the value based on the cpu performance. 2. thread test sysbench -- test = threads -- num-threads = 64 -- thread-yields = 100 -- thread-locks = 2 run 3. Disk IO Performance test sysbench -- test = fileio -- num-threads = 16 -- file-total-size = 3G -- file-test-mode = rndrw preparesysbench -- test = fileio -- num-threads = 16 -- file-total-size = 3G -- file-test-mode = rndrw runsysbench -- test = fileio -- num-threads = 16 -- file-total-size = 3G -- file-test-mode = rndrw cleanup the parameter specifies a maximum of 16 threads to be created, the total size of the created file is 3 GB. The read/write mode is random read. 4. In the memory test, sysbench -- test = memory -- memory-block-size = 8 k -- memory-total-size = 4G run. The preceding parameter specifies that the entire test process is in the memory. transmit 4 GB of data, the size of each block is 8 KB. 5. test sysbench -- test = OLTP -- mysql-table-engine = innodb -- mysql-user = root -- db-driver = mysql -- mysql-db = sbtest -- oltp-table- size = 30000000 -- oltp-table-name = t2 -- oltp-nontrx-mode = insert -- mysql-socket =/var/lib/mysql. sock preparesysbench -- test = oltp -- mysql-table-engine = innodb -- mysql-user = root -- db-driver = mysql -- mysql-db = sbtest -- oltp-table-size = 30000000 -- oltp-table-name = t1 -- mysql-socket =/var/lib/mysql. sock run

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.