SwingBench---ORACLE壓力測試工具
■描述
Swingbench is a free load generator (and benchmarks) designed to stress test an Oracle database (12c, 18c, 19c).
SwingBench是Oracle UK的一個員工在一個被拋棄的項目的基礎上開發的。目前穩定版本2.6,基於JDK。該工具是免費的,可以在作者的網站上自由下載,並且擁有詳細的使用文檔。Swingbench 可 以執行4種不同的標准測試(benchmark),擁有三種前端展示方式Swingbench/Charbench/Minibench,其中 Charbench是字符模式的,另外兩種是GUI模式的。另外還可以通過ClusterOverview可以聚合顯示所有的結果。Swingbench 的開發目的主要是用來展示RAC的負載和測試,但也可用於單實例環境。2.3版本開始支持TimesTen。
SwingBench下載地址:另有Data Generator、CPU Monitor等工具
http://www.dominicgiles.com/downloads.html
■■win配置
配置好jdk環境,在win上運行swingbench\winbin下的oewizard.bat腳本,create the order entry創建測試數據,connect string的格式為//oracle數據庫所在主機的IP地址/oracle數據庫的實例名,如:【//192.168.222.69/prod_taf】。一步一步走,根據情況選擇測試數據的大小,可以選較小的1G測試數據。等待大約十幾分鍾后創建測試數據完畢。
■win測試
運行swingbench\winbin\swingbench.bat腳本,可以進行壓力測試。
■■linux配置
【非常簡單,以下為官方readme文檔介紹】
swingbench Install
^^^^^^^^^^^^^^^^^^
Unizip the swingbench<version number>.zip file
Change into the newly created swingbench directory and then either the "bin" directory
for Linux/Unix or the "winbin" for windows systems.
Ensure java (Java 8 or later) is in your executable path.
You should then be able to run swingbench or any of the wizards.
■所以只需配置java環境即可
export JAVA_HOME=/home/ituser/ljg/soft/jdk1.8.0_212
export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
■初始化sh數據,未執行
[oracle@localhost bin]$ ll sh*
-rwxr-xr-x. 1 oracle dba 128 Nov 17 2010 shwizard
-rwx------. 1 oracle dba 2499 Aug 28 2010 shwizard.xml
■初始化soe數據,ok
[oracle@localhost bin]$ ll oe*
-rwxr-xr-x. 1 oracle dba 120 Nov 17 2010 oewizard
-rwx------. 1 oracle dba 3279 Jul 27 2010 oewizard.xml
■初始化cc數據,未執行
[oracle@localhost bin]$ ll ccwizard*
-rwxr-xr-x. 1 oracle dba 120 Nov 17 2010 ccwizard
-rwx------. 1 oracle dba 4086 Jul 27 2010 ccwizard.xml
■執行sh壓力測試
./swingbench -c /swingbench/configs/shconfig.xml
■執行soe壓力測試
./swingbench -c /swingbench/configs/soeconfig.xml
■執行cc壓力測試
./swingbench -c /swingbench/configs/ccconfig.xml
■測試結果
為了能夠收集系統的io和cpu,需要登錄系統(configuration–>connect pooling–>distributed controls)