CN112231195B - Cloud service performance testing method - Google Patents

Cloud service performance testing method Download PDF

Info

Publication number
CN112231195B
CN112231195B CN202011462472.0A CN202011462472A CN112231195B CN 112231195 B CN112231195 B CN 112231195B CN 202011462472 A CN202011462472 A CN 202011462472A CN 112231195 B CN112231195 B CN 112231195B
Authority
CN
China
Prior art keywords
comparison value
database
performance
tables
cloud server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011462472.0A
Other languages
Chinese (zh)
Other versions
CN112231195A (en
Inventor
赵启中
杨燕清
曾伟文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Eflycloud Computing Co Ltd
Original Assignee
Guangdong Eflycloud Computing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Eflycloud Computing Co Ltd filed Critical Guangdong Eflycloud Computing Co Ltd
Priority to CN202011462472.0A priority Critical patent/CN112231195B/en
Publication of CN112231195A publication Critical patent/CN112231195A/en
Application granted granted Critical
Publication of CN112231195B publication Critical patent/CN112231195B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1805Append-only file systems, e.g. using logs or journals to store data
    • G06F16/1815Journaling file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a method for testing cloud service performance, which comprises the following steps: sorting the tables of the database from large to small according to the data volume, and recording each table as Tn in sequence; inquiring the query quantity of the table Tn, and calculating the proportion pn of the query quantity of the table Tn to the total query quantity of all tables; sorting the a tables according to the size of the data size; calculating the test weights Kt of all the tables in each table according to the proportion pn; calculating the analog data quantity Nt of each table; testing the analog data quantity Nt, and recording the CPU utilization rate Ct, the iowait value Wt and the memory utilization rate Rt corresponding to the analog data quantity Nt; and calculating a comparison value D of the comparison value A, iowait of the CPU utilization rate and a comparison value T of the memory utilization rate, and finally comparing. The invention obtains the bottleneck parameter limiting the performance of the database through testing, so that the running performance of the database can be improved in a targeted manner.

Description

Cloud service performance testing method
Technical Field
The invention relates to the technical field of cloud server testing, in particular to a cloud service performance testing method.
Background
Hardware is a key factor influencing the performance of the server and is divided into a CPU, a memory, a storage and a network. Cloud services are technologies that are flexibly distributed through virtualization after computer hardware resources are integrated. Data is an electronic repository that stores and manages data.
Cloud service prices are generally determined by how many computing resources are, such as: specification family, CPU core number, memory, disk IOPS, network bandwidth and the like; the performance of the corresponding database cannot be exerted if the computing resources are too much, the performance of the database limited by the disk IOPS cannot be effectively improved if the sizes of the CPU and the memory are increased, and the performance of the database limited by the CPU performance of the disk IOPS cannot be effectively improved if the sizes of the CPU and the memory are increased. How to determine the performance of the database is limited by which parameter, so that the performance is purposefully improved, different from the performance improvement of a common server, the performance needs to be analyzed in combination with services, and the hardware cannot be directly scored to obtain a result.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a method for testing cloud service performance, which is characterized in that bottleneck parameters for limiting the performance of a database are obtained by inputting a test tool after calculating quantifiable available data for testing, so that the running performance of the database can be improved in a targeted manner, and the situation that effective performance improvement cannot be obtained when database cloud service computing resources are improved is avoided.
In order to solve the technical problems, the invention provides the following technical scheme: a cloud service performance testing method comprises the following steps:
step S1, inquiring a database log of the cloud server, and selecting a record with a certain duration in the database log; sorting the tables of the database from large to small according to the data volume on a record with a certain duration, wherein each table is recorded as Tn in sequence, the total number of the tables of the database is a, and n is any one value from 1 to a; setting the data size of the table Tn as Sn;
on a record with a certain duration, inquiring the query quantity of a table Tn, and calculating the proportion pn of the query quantity of the table Tn to the total query quantity of all tables;
step S2, sorting the a tables in the step S1 according to the size of the data size, dividing the a tables into b parts, wherein the number of each part of the table is c, and c is equal to a divided by b;
step S3, calculating the total proportion sum of all tables in each table according to the proportion pn of each table Tn, wherein the total proportion sum is the required test weight Kt, t is an integer from 0 to (b-1), and the formula is as follows:
Kt=(p(tc+1)+p(tc+2)+p(tc+3)+……+p(tc+c))
in each table, calculating the analog data amount Nt of each table according to the data amount Sn of each table Tn and the proportion pn of each table Tn, wherein t is an integer from 0 to (b-1), and the formula is as follows:
Nt=(S(tc+1)*p(tc+1)+S(tc+2)*p(tc+2)+……+S(tc+c)*p(tc+c))*b
step S4, inputting the analog data quantity Nt of each table into a test tool for testing, and detecting and recording the CPU utilization rate Ct, the iowait value Wt and the memory utilization rate Rt corresponding to the analog data quantity Nt of each table in real time;
calculating a comparison value D of the comparison value A, iowait of the CPU utilization rate and a comparison value T of the memory utilization rate, wherein the specific formula is as follows:
A=C0*K0+C1*K1+C2*K2+……+Cb*K(b-1)
D=W0*K0+W1*K1+W2*K2+……+Wb*K(b-1)
T=R0*K0+R1*K1+R2*K2+……+Rb*K(b-1)
step S5, comparing the comparison value A, the comparison value D and the comparison value T, and if the comparison value A is the largest, judging that the CPU performance of the cloud server is a bottleneck parameter limiting the performance of the database;
if the comparison value D is the maximum, judging that the disk IO of the cloud server is a bottleneck parameter for limiting the performance of the database;
if the comparison value T is the maximum, judging that the size of the memory of the cloud server is a bottleneck parameter limiting the performance of the database;
if the comparison value A, the comparison value D and the comparison value T are equal, judging that the database performance of the cloud server has no bottleneck parameter;
if the comparison value A and the comparison value D are equal and larger than the comparison value T, judging that the CPU performance and the disk IO of the cloud server are bottleneck parameters for limiting the performance of the database;
if the comparison value A and the comparison value T are equal to each other and are greater than the comparison value D, judging that the CPU performance and the memory size of the cloud server are bottleneck parameters limiting the performance of the database;
and if the comparison value D and the comparison value T are equal and larger than the comparison value A, judging that the sizes of the disk IO and the memory of the cloud server are bottleneck parameters for limiting the performance of the database.
Further, the test tool in the step S4 is a sysbench test tool.
After the technical scheme is adopted, the invention at least has the following beneficial effects: according to the invention, the database log is used for directly obtaining the desired database table data, then the related data of the database table is obtained through calculation, finally the related data is input into a test tool for simulation test, and the bottleneck parameter limiting the performance of the database can be visually obtained according to the analysis of the test result, so that the operation performance of the database can be pertinently improved.
Drawings
Fig. 1 is a flowchart illustrating steps of a method for testing cloud service performance according to the present invention.
Detailed Description
It should be noted that, in the present application, the embodiments and features of the embodiments may be combined with each other without conflict, and the present application is further described in detail with reference to the drawings and specific embodiments.
Example 1
The implementation discloses a method for testing cloud service performance, as shown in fig. 1, comprising the following steps:
step S1, inquiring a database log of the cloud server, and selecting a record with a certain duration in the database log; sorting the tables of the database from large to small according to the data volume on a record with a certain duration, wherein each table is recorded as Tn in sequence, the total number of the tables of the database is a, and n is any one value from 1 to a; setting the data size of the table Tn as Sn;
supposing that a tables are provided, the table with the largest data size is T1, the table with the second largest data size is T2, and so on, the table with the smallest data size is Ta;
on a record with a certain duration, inquiring the query quantity of a table Tn, and calculating the proportion pn of the query quantity of the table Tn to the total query quantity of all tables;
step S2, sorting the a tables in the step S1 according to the size of the data size, dividing the a tables into b parts, wherein the number of each part of the table is c, and c is equal to a divided by b;
step S3, calculating the total proportion sum of all tables in each table according to the proportion pn of each table Tn, wherein the total proportion sum is the required test weight Kt, t is an integer from 0 to (b-1), and the formula is as follows:
Kt=(p(tc+1)+p(tc+2)+p(tc+3)+……+p(tc+c))
wherein tc +1 in the formula represents that t is multiplied by c and then is added with 1, and the subsequent tc +2, tc +3 and the like have the same meanings;
in each table, calculating the analog data amount Nt of each table according to the data amount Sn of each table Tn and the proportion pn of each table Tn, wherein t is an integer from 0 to (b-1), and the formula is as follows:
Nt=(S(tc+1)*p(tc+1)+S(tc+2)*p(tc+2)+……+S(tc+c)*p(tc+c))*b
step S4, inputting the analog data quantity Nt of each table into a test tool for testing, and detecting and recording the CPU utilization rate Ct, the iowait value Wt and the memory utilization rate Rt corresponding to the analog data quantity Nt of each table in real time; preferably, the testing tool of the invention adopts a sysbench testing tool, the sysbench is an open-source, modular and cross-platform multi-thread performance testing tool, and can be used for performing performance testing of a CPU, a memory, a disk I/O, a thread and a database, and the currently supported database comprises MySQL, Oracle and PostgreSQL; wherein iowait refers to the percentage of the CPU total time occupied by the CPU for waiting IO operation, and is a conventional technical means of a Linux system;
calculating a comparison value D of the comparison value A, iowait of the CPU utilization rate and a comparison value T of the memory utilization rate, wherein the specific formula is as follows:
A=C0*K0+C1*K1+C2*K2+……+Cb*K(b-1)
D=W0*K0+W1*K1+W2*K2+……+Wb*K(b-1)
T=R0*K0+R1*K1+R2*K2+……+Rb*K(b-1)
step S5, comparing the comparison value A, the comparison value D and the comparison value T, and if the comparison value A is the largest, judging that the CPU performance of the cloud server is a bottleneck parameter limiting the performance of the database;
if the comparison value D is the maximum, judging that the disk IO of the cloud server is a bottleneck parameter for limiting the performance of the database;
if the comparison value T is the maximum, judging that the size of the memory of the cloud server is a bottleneck parameter limiting the performance of the database;
if the comparison value A, the comparison value D and the comparison value T are equal, judging that the database performance of the cloud server has no bottleneck parameter;
if the comparison value A and the comparison value D are equal and larger than the comparison value T, judging that the CPU performance and the disk IO of the cloud server are bottleneck parameters for limiting the performance of the database;
if the comparison value A and the comparison value T are equal to each other and are greater than the comparison value D, judging that the CPU performance and the memory size of the cloud server are bottleneck parameters limiting the performance of the database;
and if the comparison value D and the comparison value T are equal and larger than the comparison value A, judging that the sizes of the disk IO and the memory of the cloud server are bottleneck parameters for limiting the performance of the database.
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various equivalent changes, modifications, substitutions and alterations can be made herein without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims (2)

1. A cloud service performance test method is characterized by comprising the following steps:
step S1, inquiring a database log of the cloud server, and selecting a record with a certain duration in the database log; sorting the tables of the database from large to small according to the data volume on a record with a certain duration, wherein each table is recorded as Tn in sequence, the total number of the tables of the database is a, and n is any one value from 1 to a; setting the data size of the table Tn as Sn;
on a record with a certain duration, inquiring the query quantity of a table Tn, and calculating the proportion pn of the query quantity of the table Tn to the total query quantity of all tables;
step S2, sorting the a tables in the step S1 according to the size of the data size, dividing the a tables into b parts, wherein the number of each part of the table is c, and c is equal to a divided by b;
step S3, calculating the total proportion sum of all tables in each table according to the proportion pn of each table Tn, wherein the total proportion sum is the required test weight Kt, t is an integer from 0 to (b-1), and the formula is as follows:
Kt=(p(tc+1)+p(tc+2)+p(tc+3)+……+p(tc+c))
in each table, calculating the analog data amount Nt of each table according to the data amount Sn of each table Tn and the proportion pn of each table Tn, wherein t is an integer from 0 to (b-1), and the formula is as follows:
Nt=(S(tc+1)*p(tc+1)+S(tc+2)*p(tc+2)+……+S(tc+c)*p(tc+c))*b
step S4, inputting the analog data quantity Nt of each table into a test tool for testing, and detecting and recording the CPU utilization rate Ct, the iowait value Wt and the memory utilization rate Rt corresponding to the analog data quantity Nt of each table in real time;
calculating a comparison value D of the comparison value A, iowait of the CPU utilization rate and a comparison value T of the memory utilization rate, wherein the specific formula is as follows:
A=C0*K0+C1*K1+C2*K2+……+Cb*K(b-1)
D=W0*K0+W1*K1+W2*K2+……+Wb*K(b-1)
T=R0*K0+R1*K1+R2*K2+……+Rb*K(b-1)
step S5, comparing the comparison value A, the comparison value D and the comparison value T, and if the comparison value A is the largest, judging that the CPU performance of the cloud server is a bottleneck parameter limiting the performance of the database;
if the comparison value D is the maximum, judging that the disk IO of the cloud server is a bottleneck parameter for limiting the performance of the database;
if the comparison value T is the maximum, judging that the size of the memory of the cloud server is a bottleneck parameter limiting the performance of the database;
if the comparison value A, the comparison value D and the comparison value T are equal, judging that the database performance of the cloud server has no bottleneck parameter;
if the comparison value A and the comparison value D are equal and larger than the comparison value T, judging that the CPU performance and the disk IO of the cloud server are bottleneck parameters for limiting the performance of the database;
if the comparison value A and the comparison value T are equal to each other and are greater than the comparison value D, judging that the CPU performance and the memory size of the cloud server are bottleneck parameters limiting the performance of the database;
and if the comparison value D and the comparison value T are equal and larger than the comparison value A, judging that the sizes of the disk IO and the memory of the cloud server are bottleneck parameters for limiting the performance of the database.
2. The method for testing cloud service performance of claim 1, wherein the testing tool in step S4 is a sysbench testing tool.
CN202011462472.0A 2020-12-14 2020-12-14 Cloud service performance testing method Active CN112231195B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011462472.0A CN112231195B (en) 2020-12-14 2020-12-14 Cloud service performance testing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011462472.0A CN112231195B (en) 2020-12-14 2020-12-14 Cloud service performance testing method

Publications (2)

Publication Number Publication Date
CN112231195A CN112231195A (en) 2021-01-15
CN112231195B true CN112231195B (en) 2021-03-30

Family

ID=74124852

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011462472.0A Active CN112231195B (en) 2020-12-14 2020-12-14 Cloud service performance testing method

Country Status (1)

Country Link
CN (1) CN112231195B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104182340A (en) * 2014-08-21 2014-12-03 浪潮(北京)电子信息产业有限公司 Database compatibility test method and system
CN106445763A (en) * 2016-09-09 2017-02-22 中国南方电网有限责任公司电网技术研究中心 Power distribution and utilization big data platform test method and system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8028205B2 (en) * 2009-03-30 2011-09-27 Hartford Fire Insurance Company System for providing performance testing information to users
CN109634825B (en) * 2018-12-11 2021-11-05 郑州云海信息技术有限公司 Virtualization platform stability testing method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104182340A (en) * 2014-08-21 2014-12-03 浪潮(北京)电子信息产业有限公司 Database compatibility test method and system
CN106445763A (en) * 2016-09-09 2017-02-22 中国南方电网有限责任公司电网技术研究中心 Power distribution and utilization big data platform test method and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
An Anomaly Detection Method for Cloud Service Platform;Ping Lou et al.;《Proceedings of the 2019 4th International Conference on Machine Learning Technologies》;20190621;第70-75页 *
分布式流处理系统的容错性能基准测试;蒋程 等;《软件工程》;20191231;第22卷(第12期);第5-10页 *

Also Published As

Publication number Publication date
CN112231195A (en) 2021-01-15

Similar Documents

Publication Publication Date Title
CN106407190B (en) Event record query method and device
WO2021159638A1 (en) Method, apparatus and device for scheduling cluster queue resources, and storage medium
CN109558989A (en) Queuing time prediction technique, device, equipment and computer readable storage medium
WO2019153487A1 (en) System performance measurement method and device, storage medium and server
CN109981702B (en) File storage method and system
CN109271435A (en) A kind of data pick-up method and system for supporting breakpoint transmission
EP2843599A1 (en) System and method to predict elapsed response time for a query during application development stage
WO2015154679A1 (en) Method and device for ranking search results of multiple search engines
CN116502877A (en) Project progress monitoring method and device, electronic equipment and readable storage medium
TW201503029A (en) Calculating a probability of a business being delinquent
CN112231195B (en) Cloud service performance testing method
CN111338959B (en) Data processing method and related equipment
US9405786B2 (en) System and method for database flow management
US20150347233A1 (en) System and method for dynamic collection of system management data in a mainframe computing environment
CN113127741A (en) Cache method for reading and writing data of mass users and posts in part-time post recommendation system
CN116151631A (en) Service decision processing system, service decision processing method and device
WO2019113263A1 (en) Method and system for tracking application activity data from remote devices and generating a corrective action data structure for the remote devices
CN111522644B (en) Method for predicting running time of parallel program based on historical running data
CN114781948A (en) Data processing method and related device for determining working quality of staff
CN111522843B (en) Control method, system, equipment and storage medium of data platform
CN112199269A (en) Data processing method and related device
CN112148491B (en) Data processing method and device
CN109783331B (en) Database cluster pressure testing method and device
CN112631892B (en) Method, computing device, and computer medium for predicting server health status
CN112035533B (en) System resource scheduling method and device based on multi-parameter quantization strategy feedback

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant