An Auto-starting vdbench Load Tester
I have recently been testing the performance of some SANs and I wanted to come up with a way to produce an environment where I could replicate close to day to day operations. I decided to come up with a template that I could deploy to multiple VMs and emulate real IOs on the virtualised environment and thus test out the SANs performance.
The tools were simple:
- An Operating System: CentOS 5.8 x64
- A IO generating tool: vdbench 5.02
Install some required packages
yum install java
Set the directory Structure
cd /root
mkdir vdbench
cd vdbench
Get vdbench
wget http://sourceforge.net/projects/vdbench/files/vdbench502.tar/download
Extract the TAR file
tar xvf vdbench502.tar
Create Paramater file
vim <your_param_filename>
Sample Parameters
sd=sd1,lun=/tmp/200MB_file.bin,size=200MB
wd=wd1,sd=sd1,xf=4k,seekpct=100,readpct=80
rd=rd1,wd=wd1,iorate=5000,elapsed=30,interval=1,forthreads=4
The Parameter file is made up of 3 section
- Storage Definition – Identifies each physical or logical volume or file system file to be used
- Workload Definition – Defines what kind of workload will be executed using the storage definitions listed above
- Run Definition – Defines what I/O rate to be generated, and how long the workload will run
Test the param file
/root/vdbench/vdbench -f /root/vdbench/params/<your_param_filename>
Turn off unwanted services
chkconfig sendmail off
chkconfig yum-updatesd off
chkconfig bluetooth off
chkconfig iptables off
chkconfig ip6tables off
chkconfig snmpd off
chkconfig smartd off
chkconfig firstboot off
chkconfig iscsi off
chkconfig iscsid off
chkconfig ntpd off
Set SELinux to disabled
vim /etc/selinux/config
Set
SELINUX=disabled
Create StartUp Script
cd /etc/init.d
vim <startup_script_name>
Set Script Attributes
chmod +x <startup_script_name>
Start Script for Starting vdbench
#!/bin/bash
/root/vdbench/vdbench -l -f /root/vdbench/params/<params_filename> >/dev/
null
&
Create Link for the Script to start on Boot in init 3
cd /etc/rc3.d
ln -s ../init.d/<statup_script_name> S99<YourscriptLabel>
And that should be it. Reboot your VM and you will have vdbench start automatically.
Hosting Options & Info | VPS | Web Solutions & Services |
---|---|---|
-
Henk Vandenbergh