All Products
Search
Document Center

ApsaraDB for OceanBase:TDE test report

Last Updated:Nov 27, 2024

This topic describes the performance differences in ApsaraDB for OceanBase when transparent data encryption (TDE) is enabled and disabled. This helps you evaluate whether to enable TDE.

Test conclusion

Performance testing of online transaction processing (OLTP) workloads with 128 or 256 concurrent connections shows that enabling TDE has no impact on update performance. However, other operations experience slight performance loss, as listed below:

  • Point selects: about 3%. Read-only operations: about 1%.

  • Read-write operations: about 2%. Write-only operations: about 1%. Inserts: about 1%.

The most noticeable impacts are observed for point selects and read-write operations, although both remain below 3%.

Test environment

  • Cluster configuration

    Item

    Configuration

    Cluster version

    OceanBase V4.2.1.8

    Cluster specifications

    2F1A, primary zone=zone1, 8C16G

    Cluster server

    • CPU cores: 8C

    • Memory: 61 GB

  • Client configuration

    Item

    Configuration

    OS

    Linux iZbp1eodxjpfw80wly2g4oZ 5.10.134-16.3.al8.x86_64 #1 SMP Tue Mar 26 18:54:05 CST 2024 x86_64 x86_64 x86_64 GNU/Linux

    sysbench

    sysbench 1.0.20

    CPU cores

    8C

    Memory

    30 GB

Test tool

sysbench is an open source, cross-platform, and multi-threaded benchmarking tool that uses a modular design to evaluate the performance of a system that runs an intensively loaded database.

Test metrics

  • Transactions per second (TPS): the number of committed transactions executed per second in the database.

  • Average latency: the average time spent to execute a transaction in the database, in milliseconds.

Test procedure

The test involves 128 tables, each with 1 million data records, and runs for 60 seconds.

Install sysbench

You can use the yum install command to install sysbench with a few clicks or manually install it.

  • Use the yum install command to install sysbench.

    Run the following command on the client to install sysbench:

    sudo yum install sysbench
  • Manually install sysbench.

    1. Download sysbench.

      To download sysbench, visit GitHub.

    2. Decompress the sysbench package.

      unzip ./1.0.20.zip
    3. Compile sysbench.

      Go to the directory of sysbench and run the following commands to compile sysbench:

      [w****@localhost ~]# cd sysbench-1.0.20
      [w****@localhost sysbench-1.0.20]# ./autogen.sh
      [w****@localhost sysbench-1.0.20]# ./configure --prefix=/usr/sysbench/ --with-mysql-includes=/usr/include/mysql/ --with-mysql-libs=/usr/lib64/mysql/ --with-mysql
      [w****@localhost sysbench-1.0.20]# make
      [w****@localhost sysbench-1.0.20]# make install

      The following table describes the parameters.

      Parameter

      Description

      --prefix

      Specifies the installation directory of sysbench.

      --with-mysql-includes

      Specifies the directory that contain the MySQL header files.

      --with-mysql-libs

      Specifies the directory that contain the MySQL libraries.

      --with-mysql

      Enables MySQL support in sysbench by default.

    4. Run the following command to verify whether sysbench is installed successfully:

      [w****@localhost sysbench-1.0.20] $./src/sysbench --help 

      If the following information is returned, sysbench is installed successfully:

      Usage:
          sysbench [options]... [testname] [command]
      Commands implemented by most tests: prepare run cleanup help

Run the test

Note
  • The following test process is consistent across all other thread and script tests.

  • In this test, the read-write script is executed against a MySQL tenant for 60 seconds by using 128 threads and 128 tables, each containing 1 million data records.

  1. For more information about how to build an ApsaraDB for OceanBase in MySQL mode, see Purchase an instance > Create a tenant > Create an account > Create a MySQL database.

  2. Log in to the test tenant. You can log in to the ApsaraDB for OceanBase and obtain the connection string information. For more information, see Obtain connection parameters.

    obclient -h$host -P$port -u$user_name -p****** 
  3. Clear unused data to free up disk space.

    obclient> PURGE RECYCLEBIN; 
  4. Set the timeout.

    obclient > set global ob_query_timeout=36000000000;
  5. Set the TDE feature. For more information, see Enable TDE.

  6. Log out from the ApsaraDB for OceanBase and use sysbench to load test data.

    [w****@localhost src]# ./sysbench --db-driver=mysql --mysql-host=[database server host] --mysql-port=[database server port] --mysql-user=[database user name] --mysql-password=[database user password] --mysql-db=testdb --table_size=1000000 --tables=128 --threads=128 --time=60 oltp_read_write prepare
  7. Run the custom test script.

    [w****@localhost src]# ./sysbench --db-driver=mysql --mysql-host=[database server host] --mysql-port=[database server port] --mysql-user=[database user name] --mysql-password=[database user password] --mysql-db=testdb --table_size=1000000 --tables=128 --threads=128 --time=60 oltp_read_write run
  8. Clear up data.

    [w****@localhost src]# ./sysbench --db-driver=mysql --mysql-host=[database server host] --mysql-port=[database server port] --mysql-user=[database user name] --mysql-password=[database user password] --mysql-db=testdb --table_size=1000000 --tables=128 --threads=128 --time=60  oltp_read_write cleanup

Test results

Test scripts/Threads

TDE enabled

128(tps/rt avg)

256(tps/rt avg)

rate

point select

No

161720.04/0.79

172429.16/1.48

\

point select

Yes

161113.90/0.79

167284.47/1.53

-2.98%

read only

No

6571.77/19.47

6877.75/37.19

\

read only

Yes

6558.48/15.51

6813.74/37.54

-0.93%

read write

No

3483.70/36.10

3575.20/71.50

\

read write

Yes

3391.10/37.72

3572.78/71.55

-2.61%

insert

No

37806.09/3.38

54585.23/4.69

\

insert

Yes

37121.78/3.45

54353.98/4.71

-0.42%

update

No

29743.67/4.30

38743.35/6.61

\

update

Yes

29866.70/4.28

38905.09/6.58

No impact

update non index

No

38892.58/3.29

55662.11/4.60

\

update non index

Yes

39250.25/3.26

56661.89/4.52

No impact

write_only

No

11583.12/11.05

12395.72/20.64

\

write_only

Yes

11450.32/11.17

12259.25/20.87

-1.10%

Note

The minus sign (-) in the rate column in the preceding table indicates a performance loss. For example, the performance of point select drops by 2.98% after TDE is enabled.