MSTPCE
MSTPCE
Version 1.14.0-1041
© Copyright Microsoft, 2008 - 2018
INTRODUCTION ................................................................................................................................................ 6
SUT_CE_Server .....................................................................................................................................................25
SUT_MEE_Server .................................................................................................................................................25
SUT.Config ...........................................................................................................................................................27
SyncTime ..............................................................................................................................................................27
BENCHCRAFT ....................................................................................................................................................... 28
The Microsoft TPC-E Benchmark Kit provides a complete implementation of the TPC-E benchmark. The aim of this
benchmark kit is twofold:
This document begins with a general overview of the TPC-E benchmark and its transactions. It then describes the
individual components of the Microsoft SQL Server TPC-E Benchmark Kit and demonstrates how these tools can be
used.
This document also offers some suggestions and useful information concerning SQL Server performance tuning as
it applies to the TPC-E benchmark. The information presented here may also prove to be useful in other
performance tuning scenarios.
Prior to publishing any TPC-E result with Microsoft SQL Server you must logon to the Microsoft SQL Server TPC
Benchmarking Support SharePoint site
(https://microsoft.sharepoint.com/teams/Microsoft_SQL_Server_TPC_Benchmarking_Support) and do the
following:
• Generate a price quote for all Microsoft products used in your result
o The price quote is automatically generated based on you input and will be sent via e-mail to you
• Request permission to publish your result
o Permission to publish a benchmark result on SQL Server is required by the End-User License
Agreement (EULA). A copy of the EULA is found at the beginning of this document as well as on
the web site when you downloaded this benchmark kit
o It generally takes 5 business days to go through the approval process so be sure to allow enough
time prior to your publication date
This version of the TPC-E benchmark kit requires the following components for building the test database, running
the benchmark, and building test drivers:
Initially, we are asking that you do not modify certain parts of our kit. There are several reasons for this. First,
customization of the kit will make it much more difficult for us to support you. With a single version of the kit
there will be fewer problems and any problems that do occur will be fixed faster. Finally, we want to establish a
solid base of TPC-E results across many platforms. Having everyone using the same kit will improve the
comparability of results.
What can be changed? You are free to customize the following things:
1. Database files layout and allocation (e.g., the script Create_Database.sql in the kit).
2. All sp_configure options, e.g. affinity mask, fibers, max worker threads, max memory.
3. Disk configuration, e.g., RAID, controllers, hardware settings, etc.
4. Hardware configuration:
c. # of customers
d. DB size
e. Configuration of tier A/B hardware
f. etc.
Please send requests to publish results to me. For TPC-E results, allow at least one week for a response. We will
need to have the following documentation provided in softcopy at the time of the request:
1. Complete “Supporting Files” as required by the spec that will be submitted to the TPC.
2. Benchcraft txn report for the reported run (the XLT file, not a screenshot or printout).
3. SQL Server error log for the reported run (complete log from server startup).
4. All output in the directory under .\MSTPCE1.13.0-1027\SetupLogs corresponding to the reported run.
Frequently, trace flags are used to alter the behavior of SQL Server. The following trace flag(s) are currently
supported for publication. If you are instructed to use a trace flag that is not on this list, please contact Jamie
Reding ([email protected]) or Charles Levine ([email protected]) prior to any publication
efforts.
TPC Benchmark™ E is composed of a set of transactional operations designed to exercise system functionalities in a
manner representative of complex OLTP application environments. These transactional operations have been
given a life-like context, portraying the activity of a brokerage firm, to help users relate intuitively to the
components of the benchmark. The workload is centered on the activity of processing brokerage trades and uses
a schema, which is logically divided in four sets of tables.
TPC-E models the activity of brokerage firm that must manage customer accounts, execute customer trade orders,
and be responsible for the interactions of customers with financial markets. TPC-E does not attempt to be a model
of how to build an actual application. The following diagram illustrates the transaction flow of the business model
portrayed in the benchmark:
Customer Market
Customer Market
Initiated Triggered
Transactions Transactions
Brokerage
The purpose of a benchmark is to reduce the diversity of operations found in a production application, while
retaining the application's essential performance characteristics so that the workload can be representative of a
production system. A large number of functions have to be performed to manage a production brokerage system.
Many of these functions are not of primary interest for performance analysis, since they are proportionally small in
terms of system resource utilization or in terms of frequency of execution. Although these functions are vital for a
production system, they merely create excessive diversity in the context of a standard benchmark and have been
omitted in TPC-E.
The Company portrayed by the benchmark is a brokerage firm with customers who generate transactions related
to trades, account inquiries, and market research. The brokerage firm in turn interacts with financial markets to
execute orders on behalf of the customers and updates relevant account information.
The number of customers defined for the brokerage firm can be varied to represent the workloads of different size
businesses.
READ-WRITE READ-ONLY
•Market-Feed •Broker-Volume •Security-Detail
•Trade-Order •Customer-Position •Trade-Lookup
•Trade-Result •Market-Watch •Trade-Status
•Trade-Update
APPLICATION COMPONENTS
The benchmark has been reduced to simplified form of the application environment. Error! Reference source not
found.
TRANSACTION SUMMARY
BROKER-VOLUME
CUSTOMER-POSITION
MARKET-FEED
The Market-Feed Transaction is designed to emulate the process of tracking the current market activity. This is
representative of the brokerage house processing the “ticker-tape” from the market exchange.
MARKET-WATCH
The Market-Watch Transaction is designed to emulate the process of monitoring the overall performance of the
market by allowing a customer to track the current daily trend (up or down) of a collection of securities. The
collection of securities being monitored may be based upon a customer’s current holdings, a customer’s watch list
of prospective securities, or a particular industry.
SECURITY-DETAIL
The Security-Detail Transaction is designed to emulate the process of accessing detailed information on a
particular security. This is representative of a customer doing research on a security prior to making a decision
about whether or not to execute a trade.
TRADE-LOOKUP
The Trade-Lookup Transaction is designed to emulate information retrieval by either a customer or a broker to
satisfy their questions regarding a set of trades. The various sets of trades are chosen such that the work is
representative of:
TRADE-ORDER
The Trade Order Transaction is designed to emulate the process of buying or selling a security by a Customer,
Broker, or authorized third-party. If the person executing the trade order is not the account owner, the
Transaction will verify that the person has the appropriate authorization to perform the trade order. The
Transaction allows the person trading to execute buys at the current market price, sells at the current market
price, or limit buys and sells at a requested price. The Transaction also provides an estimate of the financial
impact of the proposed trade by providing profit/loss data, tax implications, and anticipated commission fees. This
allows the trader to evaluate the desirability of the proposed security trade before either submitting or canceling
the trade.
The Trade-Result Transaction is designed to emulate the process of completing a stock market trade. This is
representative of a brokerage house receiving from the market exchange the final confirmation and price for the
trade. The customer’s holdings are updated to reflect that the trade has completed. Estimates generated when the
trade was ordered for the broker commission and other similar quantities are replaced with the actual numbers
and historical information about the trade is recorded for later reference.
TRADE-STATUS
The Trade-Status Transaction is designed to emulate the process of providing an update on the status of a
particular set of trades. It is representative of a customer reviewing a summary of the recent trading activity for
one of their accounts.
TRADE-UPDATE
The Trade-Update Transaction is designed to emulate the process of making minor corrections or updates to a set
of trades. This is analogous to a customer or broker reviewing a set of trades, and discovering that some minor
editorial corrections are required. The various sets of trades are chosen such that the work is representative of:
DATA-MAINTENANCE
The Data-Maintenance Transaction is designed to emulate the periodic modifications to data that is mainly static
and used for reference. This is analogous to updating a customer’s email address or other data that seldom
changes.
TRADE-CLEANUP
The Trade-Cleanup Transaction is used to cancel any pending or submitted trades from the database.
MODEL DESCRIPTION
ENTITY RELATIONSHIPS
Trading in TPC-E is done by Accounts. Accounts belong to Customers. Customers are serviced by Brokers. Accounts
trade Securities that are issued by Companies.
All Companies belong to one of the 102 Industries. Each Industry belongs to one of the 12 market Sectors.
Each Account picks its average ten Securities to trade from across the entire range of Securities.
Securities to be traded can be identified by the security symbol or by the company name and security issue.
The basic scaling unit of a TPC-E database is a set of 1,000 Customers. 20% of each 1,000 Customers belong to Tier
1, 60% to Tier 2, and 20% to Tier 3. Tier 2 Customers trade twice as often as Tier 1 Customers. Tier 3 Customers
trade three times as often as Tier 1 Customers. In general, customer trading is non-uniform by tier within each set
of 1,000 Customers.
Tier 1 Customers have 1 to 4 Accounts (average 2.5). Tier 2 Customers have 2 to 8 Accounts (average 5.0). Tier 3
Customers have 5 to 10 Accounts (average 7.5). Overall, there is an average of five Accounts per Customer.
The minimum and maximum number of Securities that are traded by each Account varies by Customer Tier and by
the number of Accounts for each Customer. The average number of Securities traded per Account is ten (so the
average number of Securities traded per Customer is fifty). For each Account, the same set of Securities is traded
for both the initial database population and for any Test Run.
CUSTOMER PARTITIONING
TPC-E scales with Customers. It is conceivable that Customer information could be partitioned into groups of
related Customers. This is called Customer Partitioning. The advantage of Customer Partitioning is that it increases
locality of reference within each sub-group of Customers. Transactions relating to a particular set of Customers
would be directed to that set of Customers rather than to all Customers.
TRADE TYPES
Trade requests come in two basic flavors: Buy (50%) and Sell (50%). Those are further broken down into Trade
Types, depending on whether the request was a Market Order (60%) or a Limit Order (40%).
For Market Orders, the two trade types are Market-Buy (30%) and Market-Sell (30%). For Limit Orders, the three
trade types are Limit-Buy (20%), Limit-Sell (10%) and Stop-Loss (10%).
Market-Buy and Market-Sell are trade requests to buy and sell immediately at the current market price, whatever
price that may be. Limit-Buy is a request to buy only when the market price is at or below the specified limit price.
Limit-Sell is a request to sell only when the market price is at or above the specified limit price. Stop-Loss is a
request to sell only when (or if) the market price drops to or below the specified limit price.
For a given account and security, holdings will be either all long (positive quantities) or all short (negative
quantities).
Long positions represent shares of the security that were bought (purchased and paid for) by the customer for the
account. The customer owns the shares of the security and may sell them at a later time (hopefully, for a higher
price).
Short positions represent shares of the security that were borrowed from the broker (or Brokerage) and were sold
by the customer for the account. In the short sale case, the customer has received the funds from that sell, but
still has to cover the sell by later purchasing an equal number of shares (hopefully at a lower price) from the
market and returning those shares to the broker.
Before EGenLoader runs, there are no trades and no positions in any security for any account. EGenLoader
simulates running the benchmark for three hundred Business Days of initial trading, so that the initial database
will be ready for benchmark execution.
If the first trade for a security in an account is a buy, a long position will be established (positive quantity in
HOLDING row). Subsequent buys in the same account for the same security will add holding rows with positive
quantities. Subsequent sells will reduce holding quantities or delete holding rows to satisfy the sell trade. All
holdings may be eliminated, in which case the position becomes empty. If the sell quantity still is not satisfied, the
position changes from long to short (see below).
If the first trade for a security in an account is a sell, a short position will be established (negative quantity in
HOLDING row). Subsequent sells in the same account for the same security will add holding rows with negative
quantities. Subsequent buys will reduce holding quantities (toward zero) or delete holding rows to satisfy the buy
trade. All holdings may be eliminated, in which case the position becomes empty. If the buy quantity still is not
satisfied, the position changes from short to long.
The following section describes the benchmark kit itself and how to use the components. This kit includes all of
the files necessary to build the database, populate tables, and measure the TPC-E workload. It also includes source
code and the executable for the EGen package as distributed by the TPC.
This version of the benchmark kit also contains a Driver (called BenchCraft) that will allow you to run a full end-to-
end benchmark test as required by the TPC-E benchmark specification.
SERVER CONFIGURATION
Generally speaking, the target server should be suitable for the test. That is, it should have sufficient memory,
processing power, and storage to support both Windows Server and SQL Server. In order to understand the
potential throughput and required hardware for a particular SUT, it may be valuable to consult the FDR (Full
Disclosure Report) of a previously published TPC-E result that was implemented with a similar hardware platform.
See the performance considerations and tuning section further on in this document for a more detailed discussion
of appropriate server configurations and other performance-related issues.
Once you have selected the appropriate hardware for the server, your next step is to install SQL Server and build a
TPC-E database. Use the following steps as reference.
When installing SQL Server you should install with the Latin1_General_Binary collation option. The default sort
order in the SQL Server setup is Dictionary Case Insensitive, so you should change this option during the SQL Server
installation. While the benchmark will run properly on a server installed with other sort orders, the binary sort
order will generally offer the best overall performance. If you do not specify the correct collation, you may specify
it in the create database process. For more information, see Create Database in SQL Server Books Online.
Once SQL Server has been installed, copy the benchmark kit in its entirety to a directory on the server. This
provides a central location for the benchmark kit’s files and for the database build process. In addition, database
builds are generally faster when initiated locally.
The TPC-E kit contains all files necessary to build a TPC-E database in the \Scripts directory and its associated sub-
directories. This includes scripts that build the devices and database for a given number of Customers, scripts
necessary to create the database objects, and a loader utility for populating the tables. The files in the #.Cust
directories (where # corresponds to the number of Customers) are specific to the scale of the database you intend
to build. This includes scripts for creating the database (Database\Create_Database.sql), creating backup devices
(Database\Backup_Devices.sql), and backup/restore the database after the build (Database\Backup.sql and
Database\Restore.sql.
You will need to customize the database creation, backup, and restore scripts to reflect your environment. In
addition, you may wish to create new #.Cust directories to further refine the scale of the database you wish to
build.
If you are using the flat file loading process, you may optionally pass a flat file location configuration file to the
setup process. If you choose to not use a configuration file, you will be prompted for each location individually. If
you do use the configuration file, you will be prompted to enter the full path and file name for the configuration
file. The file must contain a full path name to the locations you want to place the flat files on. Each location should
be on a line by itself. There must be a location for each EGenLoader instance you are using. If there are more or
less flat file locations specified compared to the desired EGenLoader instances, the setup process will display an
error message and quit. For example, the following lines would be in a configuration file for a database build using
4 EGenLoader instances:
E:\Flat_Out
F:\Flat_Out
G:\Flat_Out
H:\Flat_Out
TPCE_SETUP OPTIONS
Also, if you are new to TPC-E benchmarking it is strongly recommended that you start by building a fairly small
database (1000 Customers) to get familiar with the build process and tools. TPC-E databases of less than 5000
Customers are not valid for publication, but their small size makes them ideal for learning the mechanics.
After you have customized the files in the desired #.Cust\Database, you may start the process of creating your TPC-
E database.
This version of the kit now allows you to create the TPC-E database either with the traditional interactive method
or with the new XML automation scripting. Please see the Database Setup With Scripting section for additional
information.
TPC-E databases in the Microsoft TPC-E benchmark kit are created interactively using a Windows Command file
TPCE_Setup.cmd. This command file calls a Windows Scripting Host Visual Basic script that performs the necessary
steps to create the TPC-E database. It will prompt you for the parameters required. It will fill-in the default values
where necessary.
The following information must be passed to the setup process during the prompting phase:
• BUILD OPTION
There are 11 options that you may specify. They are:
o CREATEDATABASEFULL
▪ Remove any existing TPC-E database
▪ Create a TPC-E database
▪ Create the TPC-E data types
▪ Create the TPC-E tables
▪ Install the TPC-E stored procedures
▪ Set the pre-load database options
▪ Load the data via either ODBC or Flat Files
▪ Convert the NI_ITEM data type for flat file loads only
o CREATEDATABASE
▪ Remove any existing TPC-E database
▪ Create a TPC-E database
▪ Create the TPC-E data types
o CREATETABLESFULL
▪ Create the TPC-E tables
▪ Install the TPC-E stored procedures
▪ Set the pre-load database options
▪ Load the data via either ODBC or Flat Files
▪ Convert the NI_ITEM data type for flat file loads only
▪ Optionally delete the flat files
▪ Create the clustered indexes
▪ Create the non-clustered indexes
▪ Verify/Create the TPC-E check constraints
▪ Create the TPC-E foreign key constraints
▪ Create the TID_RANGES table
▪ Create the TPCE_INFO table
▪ Set the post-load database options
▪ Load the TPCE_INFO table
▪ Optionally backup the TPC-E database
▪ Optionally calculate the space used
▪ Optionally execute DB_Check
▪ Optionally execute DB_Pimary_Key_Check
▪ Optionally execute DB_Tables
▪ Optionally execute Insert Duplicates check
▪ Optionally execute Referential Integrity check
o CREATETABLES
▪ Create the TPC-E tables
▪ Install the TPC-E stored procedures
o LOADDATAFULL
o LOADDATA
▪ Set the pre-load database options
▪ Load the data via either ODBC or Flat Files
▪ Convert the NI_ITEM data type for flat file loads only
▪ Optionally delete the flat files
o BUILDFLATFILESONLY
▪ Generate the flat files
o POSTLOAD
▪ Set the pre-load database options
▪ Convert the NI_ITEM data type for flat file loads only
▪ Optionally delete the flat files
▪ Create the clustered indexes
▪ Create the non-clustered indexes
▪ Verify/Create the TPC-E check constraints
▪ Create the TPC-E foreign key constraints
▪ Create the TID_RANGES table
▪ Create the TPCE_INFO table
▪ Set the post-load database options
▪ Load the TPCE_INFO table
▪ Optionally backup the TPC-E database
o BACKUPDATABASE
▪ Backs up the TPC-E database
o SPACEUSAGE
▪ Calculate the space used
o VERIFYLOAD
• SERVER NAME
The default for this prompt is the name of the server that TPCE_Setup.cmd is executing on. It is highly
recommended that you run the setup process on the database server.
• NUMBER OF CUSTOMERS
Enter the number of customers to populate. Note, there must be an associated XXX.CUST directory
created prior to building. If the directory does not exist, the build will fail.
If you specify a value of less than 5,000 customers, you will be given a warning that configurations of less
than 5,000 customers are not valid for publication. Selecting Yes will allow you to continue for testing
purposes. Selecting No will allow you to re-enter the value.
You can now semi-automate the database setup process by passing in an XML-like script to the setup process. The
script can include any of the build options above and will check the input file to ensure all the proper information
has been included. If required information is missing, the setup process will abort and display an error message
indicating the error. The scripting feature only supports the use of a flat file configuration file if you are creating or
loading the flat files. There are several sample scripts in the Automation_Scripts directory.
To invoke the setup process with an automation script, you do the following:
For example, if you are using the sample Create Database Full script for 5,000 customers, you would run this:
TPCE_Setup.cmd –s Automation_Scripts\CreateDatabaseFull_5000_Customers.xml
The internal format of the script is as follows. Note, the tag and elements are not case sensitive, except for the
SQL User Id and SQL Password (if used). The tags can appear in any order.
<TPCE_SETUP>
<NumberOfCustomers>5000</NumberOfCustomers>
<BuildOption>CreateDatabaseFull</BuildOption>
<ServerName>TPCE_Test_System</ServerName>
<Authentication>Windows</Authentication>
<SQLUserID></SQLUserID>
<SQLPwd></SQLPwd>
<NumberOfEGenLoaders>5</NumberOfEGenLoaders>
<BuildFlatFiles>Yes</BuildFlatFiles>
<DeleteFlatFiles>No</DeleteFlatFiles>
<FlatFileConfigFileName>C:\FF_Config_5.txt</FlatFileConfigFileName>
<IndexBuildParallelism>16</IndexBuildParallelism>
<ScaleFactor>500</ScaleFactor>
<InitialTradeDays>300</InitialTradeDays>
<RunAuditScripts>No</RunAuditScripts>
<RunSpaceUsage>Yes</RunSpaceUsage>
<BackupDatabase>Yes</ BackupDatabase >
</TPCE_SETUP>
NOTE: YOU MUST RUN THE VISUAL STUDIO PACKAGE ON EACH TIER-A SYSTEM TO ENSURE THAT THE PROPER
VISUAL STUDIO DLLS ARE PRESENT. THE PACKAGE IS LOCATED IN \VS_MODULES. RUN VCREDIST_X86.EXE TO
INSTALL THE DLLS. THIS PACKAGE IS VALID FOR X86, X64, AND IA64 ARCHITECTURES.
SUT_CE_SERVER
The SUT_CE_Server.exe provides the customer emulator functions for the TPC-E benchmark. BenchCraft
communicates to SUT_CE_Server via the driver, discussed below. The SUT_CE_Server.exe is located in the
MSTPCE.1.14.0-1041\EGen\SUT_CE_Server\Release directory. The SUT_CE_Server is executed from a command
line and it takes the following parameters:
• -d <Database Name>
This option specifies the database name to connect to. The default value is tpce.
• -c <MDAC/SNAC>
This specifies the network protocol for the SUT_CE_Server. The default is MDAC.
• -m <MEE Name>
This is the name, i.e. Driver1, from the BenchCraft profile. It is only required if you have more than one
instance of SUT_CE_Server launched.
• -v
Directs the SUT_CE_Server to display verbose output.
• -?
Displays the usage information.
SUT_MEE_SERVER
• -d <Database Name>
This option specifies the database name to connect to. The default value is tpce.
• -c <MDAC/SNAC>
This specifies the network protocol for the SUT_MEE_Server. The default is MDAC.
• -m <MEE Name>
This is the name, i.e. Driver1, from the BenchCraft profile. It is only required if you have more than one
instance of SUT_MEE_Server launched.
• -v
Directs the SUT_MEE_Server to display verbose output.
• -?
Displays the usage information.
Execution of the SUT servers is very straightforward. For each one, simply run the executable. At a minimum you
must specify the Database Server Name of the target TPC-E server. The SUT component will run in the window
where it was started.
The normal method for shutting down the SUT Servers is by pressing ‘Q’. This causes the SUT Server in question to
perform a graceful shutdown. You may encounter a condition, when errors were output in the SUT Server
window, where the SUT Server will not shut down with the ‘Q’. In this case, you may use ‘CTRL-C’ to terminate the
SUT Server.
The Microsoft TPC-E Kit contains utilities to synchronize the system clocks as required in the TPC-E specification.
Prior to running the workload, you must synchronize all system clocks. The process uses a configuration file
(SUT.Config) which contains the machine names for the individual machines in the SUT. All system clocks are
synchronized to the DBMS server.
SUT.CONFIG
The SUT.Config file is used as input to the clock synchronization process. It has the following format:
<DBMS Server>
SQLPERFTPCE1
<SUT Servers>
SQLPERF-OLTP2
SQLPERF-OLTP3
SQLPERF-OLTP4
<DRIVER Systems>
SQLPERF-OLTP1
<END>
Enter each system name below the appropriate header. The machine name used under the DBMS Server name
will be used as the time server.
SYNCTIME
The SyncTime.cmd, which calls SyncTime.vbs, reads the SUT.Config file to get the SUT configuration. It will check
the status of the Windows Time Server service on the DBMS Server system specified. If the service is not started, it
will start it. Then it will process the rest of the SUT.Config file. The vbs script will execute w32tm to synchronize
the clocks.
****************************************************************************
* *
* Microsoft TPC-E Benchmark Kit Ver. 1.13.0-1027 *
* *
* Time Synchronization Processing *
* *
****************************************************************************
****************************************************************************
* *
* Microsoft TPC-E Benchmark Kit Ver. 1.13.0-1027 *
* *
* Time synchronization complete. *
* *
****************************************************************************
VERIFYTIME
The VerifyTime.cmd file MUST be run on each component of the SUT. It requires a single argument of the time
server system name. Executing this command file will verify the system time between the local machine and the
time server. The difference will be displayed as the output. For example, running VerifyTime.cmd on one of the
systems above:
C:\>verifytime SQLPERFTPCE1
BENCHCRAFT
BENCHCRAFT INSTALLATION
You install BenchCraft in the same manner as with previous versions. The setup executable is in MSTPCE.1.14.0-
1041\BenchCraft. The executable is BenchcraftSetup2420E.msi. Simply follow the prompts to install BenchCraft.
This message indicates that you do not have the proper Visual Studio 2008 Redistributable code installed on the
BenchCraft machine.
To resolve this problem, you must run vc2008SP1redist_x86_with_ATL_Fix.exe. This is found in MSTPCE.1.14.0-
1041\VS_Modules.
These messages indicate that the BenchCraft Master and/or Slave components were installed to run as a Windows
Network Service.
BENCHCRAFT PROFILES
BenchCraft uses a profile to define the drivers, market emulators, parameter sets, and users for the TPC-E
benchmark. Once the BenchCraft installation is complete, you can start the BenchCraft executable and create a
profile.
Right click on the BenchCraft window and select New UE. This will display the window to help you create a new
User Emulator. You will need to specify the following for a User Emulator:
• NAME
This is the name of the User Emulator. The default is fine here.
• PARAMETER SET
As with previous versions of BenchCraft, you can specify different runtime parameters. You can simply
use the default parameter set or specify one you define. That process is described below.
• DESCRIPTION
Optional text string for some unique description of the User Emulator
• MACHINE NAME
This is the machine name where the User Emulator driver will run.
• SIZE OF TARGET DB
This is where you plug in the number of customer in the target tpce database.
• RUN CHECKPOINT
CURRENTLY; PLEASE DO NOT RUN THE CHECKPOINT FROM BENCHCRAFT. WE ARE
INVESTIGATING AN ISSUE WHERE YOU CAN HAVE OVERLAPPING CHECKPOINTS. YOU WILL
FIND A SQL SCRIPT IN THE SCRIPTS\UTILITY DIRECTORY (CHECKPOINT_TPCE_DATABASE.SQL)
WHICH YOU MAY USE TO RUN THE CHECKPOINT DURING YOUR TESTING AND
MEASUREMENTS.
Check this box to instruct BenchCraft to generate a database checkpoint. This will add 1 connection to
your user count. This connection is used for the checkpoint loop only. You only need to check this box
for one of your driver engines. The checkpoint interval, default value of 7.5 minutes (450 seconds), is set
in the Parameter Set specified for the driver engine.
• CPU AFFINITY
Allows you to lock the UE driver to a particular CPU. This is useful when running multiple UEs or MEEs on
a multi-processor system.
Once you have specified and created the User Emulator(s) you can create the Market Emulator(s). You define the
MEE by right-clicking on the BenchCraft windows and select New MEE. You will need to specify the following for a
Market Emulator:
• NAME
This is the name of the Market Emulator. The default is fine here.
• DESCRIPTION
Optional text string for some unique description of the Market Emulator
• SIZE OF TARGET DB
This is where you plug in the number of customer in the target tpce database.
• SCALE DOWN
You may configure BenchCraft to run with fewer active customers than those configured. Check the box
and select the number of customers to access. NOTE: This is NOT a legal option for an audited run.
• CPU AFFINITY
Allows you to lock the MEE driver to a particular CPU. This is useful when running multiple UEs or MEEs
on a multi-processor system.
USER GROUPS
Once you have specified and created the User Emulator(s) and the Market Emulator(s) you can create the Users.
Simply click on the Users button on the toolbar and then right-click on the BenchCraft window and select New.
You will need to specify the following for a User:
• NUMBER OF USERS
Enter the number of desired user threads for this User Emulator driver.
• ENABLE PARTITIONING
Checking this box will allow you to partition the user group across a subset of the total customer
population. If you check this box you will need to specify the Start from Customer, the Customer Count
from Starting, and the Percent Inside the Partition.
BenchCraft Parameter sets allow you to specify different benchmark related parameter settings. This is very
similar to TPC-C. To create a new parameter set click on the Parms icon and then right-click on the BenchCraft
windows and select New.
You must check the Checkpoint Interval and make sure it is set for 450 seconds. This matches the TPC-E 1.4.0
specification requirements. See Clause 6.6.5.3.
You can dial in any values appropriate to your testing. BenchCraft will do some basic checking to make sure that
the percentages are 100%, etc. After you have built a parameter set, you can modify the Driver for the User
Engine and specify the new parameter set.
The “pacing” of transaction generation and execution is controlled by the Pacing value in the parameter set. The
value set here directly relates to the number of users you must define. The higher you set the pacing value, the
fewer users will be required to achieve the desired performance. Conversely, if you set the pacing value lower,
you will need to define more users. A value of 399999 effectively disables the pacing algorithm.
The number of users, along with the per-user transaction rate, controls how many total transactions are executed
against the database. The total number of users multiplied by the transaction rate per user divided by 10 equals
the approximate tpsE rate.
BENCHCRAFT RUNTIME
• Start BenchCraft and either create a new profile or load a previously created profile.
• Click the Launch button to launch the UE(s) and the MEE(s).
• Click the Start button to start the workload.
o Initially, the users will connect to the SUT Servers based on the Connect Rate throttle specified in
the User Emulator.
o If the Start Rate throttle is greater than 0, then the users will start executing TPC-E transactions
as well.
o If you have set the Start Rate throttle to 0, you may override it by clicking on the Rates icon and
specifying a new value.
• Once the workload has started, you may click on the Stats button will show you the runtime stats.
• Once you have finished the run you must first pause the User Emulators and Market Emulators by clicking
on the Pause icon in the menu bar. This allows the workload to come to a graceful halt.
• After the system has entered a paused state, you may click on the Stop icon to stop all the drivers.
• When the workload is completely stopped, you can use the Tools menu selections to Sort/Merge the logs
POST-RUN PROCESSING
Once you have completed the performance run, there are several steps that need to be done. They are:
• TRADE CLEANUP
After every performance run, you must run the Trade_Cleanup.sql script. This script cancels any pending
or submitted trades that are “leftover” from the performance run (see Clause 3.3.12). Failure to run
Trade Cleanup will result in very unpredictable behavior on subsequent performance runs. The presence
of the pending trades will cause the Market Feed transaction to be flooded with requests which can
make the subsequent run very unstable and unusable.
You may run this script from the SQL Server Management Studio or via the SQLCMD command prompt.
• BENCHCRAFT – SORT/MERGE
When you have stopped the Customer Emulator(s) and Market Emulator(s) on BenchCraft you must run a
sort and merge of the BenchCraft log files. This process can be found on the Tools menu of the
BenchCraft user interface. This process will combine all the BenchCraft logs into a single log file for later
processing.
Tuning SQL Server for the test run is crucial to achieve optimum performance. The following is a description of SQL
Server tuning parameters that can be adjusted for a given system. Note that the SQL Server documentation
provides additional information on these tuning parameters. SQL Server handles a great deal of the tuning
internally. It monitors the use of the system and database(s) and dynamically configures itself accordingly. The
following SQL Server parameters may be modified:
Many of the parameters listed below are not initially shown with sp_configure. Setting Show Advanced Options to
1 will allow you to view and modify these parameters.
Specifies a bit mask that SQL Server will use to associate its threads to the processors on your system. For
example, On a 4 CPU SMP machine you should set this value to a decimal 15 (0xF)
Lightweight pooling allows SQL Server to manage scheduling within the normal Windows Server thread structures.
Enabling lightweight pooling will reduce excessive context switching thereby reducing processor overhead. Setting
this option to 1 will cause SQL Server to switch to fiber mode scheduling. The default value is 0.
SQL Server will attempt to maximize memory usage if you let these values default. If you wish more control over
these settings, you may override the default settings. The Min Server Memory value specifies the amount of
memory that is guaranteed allocated to SQL Server. The Max Server Memory value specifies upper limit of
memory that can be allocated to SQL Server. The dynamic behavior of SQL Server allows you to leave these at
their defaults. In that condition, as the TPC-E system ramps-up, SQL Server will consume as much memory as the
operating system will allow. If you are running anything else on the system, like PerfMon, etc… it will prohibit SQL
Server from gaining access to additional memory. During the ramp-up phase, it is not unusual for SQL Server to
generate page faults. This condition will occur until SQL Server has finished bringing pages into the data cache.
Specifies how often SQL Server will automatically issue checkpoints. In the case of TPC-E where checkpoints are
issued through the BenchCraft this automatic check-pointing should be avoided.
Specifies the number of user connections allowed to connect to SQL Server. Generally, it is best to leave this at its
default value. This will allow SQL Server to dynamically allocate user connections as they are needed. The cost per
user connection is about 50K.