Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Swingbench is a free load generator (and benchmarks) designed by Dominic Giles to stress test an Oracle database (10g,11g,12c). 

1. In this example, we will use charbench which is the command line interface to Swingbench.

1. Download Swingbench

No Format
su - oracle
mkdir software
cd software
wget http://dominicgiles.com/swingbench/swingbench25909.zip

2. Unzip the software

No Format
unzip swingbench25909.zip
Archive:  swingbench25909.zip
   creating: swingbench/
  inflating: swingbench/.DS_Store    
   creating: swingbench/bin/
  inflating: swingbench/bin/bmcompare  
  inflating: swingbench/bin/ccconfig.xml  
  inflating: swingbench/bin/ccwizard  
  inflating: swingbench/bin/ccwizard.xml  
  inflating: swingbench/bin/charbench  
  inflating: swingbench/bin/clusteroverview  
  inflating: swingbench/bin/clusteroverview.xml  
  inflating: swingbench/bin/coordinator  
   creating: swingbench/bin/data/
  inflating: swingbench/bin/data/1000mostpopularadjectives.txt  
  inflating: swingbench/bin/data/1000mostpopularwords.txt  
  inflating: swingbench/bin/data/100mostpopularwords.txt  
  inflating: swingbench/bin/data/catalogue.txt  
  inflating: swingbench/bin/data/counties.txt  
  inflating: swingbench/bin/data/countries.txt  
 extracting: swingbench/bin/data/domains.txt  
  inflating: swingbench/bin/data/emails.txt  
  inflating: swingbench/bin/data/lowerfirstnames.txt  
  inflating: swingbench/bin/data/lowerlastnames.txt  
  inflating: swingbench/bin/data/names.txt  
  inflating: swingbench/bin/data/nls.txt  
  inflating: swingbench/bin/data/productids.txt  
  inflating: swingbench/bin/data/titles.txt  
  inflating: swingbench/bin/data/towns.txt  
  inflating: swingbench/bin/minibench  
  inflating: swingbench/bin/oewizard  
  inflating: swingbench/bin/oewizard.xml  
  inflating: swingbench/bin/shwizard  
  inflating: swingbench/bin/shwizard.xml  
  inflating: swingbench/bin/swingbench  
  inflating: swingbench/bin/swingconfig.xml  
   creating: swingbench/configs/
  inflating: swingbench/configs/ccconfig.xml  
  inflating: swingbench/configs/oeconfig.xml  
  inflating: swingbench/configs/shconfig.xml  
  inflating: swingbench/configs/spconfig.xml  
  inflating: swingbench/configs/stresstest.xml  
  inflating: swingbench/configs/swingconfigv1.xml  
  inflating: swingbench/configs/swingconfigv2.xml  
   creating: swingbench/launcher/
  inflating: swingbench/launcher/commons-launcher.jar  
  inflating: swingbench/launcher/launcher.properties  
  inflating: swingbench/launcher/launcher.xml  
  inflating: swingbench/launcher/LauncherBootstrap.class  
   creating: swingbench/lib/
   creating: swingbench/lib/launcher/
  inflating: swingbench/lib/launcher/ant-launcher.jar  
  inflating: swingbench/lib/launcher/ant.jar  
  inflating: swingbench/lib/launcher/xercesImpl.jar  
  inflating: swingbench/lib/launcher/xml-apis.jar  
  inflating: swingbench/lib/ojdbc6.jar  
  inflating: swingbench/lib/ons.jar  
  inflating: swingbench/lib/simplefan.jar  
  inflating: swingbench/lib/swingbench.jar  
  inflating: swingbench/lib/ucp.jar  
   creating: swingbench/log/
  inflating: swingbench/README.txt   
   creating: swingbench/source/
  inflating: swingbench/source/antbuild  
  inflating: swingbench/source/build.xml  
   creating: swingbench/source/com/
   creating: swingbench/source/com/dom/
   creating: swingbench/source/com/dom/benchmarking/
   creating: swingbench/source/com/dom/benchmarking/swingbench/
   creating: swingbench/source/com/dom/benchmarking/swingbench/dsstransactions/
  inflating: swingbench/source/com/dom/benchmarking/swingbench/dsstransactions/PeriodToPeriodComparison.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/dsstransactions/ProductSalesRollupCube.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/dsstransactions/SalesByCountryForGivenYear.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/dsstransactions/SalesByQuarterCountry.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/dsstransactions/SalesCubeByMonth.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/dsstransactions/SalesHistory.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/dsstransactions/SalesMovingAverage.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/dsstransactions/SalesRollupByMonth.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/dsstransactions/SimpleLookUp.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/dsstransactions/TopSalesWithinQuarter.java  
   creating: swingbench/source/com/dom/benchmarking/swingbench/plsqltransactions/
  inflating: swingbench/source/com/dom/benchmarking/swingbench/plsqltransactions/BrowseAndUpdateOrders.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/plsqltransactions/BrowseProducts.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/plsqltransactions/NewCustomerProcess.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/plsqltransactions/NewCustomerProcessV2.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/plsqltransactions/NewOrderProcess.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/plsqltransactions/OrderEntryProcess.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/plsqltransactions/ProcessOrders.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/plsqltransactions/SalesRepsOrdersQuery.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/plsqltransactions/UpdateCustomerDetailsV2.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/plsqltransactions/WarehouseActivityQuery.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/plsqltransactions/WarehouseOrdersQuery.java  
   creating: swingbench/source/com/dom/benchmarking/swingbench/storedprocedures/
  inflating: swingbench/source/com/dom/benchmarking/swingbench/storedprocedures/newStoredProcedure.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/storedprocedures/StoredProcedure1.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/storedprocedures/StoredProcedure2.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/storedprocedures/StoredProcedure3.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/storedprocedures/StoredProcedure4.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/storedprocedures/StoredProcedure5.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/storedprocedures/StoredProcedure6.java  
   creating: swingbench/source/com/dom/benchmarking/swingbench/stresstest/
  inflating: swingbench/source/com/dom/benchmarking/swingbench/stresstest/StressTest.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/stresstest/StressTestDelete.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/stresstest/StressTestInsert.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/stresstest/StressTestSelect.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/stresstest/StressTestUpdate.java  
   creating: swingbench/source/com/dom/benchmarking/swingbench/transactions/
  inflating: swingbench/source/com/dom/benchmarking/swingbench/transactions/BrowseAndUpdateOrders.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/transactions/BrowseProducts.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/transactions/NewCustomerProcess.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/transactions/NewOrderProcess.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/transactions/OrderEntryProcess.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/transactions/ProcessOrders.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/transactions/SalesRepsOrdersQuery.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/transactions/WarehouseActivityQuery.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/transactions/WarehouseOrdersQuery.java  
   creating: swingbench/source/com/mike/
   creating: swingbench/source/com/mike/CallingCircle/
  inflating: swingbench/source/com/mike/CallingCircle/CallingCircleLineIdentifier.java  
  inflating: swingbench/source/com/mike/CallingCircle/CallingCircleProcess.java  
  inflating: swingbench/source/com/mike/CallingCircle/CallingLineIdentifier.java  
  inflating: swingbench/source/com/mike/CallingCircle/CustomerAccount.java  
  inflating: swingbench/source/com/mike/CallingCircle/CustomerCallingLineIdentifier.java  
  inflating: swingbench/source/com/mike/CallingCircle/NewCallingCircleProcess.java  
  inflating: swingbench/source/com/mike/CallingCircle/RetrieveHistoryProcess.java  
  inflating: swingbench/source/com/mike/CallingCircle/UpdateCallingCircleProcess.java  
   creating: swingbench/sql/
  inflating: swingbench/sql/analyzecc.sql  
  inflating: swingbench/sql/CreAppPkgBdy.sql  
  inflating: swingbench/sql/CreAppPkgHdr.sql  
  inflating: swingbench/sql/CreAppPrc.sql  
  inflating: swingbench/sql/CreData1.sql  
  inflating: swingbench/sql/CreData2.sql  
  inflating: swingbench/sql/CreData3.sql  
  inflating: swingbench/sql/CreDataPkgBdy.sql  
  inflating: swingbench/sql/CreDataPkgHdr.sql  
  inflating: swingbench/sql/CreInds.sql  
 extracting: swingbench/sql/CreInds2.sql  
  inflating: swingbench/sql/CreMiscPkgBdy.sql  
  inflating: swingbench/sql/CreMiscPkgHdr.sql  
  inflating: swingbench/sql/CreTabs.sql  
  inflating: swingbench/sql/CreTspc.sql  
  inflating: swingbench/sql/CreUser.sql  
  inflating: swingbench/sql/DropTabs.sql  
  inflating: swingbench/sql/DropUser.sql  
  inflating: swingbench/sql/GenData.sql  
  inflating: swingbench/sql/grantv$access.sql  
  inflating: swingbench/sql/oepostinstall.sql  
  inflating: swingbench/sql/sh.xml   
  inflating: swingbench/sql/sh_dgcreateconstraints_with_indexes.sql  
  inflating: swingbench/sql/shdg_analyzeschema.sql  
  inflating: swingbench/sql/shdg_analyzeschema2.sql  
  inflating: swingbench/sql/shdg_createconstraints.sql  
  inflating: swingbench/sql/shdg_createloadviews.sql  
  inflating: swingbench/sql/shdg_createtablespace.sql  
  inflating: swingbench/sql/shdg_createuser.sql  
  inflating: swingbench/sql/shdg_drop.sql  
  inflating: swingbench/sql/shdg_drop_load_views.sql  
  inflating: swingbench/sql/shdg_drop_range.sql  
  inflating: swingbench/sql/shdg_droptablespace.sql  
  inflating: swingbench/sql/shdg_dropuser.sql  
  inflating: swingbench/sql/shdg_indexes.sql  
  inflating: swingbench/sql/shdg_indexes_none.sql  
  inflating: swingbench/sql/shdg_indexes_part.sql  
  inflating: swingbench/sql/shdg_indexes_part_pk.sql  
  inflating: swingbench/sql/shdg_indexes_pk.sql  
  inflating: swingbench/sql/shdg_localindexes.sql  
  inflating: swingbench/sql/shdg_mergepartitions.sql  
  inflating: swingbench/sql/shdg_modify_indexes.sql  
  inflating: swingbench/sql/shdg_tables.sql  
  inflating: swingbench/sql/shdg_tablesrange.sql  
  inflating: swingbench/sql/shdg_tidyup.sql  
  inflating: swingbench/sql/shdg_timedimension.sql  
  inflating: swingbench/sql/soe.xml  
  inflating: swingbench/sql/soe2.xml  
  inflating: swingbench/sql/soedg_modify_indexes.sql  
  inflating: swingbench/sql/soedganalyzeschema.sql  
  inflating: swingbench/sql/soedganalyzeschema2.sql  
  inflating: swingbench/sql/soedgconstraints.sql  
  inflating: swingbench/sql/soedgconstraints2.sql  
 extracting: swingbench/sql/soedgconstraints_none_2.sql  
  inflating: swingbench/sql/soedgconstraints_pk_2.sql  
  inflating: swingbench/sql/soedgcreatepartitionedtables.sql  
  inflating: swingbench/sql/soedgcreatetables.sql  
  inflating: swingbench/sql/soedgcreatetables2.sql  
  inflating: swingbench/sql/soedgcreatetablescomposite2.sql  
  inflating: swingbench/sql/soedgcreatetableshash2.sql  
  inflating: swingbench/sql/soedgcreatetablespace.sql  
  inflating: swingbench/sql/soedgcreateuser.sql  
  inflating: swingbench/sql/soedgdrop.sql  
  inflating: swingbench/sql/soedgdrop2.sql  
  inflating: swingbench/sql/soedgindexes.sql  
  inflating: swingbench/sql/soedgindexes2.sql  
  inflating: swingbench/sql/soedgindexes_none_2.sql  
  inflating: swingbench/sql/soedgindexes_pk_2.sql  
  inflating: swingbench/sql/soedgpackage.sql  
  inflating: swingbench/sql/soedgpackage2_body.sql  
  inflating: swingbench/sql/soedgpackage2_header.sql  
  inflating: swingbench/sql/soedgsequences.sql  
  inflating: swingbench/sql/soedgsequences2.sql  
  inflating: swingbench/sql/soedgsetupmetadata.sql  
  inflating: swingbench/sql/soedgsqlset.sql  
  inflating: swingbench/sql/soedgviews.sql  
  inflating: swingbench/sql/soedroptablespace.sql  
  inflating: swingbench/sql/soedropuser.sql  
  inflating: swingbench/sql/storedprocedures.sql  
  inflating: swingbench/swingbenchFAQ.pdf  
   creating: swingbench/winbin/
  inflating: swingbench/winbin/bmcompare.bat  
  inflating: swingbench/winbin/ccwizard.bat  
  inflating: swingbench/winbin/ccwizard.xml  
  inflating: swingbench/winbin/charbench.bat  
  inflating: swingbench/winbin/clusteroverview.bat  
  inflating: swingbench/winbin/clusteroverview.xml  
  inflating: swingbench/winbin/coordinator.bat  
   creating: swingbench/winbin/data/
  inflating: swingbench/winbin/data/1000mostpopularadjectives.txt  
  inflating: swingbench/winbin/data/1000mostpopularwords.txt  
  inflating: swingbench/winbin/data/100mostpopularwords.txt  
  inflating: swingbench/winbin/data/catalogue.txt  
  inflating: swingbench/winbin/data/counties.txt  
  inflating: swingbench/winbin/data/countries.txt  
 extracting: swingbench/winbin/data/domains.txt  
  inflating: swingbench/winbin/data/emails.txt  
  inflating: swingbench/winbin/data/lowerfirstnames.txt  
  inflating: swingbench/winbin/data/lowerlastnames.txt  
  inflating: swingbench/winbin/data/names.txt  
  inflating: swingbench/winbin/data/nls.txt  
  inflating: swingbench/winbin/data/productids.txt  
  inflating: swingbench/winbin/data/titles.txt  
  inflating: swingbench/winbin/data/towns.txt  
  inflating: swingbench/winbin/minibench.bat  
  inflating: swingbench/winbin/oewizard.bat  
  inflating: swingbench/winbin/oewizard.xml  
  inflating: swingbench/winbin/shwizard.bat  
  inflating: swingbench/winbin/shwizard.xml  
  inflating: swingbench/winbin/swingbench.bat  
  inflating: swingbench/winbin/swingconfig.xml  

