New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Proving out flash storage array performance using swingbench and slob
1. Proving out Flash Storage Array Performance using Swingbench and SLOB
Kapil Goyal, Fidelity Investments
@kapil_goyal
2. Who am I?
Lead for Oracle database performance team at Fidelity Investments
Worked with Oracle Consulting and got exposure to many different
companies' database performance challenges
Speaker at ECO, BIWA, DOUG, Hostos, Enkitec Expo, IOUG and AIOUG
Published articles for DOUG and IOUG SELECT magazine
Certified OCP DBA 8i to 11g
4. IOPS
• # of distinct Input/Output operations (reads or writes) per second
• Several vendors advertise "just" higher IOPS, sort of meaning less without
other metrics like
• Latency
• Block Size - 2k, 4k, 8k, 16k, 32k...?
• Read write ratio
5. Latency
• A measure of the time required for a sub-system or a component in that sub-system to
process a single storage transaction or data request
• Latency matters!!
• Varies by block size
6. Latency
• DB level latency can be in sub ms still with spinning drives
Reference - http://carymillsap.blogspot.com/2009/02/dang-it-people-theyre-syscalls-not.html
• Wait event is SYSCALL
• Db file sequential read – pread call (linux)
• wait n. In an Oracle context, the approximate response time of what is usually a
single operating system call (syscall) executed by an Oracle kernel process.
• SAN Cache
• FS Cache
• Oracle data doesn’t show IO queue at OS level
• Oracle has no visibility if IO got serviced by FS cache, SAN cache or by spinning
drive
7. Throughput
• How much data can be transferred from one location to another in a
given amount of time
Or
• MegaBytes/Second
• Important for large scans/sequential reads
9. Does your Database need Flash Storage?
• Is your database IO sensitive?
• Does it need consistent and low latency?
• Does it currently have high latency and driving a lot of IO?
• Database server CPU starved?
• 3 offerings depending upon workload:
• Hybrid Storage with spinning drives with Cache (RAM or FLASH)
• All Flash arrays
• Exadata
11. • SLOB – For IOPS (To Test Physical IO)
• Swingbench
• Order Entry - introduces heavy contention on a small number of
tables and is designed to stress interconnects and memory
• Sales History - to test the performance of complicated queries when
run against large tables.
Tools we picked
12. • SLOB – For IOPS (To Test Physical IO)
• Swingbench
• Order Entry - introduces heavy contention on a small number of
tables and is designed to stress interconnects and memory
• Sales History - to test the performance of complicated queries when
run against large tables.
Tools we picked
14. SLOB
Reference- https://kevinclosson.net/slob/
• IO workload generation toolkit
• Supports following testing
• Oracle Logical Read scaling
• Physical random single block read (db file sequential read wait
event)
• Random single block writes (DBWR flushing capacity)
• Redo logging IO
• Best tool to test IO subsystem
15. SLOB
• Create ~500GB dataset (256 SLOB schemas each 2 GB)
• Ran several tests with different # of users - 2,4,8,16,32,64,92,128,160,192,224 and 256
17. Slob.conf
UPDATE_PCT= 0 to 50 -–Update Activity
RUN_TIME=1800 --seconds
WORK_LOOP=0
SCALE=256000 --Numbers of Blocks
WORK_UNIT=64
REDO_STRESS=HEAVY #LITE
LOAD_PARALLEL_DEGREE=4
# Settings for SQL*Net connectivity:
ADMIN_SQLNET_SERVICE=slob_poc5
SQLNET_SERVICE_BASE=slob_poc5
#SQLNET_SERVICE_MAX=2
#SYSDBA_PASSWD=xxxxx
SYSDBA_PASSWD=manager
18. SLOB Test Setup
oracle@hostname:poc51> srvctl status service -d poc5_wlk
Service slob_poc5 is running on instance(s) poc51,poc52
Service slob_poc51 is running on instance(s) poc51
Service slob_poc52 is running on instance(s) poc52
tnsnames.ora
slob_poc51 = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST =xxxx)(PORT = 1521)) (CONNECT_DATA =
(SERVER = DEDICATED) (SERVICE_NAME = slob_poc51)))
slob_poc52 = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = xxxx)(PORT = 1521)) (CONNECT_DATA =
(SERVER = DEDICATED) (SERVICE_NAME = slob_poc52)))
slob_poc5 = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = xxxx)(PORT = 1521)) (CONNECT_DATA =
(SERVER = DEDICATED) (SERVICE_NAME = slob_poc5)))
Test it
sqlplus user1/user1@slob1 <<EOF
show parameter instance_name
EOF
sqlplus user1/user1@slob2 <<EOF
show parameter instance_name
EOF
19. Some underbar parameter
simple.ora
# The following are needed to force db file sequential read. Omit for direct path short
scans.
# If you would like to investigate a blend of short scans mixed with single-block
random I/O
# then comment out these three parameters :
_db_block_prefetch_limit = 0
_db_block_prefetch_quota = 0
_db_file_noncontig_mblock_read_count = 0
20. SLOB Caveat
• It overwrites logs
• Best for IOPS test but not good for driving high throughput
22. Runit wrapper script
Better naming convention
Doesn’t overwrite files
Make Buffer Cache
small to stress IO
subsystem
23. IOPS/MBPS script
Number of Number of Total Number of Number of Total Total Total
DATE_TIME DATE_TIME Small reads Small writes Small IOPS large reads large writes Large IOPS MBPS read MBPS written Total MBPS Total IOPS
-------------------- -------------------- ------------ ------------- ----------- ------------ ------------- ----------- ---------- ------------- ---------- ----------
02/05/18_00_19_00_21 02/05/18_00_19_00_21 222 2716 2938 18 14 32 16 35 51 2970
02/05/18_00_21_00_51 02/05/18_00_21_00_51 70374 32138 102512 222 694 916 769 931 1700 103429
..
..
02/05/18_07_51_08_56 02/05/18_07_51_08_56 18 3 21 1738 10 1748 1728 2 1730 1769
Throughput = IOPS x I/O size
In what case IOPS
and Throughput
could be same?
24. Other tools – db_capacity.sql
• Leverages google chart
• Thanks to Mauro and Carlos for help
31. Swingbench testing (Throughput)
Shwizard to build Sales History Schema
500GB schema was created (with range partition)
Several tests (SH) were run with different parallel/Index settings
Swingbench config info
• NumberOfUsers 16
• MinDelay 0
• MaxDelay 0
• InterMinDelay 1000 ms
• InterMaxDelay 2000 ms
• RunTime 1h:5 min
• StatsCollectionStart 0:4 min
• StatsCollectionEnd 1h:4 min
http://dominicgiles.com/swingbench.html
32. Xml config file
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<SwingBenchConfiguration xmlns="http://www.dominicgiles.com/swingbench/config">
<Name>Sales History</Name>
<Comment>Configuration file for the Sales History Benchmark</Comment>
<Connection>
<UserName>sh_500</UserName>
<Password>sh_500</Password>
<ConnectString>//eihtlrac-scan/slob_poc5</ConnectString>
<DriverType>Oracle jdbc Driver</DriverType>
<Properties>
<Property Key="FetchSize">20</Property>
<Property Key="StatementCaching">50</Property>
<Property Key="TcpNoDelay">true</Property>
</Properties>
<InitilizationCommands>
<Command>alter session set sql_trace=false</Command>
</InitilizationCommands>
</Connection>
<Load>
<NumberOfUsers>16</NumberOfUsers>
<MinDelay>0</MinDelay>
<MaxDelay>0</MaxDelay>
<InterMinDelay>1000</InterMinDelay>
<InterMaxDelay>2000</InterMaxDelay>
<QueryTimeout>55</QueryTimeout>
<MaxTransactions>-1</MaxTransactions>
<RunTime>1:5</RunTime>