暂无图片
暂无图片
暂无图片
暂无图片
暂无图片
hammerdb_oracle_dss.pdf
15
40页
0次
2025-03-21
5墨值下载
1
Oracle Decision Support (DSS) Load Testing
This guide gives you an introduction to conducting Decision Support or analytical workloads on the Oracle
Database. This guide will equip you with the essentials for assessing the ability of any system that runs the
Oracle Database for processing query based workloads, such workloads are also known as Data
Warehousing, Business Intelligence and Analytical workloads. On completion of this guide you will be able
to run detailed and comprehensive query based Oracle load tests. If you have not already done so you
should read the Introduction to Decision Support, Data Warehousing, Business Intelligence, and Analytical
Load Testing for all Databases before proceeding with this guide.
You should ensure that your version of Oracle supports the Parallel Query and for Oracle 12c the In-Memory
Option. Oracle Enterprise Edition does, however Oracle Standard Edition and Oracle Express do not and are
therefore not suitable for running Query based workloads. This DSS HammerDB workload is the ideal
workload for testing the features of In-Memory Column Stores.
Introduction ...................................................................................................................................... 1
SUT Database Server Configuration ................................................................................................ 2
Installation and Configuration ......................................................................................................... 3
SUT Database Server Installation ................................................................................................. 3
Creating the Test Schema ................................................................................................................. 4
Build Options ................................................................................................................................ 7
Starting the Schema Build ............................................................................................................ 8
Pre-Testing and Planning ............................................................................................................... 16
Driver Options ............................................................................................................................ 18
Loading the Driver Script ............................................................................................................ 19
Pre-Test 1 Running a Power Test Query ..................................................................................... 21
Pre-Test 2 Optimal DOP and In-memory for Power and Throughput Tests ............................... 27
Running the DSS Tests ................................................................................................................... 32
Power Test .................................................................................................................................. 32
Throughput Test ......................................................................................................................... 36
Calculating QphH ........................................................................................................................ 39
Support and Questions ................................................................................................................... 40
Introduction
The basis of Analytic or Decision Support Systems is the ability to process complex ad-hoc queries on large
volumes of data. Processing this amount of data within a single process or thread on traditional row-
oriented database is time consuming. Consequently Oracle employs Parallel Execution to break down such
queries into multiple sub tasks to complex the query more quickly. Additional features such as compression
and partitioning are also used with Parallel Execution to improve parallel query performance. From Oracle
version 12.1.0.2 there is also the option of utilising in-memory columnar storage. In-memory column stores
can offer significant performance benefits and reduce query times for analytic workloads. Note that the
Oracle in-memory columnar storage option is not the same as the in-memory parallel execution feature
introduced with 11gR2 which applied to row based parallel execution, however in-memory columnar
storage is also used in conjunction with parallel execution as shown below.
2
PX BLOCK ITERATOR (cr=0 pr=0 pw=0 time=0 us cost=155 size=75054543 card=3263241)
TABLE ACCESS INMEMORY FULL LINEITEM (cr=0 pr=0 pw=0 time=0 us cost=155
size=75054543 card=3263241)
As a consequence when planning analytic workloads for optimal performance you should consider both
your in-memory (from 12.1.0.2) and parallel execution configuration. In similarity to the HammerDB OLTP
workload, HammerDB implements a fair usage of a TPC workload however the results should not be
compared to official published TPC-H results in any way.
SUT Database Server Configuration
For query based workloads there is no requirement for a load testing client although you may use one if you
wish. It is entirely acceptable to run HammerDB directly on the SUT (System Under Test) Database system if
you wish, the client workload is minimal compared to an OLTP workload. In the DSS workload the client
sends long running queries to the SUT and awaits a response therefore requiring minimal resources on the
client side. As with an OLTP configuration however the database server architecture to be tested must
meet the standard requirements for an Oracle Database Server. Similarly Oracle can be installed on any
supported operating system, there is no restriction on the version of Oracle that is required.
Before running a HammerDB DSS test depending on your configuration you should focus on memory and
I/O (disk performance). Also in turn the number and type of multi-core and multi-threaded processors
installed will have a significant impact on parallel performance to drive the workload. When using in-
memory column store features processors that support SIMD/ AVX instructions sets are also required for
the vectorisation of column scans.
HammerDB by default provides TPC-H schemas at Scale Factors 1,10,30,100,300 and 1000 (larger can be
configured if required). The Scale Factors correspond to the schema size in Gigabytes. As with the official
TPC-H tests the results at one schema size should not be compared with the results derived with another
schema size. As the DSS workload utilizes parallel query it is possible for a single virtual user to use all of
the CPU resources on the SUT at any schema size. Nevertheless there is still a relation with all of the
hardware resources available including memory and I/O and a larger system will benefit from tests run a
larger schema size. The actual sizing of hardware resources of hardware resources is beyond the scope of
this document however at the basic level in contrast to an OLTP workload a traditional parallel query
workload is typically characterized by direct path (directly from disk as opposed to from the buffer cache in
the SGA) reads into the sessions’ PGA. Consequently the emphasis is more on PGA sizing as opposed to SGA
for memory and high bandwidth read performance on the storage. With this traditional parallel execution
and modern CPU capabilities I/O read performance is typically the constraining factor. Note that also in
contrast to an OLTP workload high throughput redo log write performance is not a requirement, however in
similarity to the OLTP workload storage based on SSD disks will usually offer significant improvements in
performance over standard hard disks although in this case it is the benefits of read bandwidth as opposed
to the IOPs benefits of SSDs for OLTP.
When using the in-memory column store memory capacity and bandwidth feature and if fully cached in
memory storage performance is not directly a factor for query performance. Nevertheless data loads are an
important consideration for in-memory data and therefore I/O and SSD read performance remain important
for loading the data into memory to be available for scans.
3
Installation and Configuration
This sections describes the procedure to install and configure the Load Generation Server (if one is used)
and the SUT Database Server.
SUT Database Server Installation
Installation and configuration of the Oracle Database on your chosen operating system is beyond the scope
of this document. You should have the Oracle database software installed, a test database created and
running and be aware of the database features you wish to configure for query performance. During the
installation make a note of your system user password, you will need it for the test schema creation. You
may at your discretion use an existing database however please note that HammerDB load testing can drive
your system utilization to maximum levels and therefore testing an active production system is not
recommended. In particular parallel execution workloads can use significant resources for low numbers of
users and result in table level checkpoints and therefore locking (TM enqueues) and caution is advised
before running on an instance shared with other workloads.
When your database server is installed you should create a tablespace into which the test data will be
installed allowing disk space according to the guide previously given in this document.
SQL> create tablespace tpch datafile size 2g;
Tablespace created.
When using parallel query ensure that the instance is configured for parallel execution, noting in particular
the value for parallel_max_servers.
SQL> show parameter parallel
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
parallel_max_servers integer 160
parallel_min_servers integer 16
parallel_servers_target integer 64
parallel_threads_per_cpu integer 2
For testing purposes you can disable parallel execution in a particular environment by setting
parallel_max_servers to a value of zero.
An additional parameter that can provide significant benefit to the performance of parallel query workloads
is optimizer_dynamic_sampling. By default this value is set to 2. Increasing this value to 4 has been shown
to benefit query performance however testing the impact of changing this parameter should always be
done during pre-testing as it may change between Oracle releases.
SQL> alter system set optimizer_dynamic_sampling=4;
System altered.
SQL> show parameter optimizer_dynamic
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
optimizer_dynamic_sampling integer 4
of 40
5墨值下载
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文档的来源(墨天轮),文档链接,文档作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。