Get the App
SLTechnology News&Howtos  ›  Database  › 

Handle series: (1) use Benchmarksql to test the performance of Oracle database

Shulou Source: shulou.com Published: 2022-06-01 18:23:35 10月04日 Update

Os environment: Oracle linux / Oracle 12C RAC (see here for building rac cluster), oracle12c database

Download Benchmarksql 5.0: https://sourceforge.net/projects/benchmarksql/ from sourceforge

As of this writing, Benchmarksql supports Firebird,Oracle and PostgreSQL

Compile BenchMarksql:

With regard to the online jdk recommendation 1.7 for benchmarksql5.0, the author has verified that 1.7 and 1.8 versions of java are all right, as long as the compiled and run versions of java match.

1. Set the environment variable: export JAVA_HOME=/path/to/jdk export PATH=$JAVA_HOME/bin:$PATH

two。 Compile with ant, execute the ant command under the directory build.xml, and encounter the following error while compiling ant:

Error: Could not find or load main class org.apache.tools.ant.launch.Launcher

Solution: export CLASSPATH=.:$ {JAVA_HOME} / lib:/usr/share/ant/lib/ant-launcher.jar

The following preparations need to be made before running Benchmarksql:

Cp $ORACLE_HOME/jdbc/lib/ojdbc8.jar $BENCHMARKSQLPATH/run

Export CLASSPATH=$BENCHMARKSQLPATH/run/ojdbc8.jar$CLASSPATH

Cp $ORACLE_HOME/jdbc/lib/ojdbc8.jar $BENCHMARKSQLPATH/lib/oracle (without this step, there will be an error that oracle class cannot be found

Modify props.ora:

Conn=jdbc:oracle:thin:@//scanip:1521/yourdb

The entire oracle rac cluster can be accessed through the scanip of Oracle RAC. The yourdb part is the database name specified when creating the database. Be careful not to configure the name of a database local instance, so that when the scanip listene receives a connection request, it will send the request to a node in the cluster according to a specific algorithm.

Test whether conn is correct: sqlplus username/password@//scanip:1521/yourdb

User and password are the usernames and passwords configured in the oracle database.

Terminals=100 (configure 100concurrent users), which can be configured on your own as needed.

Warehouses=1000 (1000 warehouse requires more than 120g of space, and data files need to be planned in advance in the database)

Loadworkers=10

Run BenchMarksql:

Cd run

. / runSQL.sh props.ora. / sql.common/tableCreates.sql

Nohup. / runLoader.sh props.ora >. / load.log 2 > & 1 &

. / runSQL.sh props.ora. / sql.common/indexCreates.sql

. / runBenchmark.sh props.ora | tee 100.out

Benchmarksql follows the Benchmark specification, and the TPMC in the result file is the indicator that we are most concerned about.

Tags: Data database compilation configuration cluster run file version environment user error test method variable name name command password metric user name Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei Xiaomi Apple Shulou Information NVidia