Testing IO with SLOB
We recently purchased a new database server. We ran a performance test which our brilliant testing team have put together and found out the system with the new server was slightly slower than the system with the old one. The testing team was happy that the test was a pass - the users wouldn’t notice the difference. However, new servers are supposed to be quicker than old ones, so I was disappointed. I investigated a little further, and found that the AWR report showed there were more waits on IO on the new hardware than on the old.
Since I had identified IO to be the problem, I thought it would be worth having a repeatable test to run on old and new hardware to have some figures to report back to our sysadmins. It is really nice to have hard numbers to report back. A lot of people seem to use SLOB.
Setting SLOB up
First of all SLOB has to be downloaded. Unzip the tar file somewhere convenient - on the database server if possible. It took me a while to work out how to get started. There is a lot that can be configured, but very little that needs to be. Here is what seems to me to be the bare minimum to get up and running.
Edit slob.conf.
I set the following:
Because I am connecting as sysdba on the database server, I can connect / as sysdba
.
If I left user blank it defaulted to system. Also I found I couldn’t have a leading
space in the password field. So connect sys/sys as sysdba
works just as well.
I used AWR as we have a tuning and diagnostics pack license.
If you want to use statspack, you have to install it.
Create the Tablespace
I also edited the misc/ts.sql
script as follows:
|
|
and ran it.
Create the Schemas
Now run setup with 8 schemas. I chose 8 because that is what is in the documentation, so presumably works OK.
|
|
Compile the wait kit
This is required for the tests to work.
Running it
Now run the benchmark with a parameter of 8 for the 8 schemas created earlier.
|
|
Test cases
The diagnostic files are left in the current directory. So after each run, I found it convenient to create a directory and copy the reports into it:
Troubleshooting
I did run into an issue where SLOB wouldn’t create an AWR report on a newly cloned database. This is because the code to identify the snapshot assumes all snapshots are for the current database, so just takes the one with the highest ID, which was for the old database. I fixed this by changing line 587 of runit.sh from
|
|
to
|
|