Test model

Updated at:

This topic describes the test model for the Tablestore performance test.

  • Table schema

    Primary key name Type Codec Length
    userid string 4-Byte-Hash + Long.toHexString 20
  • Attribute columns

    Attribute column name Type Length
    field0 string 100
    field1 string 100
    field2 string 100
    field3 string 100
    field4 string 100
  • Number of partitions

    The Tablestore automatic load balancing mechanism dynamically splits data partitions based on the data volume and access pressure of each partition. This process is automatic and does not require manual intervention. This test uses performance data from tables with 1, 4, and 16 partitions as representative examples.

    By default, a new data table has one data partition. To partition the table, you can submit a ticket.

  • Test cases
    Each stress testing machine starts N threads. Each thread creates a com.alicloud.openservices.tablestore.SyncClient object and synchronously calls the Tablestore API.
    • The test cases include the following:

      • Random write: Calls SyncClient.putRow. Each request contains one row of data. The test runs for 1 hour.
      • Batch write: Calls SyncClient.batchWriteRow. Each request contains 200 rows of data. The test runs for 1 hour.
      • Random read: First, calls BatchWriteRow to write data. About 20 GB of data is written to each partition. Then, calls SyncClient.getRow. Each request retrieves one row of data. The test runs for 0.5 hours.
      • Random range read: First, calls BatchWriteRow to write data. About 20 GB of data is written to each partition. Then, calls SyncClient.getRange. Each request retrieves 100 rows of data. The test runs for 0.5 hours.

      To avoid the impact of the network environment, all test cases directly request the private endpoint of the Tablestore instance.

      This performance test is not a stress test of the product's maximum capabilities. It did not trigger Tablestore's server-side throttling. The automatic load balancing mechanism of Tablestore ensures that the service capability for a single table can scale horizontally. Large-scale performance tests may trigger backend throttling and incur high costs. To run a large-scale performance test, you can submit a ticket to ensure accurate results and control costs.

      Tablestore processes BatchWriteRow operations concurrently by partition. Data for each partition is written to the disk in a single operation. When you structure BatchWriteRow requests, aggregate the data by partition key. This reduces the number of disk writes per BatchWriteRow operation and improves write performance.

      In the random read and random range read test cases, the cache hit ratio increases over time because there is no write pressure. In low-pressure scenarios, the cache hit ratio increases slowly and is more affected by disk I/O. In high-pressure scenarios, the cache hit ratio increases quickly and is less affected by disk I/O.

      The BatchWriteRow and GetRange test cases use a significant amount of network bandwidth. If the read and write performance of Tablestore does not meet your expectations, check if your machine's network bandwidth is fully utilized.

      The read performance of Tablestore is heavily influenced by data volume and cache hit ratio. Therefore, the GetRow and GetRange test cases do not cover all user scenarios. The performance data from these test cases is reproducible. You can use the data in this report as a reference if your use case is similar. If your read/write throughput or latency differs significantly from the data in this report, contact Tablestore support to help analyze the cause.