3. Move the swingbench directory

No Format
cd ~oracle
mv software/swingbench .

4. Configure swingbench

a. Change the login defaults for oewizard.xml

 

No Format
cd ~oracle/swingbench/bin
vi oewizard.xml

Change the defaults to the following:

Code Block
languagexml
   <DefaultParameters>
      <Parameter Key="datatablespacesexists" Value="true"/>
      <Parameter Key="password" Value="oe"/>
      <Parameter Key="username" Value="oe"/>
      <Parameter Key="datafile" Value="+DATA"/>
      <Parameter Key="userexists" Value="true"/>
      <Parameter Key="connectionstring" Value="//source/orcl"/>
      <Parameter Key="connectiontype" Value="thin"/>
      <Parameter Key="onlydropuser" Value="false"/>
      <Parameter Key="operation" Value="create"/>
      <Parameter Key="tablespace" Value="USERS"/>
      <Parameter Key="dbausername" Value="sys as sysdba"/>
      <Parameter Key="dbapassword" Value="oracle"/>
      <Parameter Key="output" Value="Verbose"/>
   </DefaultParameters>

...

No Format
   <Connection>
      <UserName>oe</UserName>
      <Password>oe</Password>
      <ConnectString>//source/orcl</ConnectString>
      <DriverType>Oracle jdbc Driver</DriverType>
   </Connection>

 

