[Tencent Cloud TDSQL-C Serverless Product Evaluation] "Rubber Band" Like Database "MySQL High Pressure"

activity description

insert image description here

Tencent Cloud TDSQL-C Product Evaluation Activity" is an activity aimed at database product evaluation and product experience launched by Tencent Cloud and CSDN. This event is mainly for TDSQL-C Serverless version; Three seasons of product experience, product evaluation, high-quality paper solicitation activities, and the final online roundtable dialogue live session for outstanding users: this participation event covers users of different technical levels, preliminary product experience or automatic testing of TDSQL-C products. Product evaluations in terms of flexibility, automatic start-stop capabilities, compatibility, security, concurrency, reliability, etc., are output through solicitation of papers. Participating in activities can not only gain practical experience in related technical fields, but also gain rich benefits. active activity

Service List

What is TDSQL?

TDSQL is a new generation of cloud-native relational database developed by Tencent Cloud. Integrating the advantages of traditional database, cloud computing and new hardware technology, it is 100% compatible with MvSOL, providing users with database services with extreme flexibility, high performance, high availability, high reliability and security. Realize high throughput of over one million QPS, PB-level massive distributed intelligent storage, and serverless second-level scaling, helping enterprises accelerate digital transformation.

Serverless familiar?

Serverless service is a serverless architecture version of TDSQL-C, a new generation of cloud-native relational database developed by Tencent Cloud, and a cloud-native database with full serverless architecture. Serverless service supports charging according to the actual usage of computing and storage resources, no need to pay, and Tencent Cloud's cloud-native technology will benefit users

Reduce costs and increase efficiency, no more slogans?

Since the end of the epidemic, it seems that serverless has appeared more and more frequently around us. Under the influence of AIGC, the serverless version of AIGC has made the use cost of users and enterprises lower. Well, in fact, serverless technology has appeared in the database for several years. All major cloud vendors have been deeply involved in serverless development. Under the general trend of this year, it seems to be a theme in the IT 降本增效circle, and the development of serverless technology in database It is mature enough. For example, in the TDSQL-C Serverless version, the service is stateless when the user does not use it. This creates a scenario where the user does not need to deduct fees, which saves costs. At the same time, users don’t need to care about how big the bottom layer is or how big they need to buy. They only need to focus on the business process and let the “cloud” help us expand automatically, which indeed reduces costs and increases efficiency.

Hands-on session - "pressure" Shanda

In the previous introduction, you may feel a little confused, so the following will show you how to create and use the TDSQL-C Serverless MySQL version

experimental preview

brief introduction

Then TDSQL-C Serverless MySQL here should belong to the V1 stage from the comparison of other manufacturers, that is, the Serverless service supports charging according to the actual computing and storage resource usage, no need to pay

Resource Expansion Range (CCU)

In fact, for users, there is no specific concept of a resource model, only CCU is provided to users, that is, CCU (TDSQL-C Compute Unit) is the computing and billing unit of Serverless, and one CCU is approximately equal to 1 CPU and 2GB memory computing resources, the number of CCUs used in each billing cycle is: the maximum value between the number of CPU cores used by the database and 1/2 of the memory size

Kind tips

创建之前,请先购买存储资源包,价格更适合,降成本
创建之前,请先购买存储资源包,价格更适合,降成本
创建之前,请先购买存储资源包,价格更适合,降成本

One-click access: https://buy.cloud.tencent.com/cynosdb?product=package

service creation

If you want to get a complete serverless scaling experience, it is recommended that you choose the Guangzhou region ( 作为大本营,资源应优先在其满足)
to directly access the console with one click: https://console.cloud.tencent.com/cynosdb/mysql/ap-guangzhou/cluster/no-cluster/ detail

create cluster

insert image description here

insert image description here

View cluster information

insert image description here
insert image description here

Parameter optimization

