sysbench的安装与使用 分享_MySQL
bitsCN.com
安装过程(rhel5.8+mysql5.5)
安装过程中不断报错,参考了众多网上资料,一上午时间才搞定
1, 环境准备,安装相关软件包,挂载光驱,配置yum
mount -o loop /data/rhel-server-5.9-x86_64-dvd.iso /mnt/cdrom
配置yum
vi /etc/yum.repos.d/rhel58.repo
[Server]
name=rhel58server
baseurl=file:///mnt/cdrom/Server/
enable=1
gpcheck=1
gpgkey=file:///mnt/cdrom/Server/RPM-GPG-KEY-redhat-release
2, 安装相关软件包,要不可能会报错(注意要安装mysql-devel)
yum install automake
yum install libtool
yum install zlib
yum install gcc
yum install gcc glibc-devel glibc-headers glibc-kernheaders
3, 正式安装
A,解压缩
tar zxvf sysbench-0.4.8.tar.gz
b,修改配置文件
vi configure.ac
# Checks for programs.
AC_PROG_CC
#AC_PROG_LIBTOOL
AC_PROG_RANLIB
AX_CHECK_DOCBOOK
C,分别执行如下命令,
./autogen.sh
./configure --with-mysql-includes=/usr/include/mysql /
--with-mysql-libs=/usr/lib64/mysql /
LDFLAGS='-ldl'
make
makeinstall
安装中的相关问题
1,copy config.guess and config.sub from /usr/share/libtool to current directory, then ./configure
2,报错:报错client_plugin.c:178: undefined reference to `dlclose' sysbench的问题
./config 命令添加LDFLAGS='-ldl'参数
具体测试方法
1、cpu性能测试
sysbench --test=cpu --cpu-max-prime=20000 run
cpu测试主要是进行素数的加法运算,在上面的例子中,指定了最大的素数为 20000,自己可以根据机器cpu的性能来适当调整数值。
2、线程测试
sysbench --test=threads --num-threads=64 --thread-yields=100 --thread-locks=2 run
3、磁盘IO性能测试
sysbench --test=fileio --num-threads=16 --file-total-size=3G --file-test-mode=rndrw prepare
sysbench --test=fileio --num-threads=16 --file-total-size=3G --file-test-mode=rndrw run
sysbench --test=fileio --num-threads=16 --file-total-size=3G --file-test-mode=rndrw cleanup
上述参数指定了最大创建16个线程,创建的文件总大小为3G,文件读写模式为随机读。
4、内存测试
sysbench --test=memory --memory-block-size=8k --memory-total-size=4G run
上述参数指定了本次测试整个过程是在内存中传输 4G 的数据量,每个 block 大小为 8K。
5、OLTP测试
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/mysql.sock prepare
sysbench --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/mysql.sock runbitsCN.com

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

1. Move the mouse to the computer, and then right-click to select the management item, as shown in the figure: 2. After opening the computer management item, we see the function options on the left, click to select the Services and Applications item, such as As shown in the figure: 3. Next, we need to select the service item on the right and double-click to open it, as shown in the figure: 4. After opening the service item, we need to find the service item ShellHardwareDetection, as shown in the figure: 5. Move the mouse to On the service item, then right-click and select Properties, as shown in the figure: 6. After opening the properties, change the startup type to Disabled, then click Apply - OK, save, and it is OK, as shown in the figure: win7 optical drive automatically The pop-up solution is shared here in detail for users. More

How to mount an optical drive in Linux if you want to mount it? Let’s take a look at the detailed tutorial below. 1. First create a normal directory. 2. Next, find the optical drive hardware device. 3. Finally, connect the normal directory with the CD-ROM drive.

There are many ways to install software in Linux systems, so there is no universal method to check whether a certain software has been installed. However, below I have summarized some types for your reference: 1. For rpm package installation, you can use rpm -qa sees that if you want to find out whether a certain software package is installed, use rpm-qa|grep "the name of the software or package". rpm-qa|grepruby2, installed with deb package, can be seen with dpkg-l. If you are looking for a specified software package, use dpkg-l|grep "the name of the software or package"; if you install it using dpkg-l|grepruby3 or yum method, you can use yuml

Here is a detailed tutorial for installing GCC (GNUCompilerCollection) on Linux systems: Update package list: Execute the following command in the terminal to ensure that the package list of your system is up to date: sudoaptupdate Install GCC: Continue executing the following in the terminal Command to install GCC and its related tools: sudoaptinstallbuild-essentialbuild-essential is a package that contains GCC and other build tools that will meet most basic compilation needs. Verify installation: Once the installation is complete, you can verify that GCC was installed successfully. Execute the following command in the terminal to check the version of GCC

In Linux systems, querying software package information is a very common and practical operation, especially when installing, uninstalling, and updating software packages. By querying software package information, we can understand important information such as the version, dependencies, and installation paths of the software package, helping us manage the system more efficiently. This article will introduce several ways to easily master querying software package information under Linux systems, and provide specific code examples. Use apt command (for Debian and Ubuntu systems) in Debian and Ubun

What should I do if the optical drive cannot be used after the win10 system upgrade? As the usage rate of computers is getting higher and higher, we may sometimes encounter the problem that the optical drive cannot be used after the win10 system upgrade. If we encounter the problem that the optical drive cannot be used after the win10 system upgrade Question, how to deal with the problem that the optical drive cannot be used after the win10 system upgrade? Let’s take a look at the detailed solution to the problem that the optical drive cannot be used after the win10 system is upgraded. After the system is upgraded to Windows 10-10586 version, after running for a period of time, the optical drive cannot be used, and the optical drive symbol disappears in the resource manager. Enter the device manager. In the device processor, we cannot see the DVD/CD-ROM drive device. Click [View]-[Show hidden devices]

Everyone may be familiar with yum in Linux systems, but beginners may not know it. This article will introduce what yum is and its functions. Please read on. In Linux, yum is a package manager used to manage and install software packages. It is the abbreviation of YellowdogUpdater, Modified. It was originally designed for the RedHat series of distributions, but is now also used by many other RPM-based Linux distributions. The main functions of the YUM command include: YUM is a software package management tool that can be used to find, install, update and uninstall software packages. Through the YUM command, users can easily manage software packages on the system and automatically resolve differences between software packages.

How to solve the problem of automatic ejection of optical drive in Win7 system. In Win7 system, the problem of automatic ejection of optical drive sometimes occurs. This problem may cause trouble to users. But, don't worry, this problem can be solved. First, we need to understand the reason why the optical drive automatically ejects. Usually, this problem may be caused by some software or driver conflicts in the system. So, the key to solving this problem is to find out the specific cause. One possible solution is to check the software and drivers installed on your system to see if there are some incompatible or conflicting programs. If so, you can try uninstalling these programs and restarting your computer to see if the problem is resolved. Also, you can try updating the drivers in your system
