After several preparation steps as below, it’s time to bring it all together:
- Create a HammerDB Docker Image with Oracle Driver
- Deploy a HammerDB Docker Image to AWS ECS
- Setup a Testing AWS RDS Oracle Database
We ran HammerDB on AWS RDS with Oracle built-in table audit, here was the testing result.
Test round 1, db.t3.xlarge, General Purpose SSD
Database Configuration:
- db.t3.xlarge (4 vCPU, 16G RAM)
- General Purpose SSD (50G)
ECS Fargate:
Test Result:
Ran the test with 2, 4 and 6 virtual users
The system quickly saturated at 6 virtual users.
Virtual Users | NOPM |
---|---|
2 VU | 23838 |
4 VU | 28243 |
6 VU | 39273 |
Database and ECS Statistic:
Baseline test, db.t3.2xlarge, Provisioned IOPS SSD
- db.t3.2xlarge (8 vCPU, 32G RAM)
- Provisioned IOPS SSD (20000 IOPS, 400G)
P.S. Convert from General Purpose SSD (50G) to Provisioned IOPS SSD (20000 IOPS, 400G) took around an hour. Provisioned IOPS SSD was quite expensive and I were busy at the time it just completed the conversion. At the end, I terminated the original instance after convert to Provisioned IOPS SSD and rebuilt the instance with db.t3.2xlarge at a later time.
Baseline Test Result:
Ran the test with 2, 4 and 6 virtual users No bottleneck was observed for this run.
Virtual Users | NOPM |
---|---|
2 VU | 26824 |
4 VU | 50513 |
6 VU | 69078 |
Database and ECS Statistic:
Audit Select on TPCC Tables, db.t3.2xlarge, Provisioned IOPS SSD
- db.t3.2xlarge (8 vCPU, 32G RAM)
- Provisioned IOPS SSD (20000 IOPS, 400G)
Before ran the test, enabled audit on TPCC tables as below:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
NOAUDIT POLICY dml_policy;
DROP AUDIT POLICY dml_policy ;
CREATE AUDIT POLICY dml_policy ACTIONS
select on TPCC.CUSTOMER,
select on TPCC.DISTRICT,
select on TPCC.HISTORY,
select on TPCC.ITEM,
select on TPCC.WAREHOUSE,
select on TPCC.STOCK,
select on TPCC.ORDERS,
select on TPCC.NEW_ORDER,
select on TPCC.ORDER_LINE;
AUDIT policy dml_policy;
Test Result: Ran the test with 2, 4 and 6 virtual users.
We only achieved around 38%-30% of baseline test with same configuration:
Virtual Users | NOPM |
---|---|
2 VU | 10116 |
4 VU | 17370 |
6 VU | 20443 |
Database and ECS Statistic:
We didn’t fully utilize either the CPU or IOPS, however, the overall result was significantly impacted as well.
Audit All on TPCC Tables, db.t3.2xlarge, Provisioned IOPS SSD
- db.t3.2xlarge (8 vCPU, 32G RAM)
- Provisioned IOPS SSD (20000 IOPS, 400G)
Before ran the test, enabled audit on TPCC tables as below:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
NOAUDIT POLICY dml_policy;
DROP AUDIT POLICY dml_policy ;
CREATE AUDIT POLICY dml_policy ACTIONS
all on TPCC.CUSTOMER,
all on TPCC.DISTRICT,
all on TPCC.HISTORY,
all on TPCC.ITEM,
all on TPCC.WAREHOUSE,
all on TPCC.STOCK,
all on TPCC.ORDERS,
all on TPCC.NEW_ORDER,
all on TPCC.ORDER_LINE;
AUDIT policy dml_policy;
Test Result:
Ran the test with 2, 4 and 6 virtual users.
We only achieved around 24%-19% of baseline test with same configuration:
Virtual Users | NOPM |
---|---|
2 VU | 6384 |
4 VU | 10519 |
6 VU | 12785 |
Database and ECS Statistic:
We didn’t fully utilize either the CPU or IOPS, however, the overall result was significantly impacted.
Conclusion and Observation
- We could built a testing environment very quickly in AWS RDS and the platform was far better than my single PC running database on Virtual Box.
- The RDS cost for this testing was around USD30, the cost of Provisioned IOPS SSD contributed to a major portion of the cost. I terminated the instance right after testing in order to save cost.
- ECS Fargate was prefect for testing, I didn’t even need to think about terminate the EC2 after testing.
- Enable Select or All audit on all application tables would significantly impact the application performance, even the hardware resources (CPU and Disk IO) were not fully saturated. The situation would be even worst If the hardware resource was already reach the bottleneck before enabled audit.