parameter name new value
max_connections 5000
read_buffer_size 2621440
query_cache_size 1073741824
innodb_read_io_threads (will restart) 32
thread_pool_size 256
thread_cache_size 1024
  1. max_connections : This is the maximum number of concurrent connections allowed. It limits the number of clients that can connect to the MySQL server at the same time. If your application often has a large number of concurrent connections, you may need to adjust this value appropriately. However, setting a value that is too large may cause server resource exhaustion.

  2. read_buffer_size : This is the size of the buffer used for sequential read operations per connection. The read buffer is used to read data from disk and pass it to the client. Larger buffers can improve read performance, but can take up too much memory if set too large.

  3. query_cache_size : The size of the query cache, which is used to store previously executed query results. Enabling query caching can improve query performance, but may cause performance degradation in high concurrent write environments. In many cases, it is not recommended to rely too much on the query cache.

  4. innodb_read_io_threads : This is the number of read I/O threads for the InnoDB storage engine. Increasing this value can increase parallel read capability, especially when there are a large number of concurrent read operations. However, adjusting this value may require restarting the MySQL server.

  5. thread_pool_size : This is the size of the thread pool used to manage threads for client connections. The thread pool can reduce the overhead of thread creation and destruction and improve server performance. The appropriate thread pool size depends on your server hardware and the number of concurrent connections.

  6. thread_cache_size : The size of the thread cache, used to cache created threads so that they can be reused when needed. This reduces the overhead of thread creation. The appropriate thread cache size depends on the concurrent connection pattern.

You can modify it according to your actual expandable size, here is only for demonstration

insert image description here

stress load test

Stress test statement

  1. This time, the method of aggregation query is used to perform stress test on the database
  2. The test area is in Shanghai, and the optional configuration is 16-32

List of codes (partial)

insert mock data

    public void timer_task(){
    
    
        ExecutorService executorService = Executors.newFixedThreadPool(100);
        for (int i = 0; i < 100; i++) {
    
    
            InsertTask task = new InsertTask(this.table_name);
            executorService.execute(task);
        }
        executorService.shutdown();
    }
    public static void main(String[] args) {
    
    
        String table_name = args[0];
        APPMain app = new APPMain(table_name);
        app.timer.schedule(app.timerTask,0,1000);
    }

aggregation query

    public void timer_task() {
    
    
        ExecutorService executorService = Executors.newFixedThreadPool(5);
        for (int i = 0; i < 5; i++) {
    
    
            QueryTask task = new QueryTask(this.table_name);
            executorService.execute(task);
        }
        executorService.shutdown();
        try {
    
    
            if (!executorService.awaitTermination(5, TimeUnit.SECONDS)) {
    
    
                executorService.shutdownNow();
            }
        } catch (InterruptedException e) {
    
    
            executorService.shutdownNow();
        }
    }

Pressure test results (partial textures)

insert image description here

insert image description here

insert image description here
insert image description here
insert image description here

summary

Under high-pressure loads, the serverless version of the database can be rapidly expanded to meet the needs of users in stressful scenarios, and can continue to withstand the pressure to complete business operations. For the CPU and memory, the CPU is under great pressure. It can reach 100% in peak conditions, and in terms of memory conditions, it is stable in the range of 80%-90%. It is worth mentioning that its excellent monitoring data can give timely response and display

Summarize

First look at a set of data

  1. Published in 2018 from AWS Aurora Serverless V1, now Serverless V2 is launched

  2. Alibaba Cloud ApsaraDB for RDS MySQL Serverless products will officially start commercial sales on August 15, 2022

  3. Tencent Cloud officially launched the Serverless service in December 2020, and the current TDSQL-C MySQL Serverless V1 version

It can be seen that Tencent Cloud has a keen sense of smell in the field of new technologies, and at the same time has grasped the right direction. Under such a trend, the Serverless database product launched has also made some additional optimizations in combination with the domestic production environment. For example, resource packs are adopted, which are more suitable for domestic users. In terms of monitoring, it can be seen that Tencent is very careful, and the data that responds in a very timely manner can be presented to users immediately. In addition 数据库智能管家, it makes database management more convenient

We also expect Tencent Cloud to continue to optimize the serverless version of the database, keep up with the world's leading cloud manufacturers, increase the serverless CCU specification, make it more suitable for the use of enterprise users, and provide better products to help enterprises reduce costs and increase efficiency !

Guess you like

Origin blog.csdn.net/fly1574/article/details/132317979