Swingbench stress test (super detailed)

Table of Contents

The prerequisite is to have a configured oracle.

1. Environment preparation

2. Create table space

1. Modify the temporary table space (if it has been configured in Oracle, there is no need to modify it)

2. Modify the undo table space (if it has been configured in Oracle, there is no need to modify it)

3. Create Swingbench user table space

3. Install Swingbench

4. Create data

5. Pressure test


Swingbench introduction:

Swingbench is an open source benchmarking tool that can be used to test the performance and scalability of Oracle databases. It simulates real-world loads and provides reproducible test data. Swingbench can simulate different workload types, including transaction processing, data warehousing, OLTP and high-volume workloads.

Swingbench is written in Java and runs on a variety of operating systems. It provides an easy-to-use graphical user interface that allows users to easily configure test parameters and run tests. Swingbench also provides detailed test reports and performance indicators to help users evaluate the performance and scalability of Oracle databases.

Overall, Swingbench is a powerful benchmarking tool that can help Oracle database users evaluate its performance and scalability, and optimize its configuration to improve its performance.

The prerequisite is a configured oracle

1. Environment preparation

Start monitoring

lsnrctl start

Start database

sqlplus/as sysdba
startup

1. Modify the temporary table space (if it has been configured in Oracle, there is no need to modify it)

ALTER TABLESPACE temp ADD TEMPFILE '/u01/app/oracle/oradata/orcl/temp02.dbf' SIZE 30G;

2.Modify the undo table space (If it has been configured in Oracle, there is no need to modify it)

ALTER TABLESPACE undotbs1 ADD DATAFILE '/u01/app/oracle/oradata/orcl/undotbs1.dbf' SIZE 30G;

3. Create Swingbench user table space

CREATE TABLESPACE soe DATAFILE '/u01/app/oracle/oradata/orcl/soe1.dbf' SIZE 30G;

If the memory is not enough, 10G will be fine.

3. Install Swingbench

Baidu network disk download:

Link: https://pan.baidu.com/s/1q9Ryc1hVmZtwspq4Ng2jQw?pwd=r36d
Extraction code: r36d

Then upload it to /home/oracle

Then unzip

unzip swingbench25971.zip

4. Create data

After decompression is completed, enter the decompressed file

Then enter the bin directory

cd bin

Then enter this and make numbers

./oewizard

If an error is still reported here, please pay attention to whether the database service is open and whether the listener is open.

How to open the listener:

Start monitoring:

lsnrctl start

When there is no service for monitoring and the database cannot be connected:

vim $ORACLE_HOME/network/admin/listener.ora

Then add in the file


SID_LIST_LISTENER =
(SID_LIST =
  (SID_DESC =
  (GLOBAL_DBNAME = orcl)
  (SID_NAME = orcl)
  )
)

The orcl here is the name of the database service. You need to modify it according to your own name.

The way to check the name is to enter sql and execute the following command:

show parameter name

In the last service_name here, you can see that my service name is orcl

How to open database service:

sqlplus / as sysdba

Then start the database:

startup

Choose the ordinary one, it will be easy to operate later.

Just give me 1G here.

Then wait to complete the data creation.

5. Pressure test

Enter in the bin directory

./swingbench 

The number of users and other parameters can be adjusted according to your own needs. Generally, if you test by yourself, you only need to modify the number of users.

You’re done.

The knowledge points of the article match the official knowledge files, and you can further learn relevant knowledge. Cloud native entry-level skills treeHomepageOverview 16,731 people are learning the system