SLOB Sustained Throughput Test: Preparing The Test

slob ghostThis page is part of a process for running a sustained throughput test using Oracle SLOB. If you stumbled across this by accident, you can start at the beginning here.

For this example, I’m starting with a fresh Oracle Linux 6 Update 5 installation. I’ve already installed Oracle Grid Infrastructure and configured my storage to appear via Linux multipathing. I’m also using Oracle’s ASMLib kernel library. As a result I have a 2TB ASM diskgroup which I’ve imaginatively called +DATA (I’m not going to bother with a fast recovery area):

[oracle@server4 ~]$ cat /etc/oracle-release
Oracle Linux Server release 6.5
[oracle@server4 ~]$ uname -r
[oracle@server4 ~]$ asmcmd
ASMCMD> lsdg
State    Type    Rebal  Sector  Block        AU  Total_MB  Free_MB  Name
MOUNTED  EXTERN  N         512   4096  67108864   2097152  2095616  DATA/

I have also already installed Oracle Database and build an empty database called (equally imaginatively) ORCL. You don’t particularly need to do anything special when you create the database, because once you have it up and running we will make some changes via the parameter file and then install SLOB.

You do, however, need to make sure you have plenty of redo log space – something you can tackle after database creation if you wish to avoid the clunky DBCA or OUI redo log options. I’ve created ten online redo logs, each sized 1GB. I’m running on a flash system so I’ve used a blocksize of 4k for the logs, which means setting the underscore parameter _disk_sector_size_override=TRUE as per the following My Oracle Support:

Using 4k Redo Logs on Flash and SSD-based Storage (Doc ID 1681266.1)

If you want to know more about the background of using a 4k blocksize on flash, read here.

So here we go creating the log files:

SQL> alter system set "_disk_sector_size_override"=TRUE scope=both;

System altered.

SQL> alter database add logfile group 1 size 1G blocksize 4k;

Database altered.

I’ll do that another nine times and now I have a full compliment of ten logs:

SQL> select group#, thread#, bytes/1024/1024 as MB, blocksize from v$log;

---------- ---------- ---------- ----------
	 1	    1	    1024       4096
	 2	    1	    1024       4096
	 3	    1	    1024       4096
	 4	    1	    1024       4096
	 5	    1	    1024       4096
	 6	    1	    1024       4096
	 7	    1	    1024       4096
	 8	    1	    1024       4096
	 9	    1	    1024       4096
	10	    1	    1024       4096

10 rows selected.

Next up I need to create the tablespace which will contain the SLOB data. I’m going with convention and calling this IOPS, so here goes:

SQL> create bigfile tablespace IOPS datafile size 1100G;

Tablespace created.

We are also going to need a whole lot of temporary tablespace:

SQL> alter tablespace temp add tempfile size 30G;

Tablespace altered.

SQL> alter tablespace temp add tempfile size 30G;

Tablespace altered.

SQL> alter tablespace temp add tempfile size 30G;

Tablespace altered.

SQL> alter tablespace temp add tempfile size 30G;

Tablespace altered.

Finally, I need to configure the database instance for use with SLOB. Let’s create a PFILE first:

SQL> create pfile='/home/oracle/orcl.ora' from spfile;

File created.

Now we can edit it to look like this:

*.control_files='+DATA/orcl/controlfile/current.261.852997535' # Change this!

Remember that the CONTROL_FILES parameter will need to be correct for your system or it will be a real short test. If you are wondering about the first three underscore parameters then read this post by my buddy Yury. I’m using the USE_LARGE_PAGES=ONLY parameter to ensure huge pages are being correctly used, but that’s entirely optional so remove it if you aren’t using huge pages.

Let’s restart the database with the new init.ora and convert it back into an SPFILE

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup pfile='/home/oracle/orcl.ora'
ORACLE instance started.

Total System Global Area 5629419520 bytes
Fixed Size		    2262936 bytes
Variable Size		 4412409960 bytes
Database Buffers	 1073741824 bytes
Redo Buffers		  141004800 bytes
Database mounted.
Database opened.
SQL> create spfile from pfile='/home/oracle/orcl.ora';

File created.

Now we are ready to install SLOB…

Next page: Installing Oracle SLOB


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: