hammerdb官方操作手册

1
Microsoft SQL Server OLTP (Transactional) Load Testing
The document Introduction to Transactional (OLTP) Load Testing for all Databases provides a general
overview on the HammerDB OLTP workload and should be read prior to this database specific guide. This
guide gives you an introduction to conducting OLTP (Online Transaction Processing) workloads on the
Microsoft SQL Server Database. This will equip you with the essentials for assessing the ability of any system
that runs the Microsoft SQL Server Database for processing transactional workloads. On completion of this
guide you will be able to run detailed and comprehensive Microsoft SQL Server load tests. After building a
basic skill set, you should be able to take a system from 'bare metal' to generation of a full performance
profile within one day.
Database load testing is an advanced skill and therefore familiarity with the Microsoft SQL Server Database
and basic Microsoft SQL Server DBA skills are assumed. You should already be able to install, create,
administer and connect to a Microsoft SQL Server database. If you do not have these skills I recommend
start with an Introduction to Microsoft SQL Server.
Test Network Configuration ............................................................................................................. 1
Load Generation Server Configuration ........................................................................................ 2
SUT Database Server Configuration ............................................................................................. 2
Administrator PC Configuration ................................................................................................... 2
Installation and Configuration ......................................................................................................... 2
Load Generation Server Installation ............................................................................................ 3
Load Generation Server Configuration ........................................................................................ 3
Authentication and ODBC Driver ................................................................................................. 3
SUT Database Server Installation ................................................................................................. 4
Creating the Test Schema ................................................................................................................. 4
Build Options ................................................................................................................................ 6
Starting the Schema Build ............................................................................................................ 7
Pre-Testing and Planning ............................................................................................................... 12
Driver Options ............................................................................................................................ 14
Loading the Driver Script ............................................................................................................ 17
Pre-Test 1 Verifying the Schema ................................................................................................ 18
Pre-Test 2 Single and Multiple Virtual User Throughput ........................................................... 25
Planning and Preparation ........................................................................................................... 32
Running Timed Tests with the Timed Test Driver Script ............................................................... 33
Automating Tests with Autopilot Mode ..................................................................................... 38
Best Practices ................................................................................................................................. 42
Support and Questions ................................................................................................................... 42
Test Network Configuration
You require the database server to be tested known as the system under test (SUT) installed and configured
with the Microsoft SQL Server database. You also require a load generation server to run HammerDB
2
installed with the HammerDB software and a Microsoft SQL Server client. Typically the load generation
server is run on a separate system from the SUT with the load generated across the network. It is possible
to run HammerDB on the same system as the SUT however this will be expected to produce different
results from a network based load. Both the SUT and the load generation server may be virtualized or
container databases although similarly results may differ from a native hardware based installation.
Load Generation Server Configuration
The most important component of the load generation server is the server processor. The overall load
generation server capacity required depends on the system capabilities of the SUT. It is recommend to use
an up to date multicore processor. HammerDB is a multithreaded application and implicitly benefits from a
multicore server CPU. To determine whether CPU capacity is sufficient for testing you can monitor the CPU
utilisation with HammerDB Metrics. CPU utilisation reaching 100% is an indication that the CPU on the load
generation server is limiting performance. Load generation memory requirements are dependent on the
operating system configuration and the number of virtual users created with each virtual user requiring its
own sql server client. Typically server sizing guidelines should be within the limits expected to support a real
user count. Multiple load generation servers connected in a “master-slave” configuration are enabled
within HammerDB to exceed the capacity of a single load generation client. HammerDB consumes 15MB of
disk space and you will also need to have installed a compatible sql server client. All sql server database
installations include a sql server client. The load generation server does not need to be running the same
version of SQL Server as the SUT.
SUT Database Server Configuration
The database server architecture to be tested must meet the standard requirements for a Microsoft SQL
Server 2008 Database Server. Microsoft SQL Server can be installed on any supported Windows operating
system, however the minimum version of Microsoft SQL Server that is required is 2008, no version of SQL
Server prior to 2008 has been tested. To run a HammerDB transactional load test there are minimum
requirements in memory and I/O (disk performance) to prevent these components being a bottleneck on
performance. For a configuration requiring the minimal level of memory and I/O to maximize CPU
utilization keying and thinking time should be set to FALSE (keying and thinking time is detailed later in this
guide). To achieve this you should aim to create a schema with approximately 200-250 warehouses per CPU
socket so for example 400-500 warehouses for a 2 socket system and 800-1000 for a 4 socket system. As
long as it is not too small resulting in contention the schema size should not significantly impact results.
You should have sufficient memory to cache as much of your test schema in memory as possible. If keying
and thinking time is set to TRUE you will need a significantly larger schema and number of virtual users to
create a meaningful system load. Reductions in memory will place more emphasis on the I/O performance
of the database containing the schema. If the allocated SQL Server memory is sufficient most of the data
will be cached during an OLTP test and I/O to the data area will be minimal. As a consequence the key I/O
dependency will be to the transaction logs for both bandwidth and sequential write latency. Modern PCIe
SSDs when correctly configured have been shown to provide the capabilities to sustain high performance
transaction logging.
Administrator PC Configuration
The administrator PC has the minimal requirement to display the graphical output from the load generation
server. The PC should also have the ability to connect to the SUT to monitor performance by the installation
of a Microsoft SQL Server client.
Installation and Configuration
This sections describes the procedure to install and configure the Load Generation Server and the SUT
3
Database Server.
Load Generation Server Installation
On the Load Generation Server refer to the dedicated HammerDB Installation Guide.
Load Generation Server Configuration
All of HammerDBs working data can be set using menu options. However if you wish in the HammerDB
home directory there is a configuration file called config.xml that is read on startup. In this file you can
preset your schema build and driver configurations by editing the xml file without having to change the data
manually. If your xml file is well formed your variables will be applied to HammerDB when you selected the
menu options. In particular you will want to change the value of rdbms to MSSQLServer in order that SQL
Server is always preselected on start.
<?xml version="1.0" encoding="utf-8"?>
<hammerdb>
<rdbms>MSSQLServer</rdbms>
<bm>TPC-C</bm>
<mssqlserver>
<connection>
<mssqls_server>(local)</mssqls_server>
<mssqls_port>1433</mssqls_port>
<mssqls_authentication>windows</mssqls_authentication>
<mssqls_odbc_driver>SQL Server Native Client 11.0</mssqls_odbc_driver>
<mssqls_uid>sa</mssqls_uid>
<mssqls_pass>admin</mssqls_pass>
</connection>
<tpcc>
<schema>
<mssqls_count_ware>1</mssqls_count_ware>
<mssqls_schema>original</mssqls_schema>
<mssqls_num_threads>1</mssqls_num_threads>
<mssqls_dbase>tpcc</mssqls_dbase>
</schema>
<driver>
<mssqls_total_iterations>1000000</mssqls_total_iterations>
<mssqls_raiseerror>false</mssqls_raiseerror>
<mssqls_keyandthink>false</mssqls_keyandthink>
<mssqls_checkpoint>false</mssqls_checkpoint>
<mssqlsdriver>standard</mssqlsdriver>
<mssqls_rampup>2</mssqls_rampup>
<mssqls_duration>5</mssqls_duration>
</driver>
</tpcc>
Authentication and ODBC Driver
You will have configured Microsoft SQL Server during installation to authenticate either with Windows
Authentication or with SQL Server and Windows Authentication. HammerDB will permit either method to
be used however you must have the corresponding configuration on your SQL Server. Additionally your
chosen method of authentication is required to be compatible with your chosen ODBC driver. To discover
the available drivers use the ODBC Data Source Administrator tool as shown in Figure 1.

