下载
https://sourceforge.net/projects/benchmarksql/?source=typ_redirect
0. Requirements
Use of JDK7 is required.---经过我测试,使用rhel自带的openjdk就行。
1. Create the benchmarksql user and a database
As Unix user postgres use the psql shell to connect to the postgres
database and issue the CREATE USER and CREATE DATABASE commands.
[postgres#localhost ~] $ psql postgres psql (9.5.2) Type "help" for help. postgres=# CREATE USER benchmarksql WITH ENCRYPTED PASSWORD 'changeme'; postgres=# CREATE DATABASE benchmarksql OWNER benchmarksql; postgres=# \q [postgres#localhost ~] $
2. Compile the Benchmarksql source code
[wIEck@localhost ~] $ cd benchmarksql yum install ant vi +23 build.xml 定位到第23行 <javac enCoding="utf-8" srcdir="${src}" destdir="${build}" classpathref="classpath" ~~~~~~~~~~~~~~~这是新加的 vi +36 build.xml 定位到第36行 osCollectorDevices=net_enp0s3 blk_sda ~~~~~~~~~~~~~~此处自己写网卡名称和磁盘名称。 [wIEck@localhost ~] $ cd benchmarksql [wIEck@localhost benchmarksql] $ ant
3. Create the benchmark configuration file
[wIEck@localhost benchmarksql] $ cd run
[wIEck@localhost run] $ cp props.pg my_postgres.propertIEs
[wIEck@localhost run] $ vi my_postgres.propertIEs
[wIEck@localhost run] $
如下是修改过的参数
[highgo@hgdb01 run]$ cat my_postgres.propertIEs db=postgresdriver=org.postgresql.Driverconn=jdbc:postgresql://192.168.80.172:5432/benchmarksql?ssl=true&sslfactory=org.postgresql.ssl.NonValIDatingFactoryuser=benchmarksqlpassword=changemewarehouses=1loaDWorkers=4terminals=5//To run specifIEd transactions per terminal- runMins must equal zerorunTxnsPerTerminal=0//To run for specifIEd minutes- runTxnsPerTerminal must equal zerorunMins=10//Number of total transactions per minutelimitTxnsPerMin=0 --->>>表示不限制每分钟的事务数//Set to true to run in 4.x compatible mode. Set to false to use the//entire configured database evenly.terminalWarehouseFixed=true//The following five values must add up to 100//The default percentages of 45,43,4,4 & 4 match the TPC-C specnewOrderWeight=45paymentWeight=43orderStatusWeight=4deliveryWeight=4stockLevelWeight=4// Directory name to create for collecting detailed result data.// Comment this out to suppress.resultDirectory=my_result_%tY-%tm-%td_%tH%tM%tSosCollectorScript=./misc/os_collector_linux.pyosCollectorInterval=1//osCollectoRSSHAddr=user@dbhostosCollectorDevices=net_enp0s3 blk_sda[highgo@hgdb01 run]$4. Build the schema and initial database load Execute the runDatabaseBuild.sh script with your configuration file. [wIEck@localhost run]$ ./runDatabaseBuild.sh my_postgres.propertIEs 5. Run the configured benchmark [wIEck@localhost run]$ ./runBenchmark.sh my_postgres.propertIEs 6. Scale the benchmark configuration. Change the my_postgres.propertIEs file to the correct scaling (number of warehouses and concurrent connections/terminals). Switch from using a transaction count to time based: runTxnsPerTerminal=0 runMins=180 Rebuild the database (if needed) by running [wIEck@localhost run]$ ./runDatabaseDestroy.sh my_postgres.propertIEs [wIEck@localhost run]$ ./runDatabaseBuild.sh my_postgres.propertIEs Then run the benchmark again. Rinse and repeat. 7. Result report Benchmarksql collects detailed performance statistics and (if configured) OS performance data. The example configuration file defaults to a directory starting with my_result_. Use the generateReport.sh DIRECTORY script to create an HTML file with graphs. This requires R to be installed,which is beyond the scope of this HOW-TO. 总结
以上是内存溢出为你收集整理的在HGDB v4.3.2版本上进行BenchmarkSQL测试全部内容,希望文章能够帮你解决在HGDB v4.3.2版本上进行BenchmarkSQL测试所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)