...

5. Create the initial swingbench tables and load them with data. This takes about 25 minutes to run. While it is running, there is no output.

No Format
cd ~oracle/swingbench/bin
./oewizard -cl -create -scale 1 -u oe -p oe -ts users -tc 16 -s 
 
============================================
|           Datagenerator Run Stats        |
============================================
Connection Time                        0:00:00.005
Data Generation Time                   0:22:58.270
DDL Creation Time                      0:02:10.680
Total Run Time                         0:25:08.959
Rows Inserted per sec                        8,784
Data Generated (MB) per sec                    0.7
Actual Rows Generated                   13,004,927

Post Creation Validation Report
===============================
The schema appears to have been created successfully.
Valid Objects
=============
Valid Tables : 'ORDERS','ORDER_ITEMS','CUSTOMERS','WAREHOUSES','ORDERENTRY_METADATA','INVENTORIES','PRODUCT_INFORMATION','PRODUCT_DESCRIPTIONS','ADDRESSES','CARD_DETAILS'
Valid Indexes : 'PRD_DESC_PK','PROD_NAME_IX','PRODUCT_INFORMATION_PK','PROD_SUPPLIER_IX','PROD_CATEGORY_IX','INVENTORY_PK','INV_PRODUCT_IX','INV_WAREHOUSE_IX','ORDER_PK','ORD_SALES_REP_IX','ORD_CUSTOMER_IX','ORD_ORDER_DATE_IX','ORD_WAREHOUSE_IX','ORDER_ITEMS_PK','ITEM_ORDER_IX','ITEM_PRODUCT_IX','WAREHOUSES_PK','WHS_LOCATION_IX','CUSTOMERS_PK','CUST_EMAIL_IX','CUST_ACCOUNT_MANAGER_IX','CUST_FUNC_LOWER_NAME_IX','ADDRESS_PK','ADDRESS_CUST_IX','CARD_DETAILS_PK','CARDDETAILS_CUST_IX'
Valid Views : 'PRODUCTS','PRODUCT_PRICES'
Valid Sequences : 'CUSTOMER_SEQ','ORDERS_SEQ','ADDRESS_SEQ','LOGON_SEQ','CARD_DETAILS_SEQ'
Valid Code : 'ORDERENTRY'
Schema Created
Note

The username is: oe

The password is: oe

The tablespace is: users

 

6. Download and install scripts

...