试读已结束,继续阅读请购买后下载

所需金币:1
您当前拥有金币:0

您可以先点击 收藏 本资料,赚取金币后购买。
出售资料赚金币
做任务赚金币

资料简介:

HammerDB是一个开源的的数据库负载测试和基准工具,有LINUX和WINDOWS版本,可以测试运行在任意系统上的数据库系统。HammerDB具有自动化的,多线程和动态脚本可扩展特点。HammerDB目前支持的数据库种类很多,主流的数据库都已经覆盖,例如Oracle、SQL Server、DB2、TimesTen、MySQL、MariaDB、PostgreSQL、Greenplum、Postgres Plus Advanced Server、Redis 和 Trafodion SQL on Hadoop。HammerDB包含一个内嵌的基于TPC-C工业标准基线工作负载。

2017-08-11
页数42
浏览158
下载0

已下载用户的评价

您还未下载该资料,不能发表评价;
评价已下载资料,获取金币奖励;查看我的 待评价资源
本资料还没有评价。

贡献者

chenruiziyao系统测试工程师,打杂
欢迎大家光临: https://weidian.com/?userid=1998493&wfr=wx&share_id=1998493

关于TWT  使用指南  社区专家合作  厂商入驻社区  企业招聘  投诉建议  版权与免责声明  联系我们
© 2017 talkwithtrend — talk with trend,talk with technologist 京ICP备09031017号-30