Experience the ultimate elasticity of PolarDB for PostgreSQL Serverless for free

Updated at:

This topic describes how to experience the ultimate elasticity of PolarDB for PostgreSQL Serverless for free.

Background

The cloud-native database PolarDB for PostgreSQL Serverless scales resources up and down dynamically. It uses a multi-node architecture to ensure high availability for clusters, covers a wide auto-scaling range, and delivers second-level scaling. It absorbs sudden workload spikes without affecting your business at any time.

The following figure shows how resource usage and specifications change for common clusters and Serverless clusters in scenarios where workloads fluctuate significantly:

Comparison between common clusters and Serverless clusters.png

As shown in the preceding figure, in scenarios where workloads fluctuate significantly:

  • Common clusters: more resources are wasted during off-peak periods, and resources are insufficient during peak periods, which harms your business.

  • Serverless clusters:

    • Because their specifications adjust to business demand at any time, very few resources are wasted overall. This improves resource utilization and reduces resource consumption.

    • They can also fully meet business demand during peak periods, keep your business running, and improve system stability.

    • They break the fixed-resource billing model and replace it with true pay-as-you-go billing, in which resources match the load dynamically. This saves significant costs.

    • No manual specification changes are required. This improves O&M efficiency and the experience of O&M managers and developers.

    • They are optimized by design for high-throughput write and high-concurrency scenarios, and they provide elastic scaling. They suit workloads with large data volumes and typical peaks and troughs in access traffic.

Alibaba Cloud provides a performance and cost-effectiveness experience center for database solutions. It simulates a scenario in which a client sends write requests to PolarDB, so that you can experience the intelligent Serverless elasticity of the primary node. A Sysbench script runs stress tests by accessing the cluster endpoint, and the specifications of the PolarDB primary node scale and reconfigure automatically based on the load to deliver Serverless capabilities.

Without purchasing any resources, you can experience the ultimate elasticity of the PolarDB for PostgreSQL Serverless feature online.

Impact

This performance and cost-effectiveness trial does not involve deployment in a production environment, so it does not affect your business.

Fees

In this trial, the resources involved do not belong to you, so no fees are incurred. You can proceed with the trial with confidence.

Trial details

Trial environment

In this free trial, Alibaba Cloud provides a preconfigured environment for you to use. The details of the preconfigured environment are as follows:

  • A PolarDB for PostgreSQL Serverless cluster is provided. The details are as follows:

    • Kernel version: 2.0.14.18.0

    • Scaling limits for a single node: 1 PCU to 10 PCU

    • Storage type: AutoPL

  • A stress testing machine with the Sysbench stress testing tool installed is provided. It runs stress testing tasks against the PolarDB for PostgreSQL Serverless cluster. The stress testing details are as follows:

    • Test modes: oltp_read_write, oltp_read_only, oltp_write_only, oltp_delete, oltp_update_index, and oltp_update_non_index.

      Test mode

      Description

      oltp_read_write

      Tests the read and write performance of the primary node.

      oltp_read_only

      Tests the read-only performance of the primary node.

      oltp_write_only

      Tests the write performance of the primary node.

      oltp_delete

      Tests the delete performance of the primary node.

      oltp_update_index

      Tests the performance of updating indexed fields on the primary node.

      oltp_update_non_index

      Tests the performance of updating non-indexed fields on the primary node.

      Note

      The rest of this topic uses the oltp_write_only mode as an example.

    • Stress testing table size: 16 tables, with 500,000 rows in each table

    • Stress testing pace: the test starts with 4 concurrent threads and adds 4 threads every 30 seconds until it reaches 32 threads. After it reaches 32 threads, it removes 4 threads every 30 seconds until it returns to 4 threads, and then holds at 4 threads until the test ends.

    • Stress testing duration: 10 minutes in total

Metrics to observe

  • TPS (Transactions Per Second): the number of transactions that the database runs per second, counted by successful COMMIT operations. Use this metric to observe cluster performance.

  • Number of PCUs: PolarDB Serverless cluster compute nodes are measured in PCU (PolarDB Capacity Unit). 1 PCU is approximately equal to 1 vCPU and 2 GB of memory, and 0.5 PCU is approximately equal to 0.5 vCPU and 1 GB of memory.

Procedure

  1. Go to the Yaochi Solutions Center.

  2. Click Performance & Cost-Effectiveness Experience Center, and then on Serverless Elasticity & Cost-Effectiveness Observation, click the Free Trial button. The page appears.

  3. In the stress testing options, set Stress Test Product to PolarDB PostgreSQL and Stress Test Tool to Sysbench.

  4. At the bottom of the page, click the Create Free Trial Task button.

  5. Select a Stress Test Mode, and then click OK in the dialog box that appears to create the Sysbench stress testing task.

    Note

    The following steps use the oltp_write_only mode as an example.

  6. Wait a moment, and then click image.png to refresh the task list. You can see that the stress testing task you created has started.

    Note

    The stress testing task runs for 10 minutes. Complete the remaining steps before the Estimated End Time.

  7. Click View Details to go to the real-time stress testing page.

    As the stress testing task progresses, the Overall Cluster Performance (measured in TPS) and the Number of PCUs for the Primary Node change.

    • As the number of concurrent threads in the stress test increases, the CPU utilization of the primary node keeps rising and triggers a scale-up of the primary node's PCUs. The PCUs of the primary node scale up within seconds and then increase progressively to 8 PCU as the load grows.

    • The TPS of the cluster also rises as the number of PCUs increases. This shows that the processing capacity of PolarDB improves with Serverless elasticity.

    • After the number of concurrent threads in the stress test starts to drop and the cluster load falls, the number of PCUs for the primary node stays stable for an observation period. It then scales down automatically in increments of 0.5 PCU.

      image

  8. (Optional) For a task that you created, go to the Serverless Elasticity & Cost-Effectiveness Observation page and click Trial Records. In the panel that appears, click All Tasks or My Tasks to view the details of the trial results.

References