This topic describes how to select ECS instances to manually deploy various high-performance databases.
Scene description
Databases have been a core component in building modern applications, since almost all applications start from and end with data. As the data-driven era comes, data is everywhere and further serves as a cornerstone for future innovation.
With the growing trends toward microservice-oriented applications and data diversification, one type of database can no longer meet the needs of modern applications. As a result, various purpose-built databases appear, including relational databases, key-value databases, document databases, in-memory databases, graph databases, time-series databases, wide-column databases, and ledger databases.
As the data mesh concept is introduced, data management platforms are shifting from centralized models to customization based on business lines (LOBs). Businesses customize solutions based on their needs to build a data management platform with high availability, high performance, and rich features. This type of platform has higher infrastructure requirements.
Select a database
The following table shows the features and corresponding products of different database types. Select an appropriate database product based on your actual business needs.
Run a performance test
After determining the database type, you can run a performance test to confirm the database configuration.
Build a basic environment
- Instance type: ecs.r3il.xlarge
- Storage: System volume capacity > 100 GiB
- Network configuration: Select "Assign Elastic IP (EIP)".
- Instance name: HammerDB-01 and HammerDB-02, respectively.
Deploy a HammerDB test tool
Deploy HammerDB on the instance named HammerDB-01.
- Press Ctrl + Alt + Del at the same time. Or, as shown in the picture below, click the icons in the labeled order. Then, the interface with a password text box appears. Enter the password to remotely log in to the instance.
-
- Open the IE browser and, in the address bar, manually input https://www.hammerdb.com/download.html to download and install HammerDB test software.
-
- After the download, double-click the software installation package to install HammerDB. Then, follow the guidance of the installation wizard to complete the installation.
-
- If the following output is displayed, the installation is completed.
-
- Open a new page in the IE browser and, in the address bar, input https://go.microsoft.com/fwlink/?linkid=2168524 to download SQL Server ODBC Driver 17. Then, follow the guidance of the installation wizard to complete the installation.
-
Deploy a database
Deploy SQL Server 2019 on the instance HammerDB-02.
- Follow Step 3 in the "Deploy a HammerDB test tool" section, and log in to the instance HammerDB-02.
- Open the IE browser and, in the address bar, manually input https://www.microsoft.com/zh-cn/sql-server/sql-server-downloads to download SQL Server 2019.
- Select the installation type of "Basic".
-
- Click "Accept" to continue the installation until it is completed.
-
- On the SQL Server 2019 download page in IE browser, scroll down to the "SQL tools and drivers" section, and click "Download now" in the "SQL Server Management Studio" section.
- The page will then redirect to the download page. Click as shown in the picture below to download SQL Server Management Studio (SSMS) 18.10.
-
- Install SSMS as guided by interface prompts. After SSMS is installed, restart the instance.
-
- Click as shown in the picture below to open SQL Server Configuration Manager.
-
- In the "Sql Server Configuration Manager" window, under the "Status" column, right-click "Disabled" of "Named Pipes" and "TCP/IP" respectively, to change statuses to "Enabled". After this, Named Pipes and TCP/IP protocols are enabled.
-
- Click as shown in the picture below to use SSMS to access the database.
-
- Click "Connect" to connect to the database.
-
- Right-click the database name, and click "Properties" to set properties.
-
- Click "Security" to enter the "Security" page, select "SQL Server and Windows Authentication mode", and then click "OK". In the dialog box that pops up, click "OK".
-
- Right-click "Database > New Database" to create a new database.
-
- Operate as shown in the picture below to create a database named "tpcc". After the database is created, click "OK".
-
- Under the "Security" directory, right-click "Logins > New Login".
-
- Operate as shown in the picture below to create the user "tpcc-test". At this time, do not click "OK".
-
- Click "User Mapping", check "tpcc", and click "OK".
-
Generate the test data
Use the HammerDB tool to generate the test data.
- Remotely connect to the instance HammerDB-01 with HammerDB installed, and then open HammerDB.
- Double-click "SQL Server", select "TPCC-C", and then click "OK".
-
- Double-click "TPROC-C", double-click "Schema Build" in the displayed directory, and then double-click "Options" in the expanded directory.
-
- In the "Microsoft SQL Server TPROC-C Build Options" box, enter the private IP address of instance HammerDB-02 (where SQL Server is installed), along with the account and password of the tpcc-test database. Set a desired number of Warehouses (determines the size of test data generated in the database) and the number of virtual accounts for parallel insertion. After configuration, click "OK."
You can obtain the private IP address of the instance on the Instances page in the ECS console. -
- Double-click "Build", and in the pop-up dialog box, click "Yes".
-
- The test data insertion starts. This process may take several hours.
-
- If the following output is displayed, the data insertion process is complete.
-
- Click the red square to destroy the virtual client.
-
Start the test
- As shown below, click "Load" to load the test script.
-
- As shown below, click "Options" under "Virtural User". In the pop-up dialog box, set the number of clients to test for the "Virtual Users" parameter (the larger the number, the higher the concurrency). Then, configure the action intervals in "User Delay", along with "Repeat Delay" (the smaller the values, the more frequent the operations), and click "OK".
-
- Double-click "Create" to create a virtual client.
-
- Double-click "Run" to start the test.
-
- Click to open "Transaction Counter" to view TPM.
-
Summarize the test
We can obtain performance test results as accurate as possible by averaging the results of multiple tests on the same instance type. By thoroughly testing the performance of cloud services across instances of different types, you can apply the most cost-effective solution to deploy different databases.