WO2017084505A1 - 一种获得应用集群容量的方法和装置 - Google Patents

一种获得应用集群容量的方法和装置 Download PDF

Info

Publication number
WO2017084505A1
WO2017084505A1 PCT/CN2016/104837 CN2016104837W WO2017084505A1 WO 2017084505 A1 WO2017084505 A1 WO 2017084505A1 CN 2016104837 W CN2016104837 W CN 2016104837W WO 2017084505 A1 WO2017084505 A1 WO 2017084505A1
Authority
WO
WIPO (PCT)
Prior art keywords
application cluster
capacity
application
cluster
test machine
Prior art date
Application number
PCT/CN2016/104837
Other languages
English (en)
French (fr)
Inventor
刘岳嘉
Original Assignee
阿里巴巴集团控股有限公司
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 阿里巴巴集团控股有限公司 filed Critical 阿里巴巴集团控股有限公司
Priority to US15/769,050 priority Critical patent/US11231947B2/en
Publication of WO2017084505A1 publication Critical patent/WO2017084505A1/zh
Priority to US17/572,736 priority patent/US20220129288A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3006Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is distributed, e.g. networked systems, clusters, multiprocessor systems
    • 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/3442Recording 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 planning or managing the needed capacity
    • 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/3457Performance evaluation by simulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/81Threshold
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/503Resource availability

Definitions

  • the present application relates to the field of computer technologies, and in particular, to a method for obtaining application cluster capacity and an apparatus for obtaining application cluster capacity.
  • the capacity ratio of each application When determining the capacity ratio of each application, it is necessary to first calculate the capacity of each application cluster, where the capacity is the number of resource instances (or the number of machines) required by the application cluster. At present, the capacity of computing application clusters is mostly based on manual estimation or stand-alone pressure measurement.
  • the manual estimation method is to first estimate the ability of the application cluster to achieve or the total value of the pressure, as well as the ability of the single machine, and then divide the expected capacity (or estimated total pressure) by the estimated stand-alone capability. Get the overall capacity of the application cluster. After the capacity of all applications is obtained according to this method, the capacity ratio calculation of each application can be performed.
  • the single-machine pressure measurement method uses a pressure measurement tool to test a single machine to obtain the single machine capability of the single machine, and then divides the capability to be achieved by the single machine capability obtained by the single machine pressure measurement to obtain the overall capacity of the application cluster.
  • the single-machine capability obtained by the above two methods will be affected by various peripheral factors, and the obtained value is not credible, which will affect the accuracy of the overall capacity of the application cluster.
  • the other VM resources of the host where the current VM (Virtual Manufacturing) is located are idle, which may cause an excessive estimation of the stand-alone capability, and then use the expected capacity to obtain the total capacity of the application. There will be too much data deviation.
  • the large business traffic model is quite different from the normal business traffic model, and it is also a factor that affects the capacity estimation.
  • the invention of the embodiments of the present application aims to provide a method for obtaining application cluster capacity, which can improve the accuracy of the overall capacity of the application cluster.
  • the embodiment of the present application further provides a device for obtaining an application cluster capacity, to ensure the foregoing method. Implementation and application.
  • the present application discloses a method for obtaining application cluster capacity, including:
  • the application cluster comprising at least two test machines
  • the testing machine of the application cluster performs an overall pressure measurement to obtain an average stand-alone capability of the testing machine, including:
  • the average stand-alone capability of the test machine is obtained when the pressure value reaches a maximum value within a pressure value that triggers a current limit threshold of the application cluster.
  • the adjusting pressure value comprises:
  • the pressure value is reduced according to a preset step size.
  • the obtaining the average stand-alone capability of the test machine comprises:
  • the average number of requests per second of the test machine of the application cluster is used as the average stand-alone capability of the test machine.
  • the shrinking the application cluster comprises:
  • the application cluster is gradually reduced according to a preset shrinkage ratio.
  • the method further includes:
  • the method further includes:
  • the capacity of the application cluster is adjusted according to the affordability of the planned application cluster.
  • the adjusting the capacity of the application cluster according to the affordability of the planned application cluster comprises:
  • the capacity of the application cluster is adjusted according to a ratio between the affordability of the planned application cluster and the total pressure of the application cluster.
  • the application cluster includes: at least two test machines, where the number of the application clusters is greater than 1, wherein the single application cluster comprises: at least one test machine.
  • the embodiment of the present application further discloses an apparatus for obtaining an application cluster capacity, including:
  • a simulation unit configured to set a simulated application cluster to be tested, the application cluster including at least two test machines;
  • a pressure measuring unit configured to perform an overall pressure measurement on the test machine of the application cluster to obtain an average stand-alone capability of the test machine
  • the capacity calculation unit is configured to calculate the capacity of the application cluster according to the total pressure of the application cluster and the average stand-alone capability of the test machine.
  • the pressure measuring unit comprises:
  • An initialization subunit configured to perform an overall pressure measurement on the test machine of the application cluster according to a preset initial pressure value
  • a conditioning subunit configured to adjust a pressure value
  • the obtaining subunit comprises:
  • the volume reduction sub-unit is configured to reduce the application cluster when the load capacity of the application cluster reaches a retraction threshold of the elastic expansion;
  • Determining a sub-unit configured to: when the application cluster is contracted to a load capacity of the application cluster to reach a scalability threshold of the elastic expansion, the average number of requests per second of the test machine of the application cluster is taken as The average stand-alone capability of the test machine.
  • the device further comprises:
  • the capacity adjustment unit is configured to adjust the capacity of the application cluster according to the affordability of the planned application cluster.
  • the embodiments of the present application include the following advantages:
  • the embodiment of the present application can obtain a more accurate and realistic average single machine capability by setting a simulated application cluster to be tested and performing overall pressure measurement on multiple test machines of the entire simulated application cluster, thereby obtaining a more accurate application cluster. Capacity.
  • FIG. 1 is a flow chart of steps of an embodiment of a method for obtaining application cluster capacity according to the present application
  • FIG. 2 is a flow chart showing the steps of an embodiment of a method for performing an overall pressure measurement on a test machine of an application cluster to be tested in the present application to obtain an average stand-alone capability of the test machine;
  • FIG. 3 is a flow chart showing the steps of an embodiment of a method for obtaining an average stand-alone capability of a test machine in the present application
  • FIG. 4 is a flow chart of another step of an embodiment of a method for obtaining application cluster capacity according to the present application
  • FIG. 5 is a structural block diagram of an apparatus for obtaining application cluster capacity according to the present application.
  • Figure 6 is a block diagram showing the structure of a pressure measuring unit in the present application.
  • FIG. 7 is a structural block diagram of an acquisition subunit in the present application.
  • FIG. 8 is a structural block diagram of another embodiment of an apparatus for obtaining application cluster capacity according to the present application.
  • FIG. 1 a flow chart of steps of an embodiment of a method for obtaining application cluster capacity of the present application is shown, which may specifically include the following steps:
  • Step 101 Set a simulated application cluster to be tested, and the application cluster may include at least two test machines.
  • the environment for measuring the capacity ratio of the plurality of application clusters is first prepared, and the application cluster that needs to be measured by the capacity is determined, and the application cluster may be one or more; wherein, the application cluster When the number of the application clusters is 1, the application cluster may specifically include: at least two test machines. When the number of the application clusters is greater than 1, the single application cluster may specifically include: at least one test machine.
  • the device for obtaining the application cluster capacity (hereinafter referred to as the device) first sets the simulation environment corresponding to the determined application cluster that needs to perform the capacity measurement in this step, that is, sets the application cluster exactly the same as the application cluster that needs to perform the capacity measurement.
  • Application cluster The difference between the simulation environment set by the device and the actual application cluster may be that the application cluster in the simulation environment cannot provide external access, and is only used for capacity measurement.
  • Step 102 Perform an overall pressure test on the test machine of the application cluster to obtain an average stand-alone capability of the test machine.
  • the test machine of the application cluster is subjected to an overall pressure measurement.
  • the pressure measurement is the simulation pressure on the online flow.
  • the pressure measurement tool can be used to regulate the flow on the application cluster test machine, and the overall pressure measurement process is simultaneously directed to multiple test machines under the application cluster, and
  • the method may involve collaborative pressure measurement of multiple application clusters, and there is a call relationship between multiple application clusters, and the flow rate of the pressure measurement is also the real traffic on the simulation line, so that the overall pressure measurement is closer to reality than the single machine pressure measurement.
  • the embodiment can directly obtain the limit capability of multiple test machines under the application cluster, and then obtain the average stand-alone capability of the test machine by means of the mean calculation. It is also possible to introduce an elastic platform in the process of pressure measurement to expand or shrink the test machine of the application cluster, thereby obtaining the average stand-alone capability of the test machine, specifically See the description of the subsequent embodiments.
  • Step 103 Calculate the capacity of the application cluster according to the total pressure of the application cluster and the average stand-alone capability of the test machine.
  • the capacity of the application cluster can be calculated based on the estimated or preset total pressure of the application cluster and the average stand-alone capability of the test machine. Specifically, the total value of the application cluster is divided by the average stand-alone capability of the test machine to obtain the capacity of the application cluster.
  • the total value of the pressure of the application cluster may be preset or may be estimated according to the existing method, and is not specifically limited herein.
  • the total value of the pressure can be divided into two situations: 1. The case with a preset target value: if the target is 12W, the pressure measurement is performed according to 12W; 2. The case where the target pressure value is not estimated is mainly measured. How much pressure can the existing total machine resources withstand.
  • the capacity ratio of multiple application clusters can be further adjusted.
  • the flexible platform will adjust the capacity of each application cluster. Under the condition of limited machine resources, the number of applications will be reduced, and then expanded. Finally, multiple application clusters will be adjusted by the flexible platform to suit the current pressure. The capacity ratio.
  • the embodiment of the present application can obtain a more accurate and realistic average single machine capability by setting a simulated application cluster to be tested and performing overall pressure measurement on multiple test machines of the entire simulated application cluster, thereby obtaining a more accurate application cluster. Capacity.
  • the process of performing overall pressure measurement on the test machine of the application cluster to obtain the average stand-alone capability of the test machine, as shown in FIG. 2, may include:
  • Step 201 Perform an overall pressure test on the test machine of the application cluster according to a preset initial pressure value.
  • the pressure testing tool can be used to perform an overall pressure measurement on the simulated test machine of the application cluster to be tested according to a preset initial pressure value as specified by the user.
  • step 202 the pressure value is adjusted.
  • the pressure value may be gradually increased, and the pressure value may be gradually increased according to a preset step size. If the initial pressure value is set too large and the current limit threshold of the application cluster is triggered, the pressure value needs to be lowered. When the pressure value is lowered, the pressure measuring tool can gradually reduce the pressure value according to a preset step size.
  • the current limit threshold of the application cluster is set according to the estimated ultimate pressure capacity of the application cluster. If the current limit threshold is exceeded, the application cluster has reached the limit of the capacity.
  • the pressure By adjusting the pressure value through the pressure measuring tool, the pressure can be stabilized, and the application cluster will not show signs of current limitation. It will not make the pressure too small.
  • Step 203 Obtain an average stand-alone capability of the test machine when the pressure value reaches a maximum value within a pressure value that triggers a current limit threshold of the application cluster.
  • the average stand-alone capability of the test machine is obtained when the pressure value adjusted by the pressure measuring tool reaches a maximum value within the pressure value that triggers the current limit threshold of the application cluster.
  • Method 1 Calculate according to the maximum value of the pressure value.
  • the average stand-alone capability of the test machine can be obtained according to the ratio between the maximum value of the pressure value and the number of test machines included in the application cluster.
  • the process of obtaining the average stand-alone capability of the test machine may include:
  • step 301 when the load capacity of the application cluster reaches the shrinkage threshold of the elastic expansion, the application cluster is reduced.
  • the elastic scaling is a mechanism for dynamically adjusting the size of the application cluster according to the load of the online application cluster.
  • the mechanism can not only reduce the cost, but also improve the stability of the online application cluster.
  • the elastic stretching may be implemented by using an elastic platform; specifically, when the pressure value reaches a maximum value within a pressure value that triggers a current limiting threshold of the application cluster, the elastic platform may be triggered to be activated.
  • the elastic platform can dynamically adjust the capacity of the application cluster according to the load of the online application cluster.
  • expansion threshold current limit threshold
  • the load capacity of the application cluster reaches the capacity reduction threshold, it is required at this time.
  • reduce the size of the application cluster reduce the size of the application cluster.
  • the load capacity of the application cluster reaches the capacity expansion threshold, you need to expand the capacity and increase the size of the application cluster. For example, you can set the CPU load to 80% as the capacity reduction threshold and the CPU load to 90% as the capacity expansion threshold.
  • the device shrinks the application cluster, and the application cluster can be gradually reduced according to the preset shrinkage ratio.
  • Step 302 When the load capacity of the application cluster is reduced to the expansion threshold of the elastic scalability, the average number of requests per second of the test machine of the application cluster is used as the average stand-alone capability of the test machine.
  • the load capacity of the application cluster is bound to increase.
  • the average of the test machines of the application cluster at this time can be averaged.
  • the number of requests is the average stand-alone capability of the test machine.
  • the device can flexibly adjust the capacity of the application cluster according to the load of the online application cluster, which can not only reduce the cost, but also improve the stability of the online application cluster.
  • the foregoing step 103 can be performed to calculate the capacity of the application cluster.
  • the method for obtaining the application cluster capacity may further include:
  • step 401 the capacity of the application cluster is adjusted according to the affordability of the planned application cluster.
  • This embodiment can be applied to large capacity preparation.
  • the capacity of the application cluster can be adjusted according to the capacity of the application application cluster.
  • the capacity of the application cluster can be adjusted according to the ratio between the affordability (P) of the planned application cluster and the total pressure (L) of the application cluster, and the online environment capacity of the application cluster is obtained.
  • This adjustment process enables application cluster automation to complete large capacity preparation.
  • the method may further include: calculating a capacity ratio of a single application cluster in all application clusters after acquiring capacity of all application clusters. Assuming that the number of application clusters is 100, the ratio of the capacity of a single application cluster to the capacity of all application clusters can be separately calculated to obtain a corresponding capacity ratio. In this way, when the actual capacity of the planned application cluster cannot meet the online environmental capacity requirement, the capacity of the single application cluster can be prepared according to the above capacity ratio.
  • the online environment capacity Ci of the i-th application cluster is calculated according to the above formula, and the online environment capacity C of all the application clusters is further calculated, and the capacity preparation can be performed based on C; If R is less than C, the capacity allocation of a single application cluster can be performed on the basis of R and the above capacity ratio.
  • Step S1 selecting a test machine to be tested, and placing the above test machine into the isolated simulation environment, and in the above simulation environment, the test machines may be grouped according to a preset ratio, and the obtained pressure measurement group may be One by one with the application cluster.
  • Step S2 using a pressure measuring tool, according to the preset initial pressure value n, performing an overall pressure measurement on the application cluster in the pressure measurement group;
  • Step S3 If the initial pressure value is set too large, which triggers the current limit threshold of the application cluster, The pressure measuring tool can gradually reduce the pressure value according to the preset step size; wherein the preset step size can be s%, and the specific value of the preset step size is not limited in the embodiment of the present application;
  • Step S4 When the current pressure value reaches a maximum value within a pressure value that triggers the current limiting threshold of the application cluster, start the elastic platform to perform capacity adjustment of the application cluster;
  • the cluster is reduced to reduce the size of the application cluster.
  • the load must reach the expansion threshold of the elastic platform.
  • the average single machine gps of the application cluster (requests per second, Query Per Second) as the average stand-alone capability of the application cluster until the average stand-alone capability of all application clusters is obtained;
  • the load may specifically include: a CPU, a requesting RT (Response Time), and a CPU as an example, and 80% may be set as a shrinkage threshold and 90% as a capacity expansion threshold.
  • Step S6 since the expansion threshold of the elastic platform is the same as the current limiting threshold, because the step size of the shrinkage may exceed a few percentage points of the expansion threshold, in order to accurately calculate the capacity of the application cluster, the average unit can be expanded by the expansion.
  • Step S7 Perform large capacity preparation.
  • the capacity of the application cluster may be adjusted according to the ratio between the affordability (P) of the planned application cluster and the total pressure (L) of the application cluster, and the online environment of the application cluster is obtained. capacity;
  • step S8 according to the online environment capacity of the application cluster, the capacity of the application is prepared one by one, and the capacity is reduced, and the capacity is expanded. The entire process is automatically completed to complete the capacity preparation; wherein the actual capacity of the planned application cluster cannot meet the online environmental capacity.
  • the capacity of a single application cluster can be prepared according to the above capacity ratio.
  • FIG. 5 a block diagram of an embodiment of an apparatus for obtaining an application cluster capacity is shown in the present application, and specifically includes the following units:
  • the simulation unit 501 is configured to set a simulated application cluster to be tested, and the application cluster includes at least two test machines.
  • the pressure measuring unit 502 is configured to perform an overall pressure measurement on the test machine of the application cluster to obtain an average stand-alone capability of the test machine.
  • the capacity calculation unit 503 is configured to calculate the capacity of the application cluster according to the total pressure of the application cluster and the average stand-alone capability of the test machine.
  • the device sets the simulated application cluster to be tested through the foregoing unit, and performs overall pressure measurement on multiple test machines of the entire simulated application cluster, thereby obtaining a more accurate and real average single machine capability, and thus Get more accurate application cluster capacity.
  • the pressure measuring unit 502 may specifically include:
  • the initialization subunit 601 is configured to perform an overall pressure measurement on the test machine of the application cluster according to a preset initial pressure value.
  • Adjustment subunit 602 is configured to adjust the pressure value.
  • the obtaining sub-unit 603 obtains an average stand-alone capability of the test machine when the pressure value reaches a maximum value within a pressure value that triggers a current-limit threshold of the application cluster.
  • the adjusting sub-unit 602 may be configured to reduce the pressure value according to the preset step size when the initial pressure value triggers the current limiting threshold of the application cluster.
  • the obtaining subunit 603 may further include:
  • the reduction sub-unit 701 is configured to reduce the application cluster when the load capacity of the application cluster reaches a retraction threshold of the elastic expansion.
  • the determining sub-unit 702 is configured to: when the application cluster is contracted to the load capacity of the application cluster to reach the expansion threshold of the elastic expansion, the average number of requests per second of the test machine of the application cluster is taken as The average stand-alone capability of the test machine.
  • the volume reduction sub-unit 701 may be configured to gradually reduce the application cluster according to a preset volume reduction ratio.
  • the device may further include:
  • the capacity adjustment unit 801 is configured to adjust the capacity of the application cluster according to the affordability of the planned application cluster.
  • the capacity adjustment unit 801 may be specifically configured to adjust a capacity of the application cluster according to a ratio between a bearing capacity of the planned application cluster and a total pressure of the application cluster.
  • the embodiment of the present application further provides an electronic device, including a memory and a processor.
  • the processor and the memory are connected to each other through a bus; the bus may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus. .
  • the bus can be divided into an address bus, a data bus, a control bus, and the like.
  • the memory is used to store a program, and specifically, the program may include program code, and the program code includes computer operation instructions.
  • the memory may include a high speed RAM memory and may also include a non-volatile memory such as at least one disk memory.
  • the processor is used to read the program code in the memory and perform the following steps:
  • the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
  • embodiments of the embodiments of the present application can be provided as a method, apparatus, or computer program product. Therefore, the embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Moreover, embodiments of the present application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • the computer device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
  • the memory may include non-persistent memory, random access memory (RAM), and/or non-volatile memory in a computer readable medium, such as read only memory (ROM) or flash memory.
  • RAM random access memory
  • ROM read only memory
  • Memory is an example of a computer readable medium.
  • Computer readable media includes both permanent and non-persistent, removable and non-removable media.
  • Information storage can be implemented by any method or technology. The information can be computer readable instructions, data structures, modules of programs, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), EEPROM, Fast Flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic tape storage or other magnetic storage device or any other non- A transmission medium that can be used to store information that can be accessed by a computing device.
  • PRAM phase change memory
  • SRAM Static Random Access Memory
  • DRAM Dynamic Random Access Memory
  • RAM Random Access Memory
  • ROM Read Only Memory
  • EEPROM Electrically erasable programmable read-only Memory
  • Fast Flash memory or other memory technology
  • CD-ROM compact disc
  • DVD digital versatile disc
  • magnetic cassette magnetic tape storage or other magnetic storage device or any other non- A transmission medium that can be used to store information that can be accessed by a computing device.
  • computer readable media does not include non-persistent computer readable media, such
  • Embodiments of the present application are described with reference to flowcharts and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the present application. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG.
  • These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing terminal device to produce a machine such that instructions are executed by a processor of a computer or other programmable data processing terminal device
  • Means are provided for implementing the functions specified in one or more of the flow or in one or more blocks of the flow chart.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the instruction device implements the functions specified in one or more blocks of the flowchart or in a flow or block of the flowchart.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Testing Of Devices, Machine Parts, Or Other Structures Thereof (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)
  • Debugging And Monitoring (AREA)
  • Investigating Strength Of Materials By Application Of Mechanical Stress (AREA)

Abstract

一种获得应用集群容量的方法和装置,其中的方法具体包括:设置仿真的待测试的应用集群,该应用集群可以包括至少两个测试机器(101);对应用集群的测试机器进行整体压测,获得测试机器的平均单机能力(102);根据应用集群的压力总值及测试机器的平均单机能力,计算获得应用集群的容量(103)。实施例通过设置仿真的待测试的应用集群,并对整个仿真的应用集群的多个测试机器进行整体压测,可以获得更准确更真实的平均单机能力,进而可以获得更准确的应用集群的容量。

Description

一种获得应用集群容量的方法和装置
本申请要求2015年11月16日递交的申请号为201510784781.2发明名称为“一种获得应用集群容量的方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机技术领域,特别是涉及一种获得应用集群容量的方法和一种获得应用集群容量的装置。
背景技术
在确定各个应用的容量配比时,需要首先计算各应用集群的容量,其中,容量是应用集群所需要的资源实例数(或机器数)。目前,计算应用集群的容量大多是采用人工估算或单机压测的方法。
其中,人工估算法是首先预估应用集群要达到的能力或者承受的压力总值,以及单机的能力,然后用预期要达到的能力(或预估的压力总值)除以预估单机能力,获得应用集群的整体容量。在按照该方法求出所有应用的容量后,即可进行各应用的容量配比计算。
单机压测的方法时使用压测工具对单个机器进行测试,得到该单个机器的单机能力,然后用与其要达到的能力除以该单机压测获得的单机能力,获得应用集群的整体容量。
然后,上述两种方法得出的单机能力会受各种外围因素影响,得出的值可信度不够,进而会影响应用集群的整体容量的准确度。如在进行某应用的单机压测时,当前VM(Virtual Manufacturing)所在的宿主机的其它VM资源使用空闲,这样的话会导致单机能力估算过多的问题,然后用预期能力求应用的总体容量时,会存在数据偏差过大。另外,大促的业务流量模型与常态的业务流量模型差别也比较大,也是影响容量估算不准的一个因素。
发明内容
本申请实施例的发明目的在于提供一种获得应用集群容量的方法,能够提高应用集群的整体容量的准确度。
相应的,本申请实施例还提供了一种获得应用集群容量的装置,用以保证上述方法 的实现及应用。
为了解决上述问题,本申请公开了一种获得应用集群容量的方法,包括:
设置仿真的待测试的应用集群,所述应用集群包括至少两个测试机器;
对所述应用集群的测试机器进行整体压测,获得所述测试机器的平均单机能力;
根据所述应用集群的压力总值及所述测试机器的平均单机能力,计算获得所述应用集群的容量。
优选的,所述对所述应用集群的测试机器进行整体压测,获得所述测试机器的平均单机能力,包括:
按照预设的初始压力值对所述应用集群的测试机器进行整体压测;
调节压力值;
当所述压力值达到触发所述应用集群的限流阈值的压力值以内的最大值时,获得所述测试机器的平均单机能力。
优选的,所述调节压力值包括:
当所述初始压力值触发所述应用集群的限流阈值时,按照预设步长减小压力值。
优选的,所述获得所述测试机器的平均单机能力,包括:
当应用集群的负载能力达到弹性伸缩的缩容阈值时,对所述应用集群进行缩容;
当所述应用集群缩容至所述应用集群的负载能力达到所述弹性伸缩的扩容阈值时,将所述应用集群的所述测试机器的每秒平均请求数作为所述测试机器的平均单机能力。
优选的,所述对所述应用集群进行缩容,包括:
按照预设的缩容比例对所述应用集群进行逐步缩容。
优选的,所述方法还包括:
在获取所有应用集群的容量后,计算单个应用集群在所有应用集群中的容量配比。
优选的,所述方法还包括:
根据计划应用集群的承受能力调节所述应用集群的容量。
优选的,所述根据计划应用集群的承受能力调节所述应用集群的容量,包括:
根据所述计划应用集群的承受能力与所述应用集群的压力总值之间的比值调节所述应用集群的容量。
优选的,在所述应用集群的数量为1时,所述应用集群包括:至少两个测试机器,在所述应用集群的数量大于1时,其中的单个应用集群包括:至少一个测试机器。
本申请实施例还公开了一种获得应用集群容量的装置,包括:
仿真单元,被配置为设置仿真的待测试的应用集群,所述应用集群包括至少两个测试机器;
压测单元,被配置为对所述应用集群的测试机器进行整体压测,获得所述测试机器的平均单机能力;
容量计算单元,被配置为根据所述应用集群的压力总值及所述测试机器的平均单机能力,计算获得所述应用集群的容量。
优选的,所述压测单元包括:
初始化子单元,被配置为按照预设的初始压力值对所述应用集群的测试机器进行整体压测;
调节子单元,被配置为调节压力值;
获取子单元,当所述压力值达到触发所述应用集群的限流阈值的压力值以内的最大值时,获得所述测试机器的平均单机能力。
优选的,所述获取子单元包括:
缩容子单元,被配置为当应用集群的负载能力达到弹性伸缩的缩容阈值时,对所述应用集群进行缩容;
确定子单元,被配置为当所述应用集群缩容至所述应用集群的负载能力达到所述弹性伸缩的扩容阈值时,将所述应用集群的所述测试机器的每秒平均请求数作为所述测试机器的平均单机能力。
优选的,所述装置还包括:
容量调节单元,被配置为根据计划应用集群的承受能力调节所述应用集群的容量。
与现有技术相比,本申请实施例包括以下优点:
本申请实施例通过设置仿真的待测试的应用集群,并对整个仿真的应用集群的多个测试机器进行整体压测,可以获得更准确更真实的平均单机能力,进而可以获得更准确的应用集群的容量。
附图说明
图1是本申请的一种获得应用集群容量的方法实施例的步骤流程图;
图2是本申请中一种对待测试的应用集群的测试机器进行整体压测,获得测试机器的平均单机能力的方法实施例的步骤流程图;
图3是本申请中一种获得测试机器的平均单机能力方法实施例的步骤流程图;
图4是本申请的另一种获得应用集群容量的方法实施例的步骤流程图;
图5是本申请的一种获得应用集群容量的装置实施例的结构框图;
图6是本申请中一种压测单元的结构框图;
图7是本申请中一种获取子单元的结构框图;
图8是本申请的另一种获得应用集群容量的装置实施例的结构框图。
具体实施方式
为使本申请的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本申请作进一步详细的说明。
参照图1,示出了本申请的一种获得应用集群容量的方法实施例的步骤流程图,具体可以包括如下步骤:
步骤101,设置仿真的待测试的应用集群,该应用集群可以包括至少两个测试机器。
本申请实施例中,首先准备好测算多个应用集群容量配比的环境,并从中确定需要进行容量测算的应用集群,该应用集群可能是一个也可能是多个;其中,在所述应用集群的数量为1时,所述应用集群具体可以包括:至少两个测试机器,在所述应用集群的数量大于1时,其中的单个应用集群具体可以包括:至少一个测试机器。用于获得应用集群容量的装置(以下简称装置)在本步骤中首先按照确定出的需要进行容量测算的应用集群对应设置出仿真环境,也即设置出与需要进行容量测算的应用集群完全相同的应用集群。该装置设置出的仿真环境与实际应用集群的区别可以是该仿真环境下的应用集群不能对外提供访问,只用来进行容量测算。
步骤102,对应用集群的测试机器进行整体压测,获得测试机器的平均单机能力。
在确定出仿真的待测试的应用集群后,对该应用集群的测试机器进行整体压测。压测是对线上流量的仿真压力,具体的可以使用压测工具对加压在该应用集群测试机器上的流量进行调控,该整体压测过程同时针对应用集群下的多个测试机器,而且,该方式可以涉及到多个应用集群的协同压测,多个应用集群之间存在调用关系,压测的流量也是仿真线上的真实流量,这样整体压测比单机压测更接近真实。
在整体压测的过程中,本实施例可以直接获得应用集群下多个测试机器的极限能力,然后通过均值计算获得测试机器的平均单机能力。也可以是在压测的过程中引入弹性平台对应用集群的测试机器进行扩容或缩容,进而获得测试机器的平均单机能力,具体请 参见后续实施例的描述。
步骤103,根据应用集群的压力总值及测试机器的平均单机能力,计算获得应用集群的容量。
在获得测试机器的单机能力后,即可根据预估的或预设的应用集群的压力总值及测试机器的平均单机能力,计算获得应用集群的容量。具体可以是用应用集群的压力总值除以测试机器的平均单机能力,得到应用集群的容量。其中,应用集群的压力总值可以是预先设定的,也可以是按照现有方法预估的,此处不做具体限定。该压力总值的获得可以分两种情况:1、有预设目标值的情况:如这次目标是12W,就照着12W进行压测;2、不估算目标压力值的情况,主要是测算现有的总机器资源能够承受多大的压力。
在按照上述方法获得多个应用集群的容量后,即可进一步调节多个应用集群的容量配比。结合弹性平台后,弹性平台对各个应用集群的容量会作配比调整,在有限的机器资源条件下,多则减,少则扩,最后多个应用集群会被弹性平台调整为一个适合当前压力的容量配比。
本申请实施例通过设置仿真的待测试的应用集群,并对整个仿真的应用集群的多个测试机器进行整体压测,可以获得更准确更真实的平均单机能力,进而可以获得更准确的应用集群的容量。
在本申请的另一实施例中,对应用集群的测试机器进行整体压测,获得测试机器的平均单机能力的过程,如图2所示,可以包括:
步骤201,按照预设的初始压力值对应用集群的测试机器进行整体压测。
在本步骤中,可以使用压测工具,按照预设的如用户指定的初始压力值对仿真的待测试的应用集群的测试机器进行整体压测。
步骤202,调节压力值。
如果该初始压力值过小,远没有触发应用集群的限流阈值,则可以逐渐增大该压力值,具体可以按照预设的步长逐渐增大压力值。若该初始压力值设置过大,触发了应用集群的限流阈值,则需要降低该压力值。在降低该压力值时,压测工具可以按照预设的步长逐渐减小压力值。
其中,该应用集群的限流阈值是根据预估的该应用集群的极限受压能力设置的。超过该限流阈值,则说明该应用集群已经达到受压能力的极限。
通过压测工具调节压力值,可以使得压力回稳,既不会使应用集群发生限流迹象, 也不会使压力过小。
步骤203,当压力值达到触发应用集群的限流阈值的压力值以内的最大值时,获得测试机器的平均单机能力。
当压测工具调节的压力值达到触发应用集群的限流阈值的压力值以内的最大值时,即可获得测试机器的平均单机能力。
该获得测试机器的平均单机能力的方式有多种,例如:
方式一:根据压力值的最大值计算。
在获得上述压力值的最大值后,根据压力值最大值与应用集群包含的测试机器的数量之间的比值,即可获得测试机器的平均单机能力。
方式二:
本方式中,获得测试机器的平均单机能力的过程,如图3所示,可以包括:
步骤301,当应用集群的负载能力达到弹性伸缩的缩容阈值时,对应用集群进行缩容。
本实施例中,弹性伸缩为根据线上应用集群的负载,动态调整应用集群规模的一种机制,该机制不仅可减低成本,而且能够提升线上应用集群的稳定性。在本申请的一种应用示例中,可通过弹性平台来实现上述弹性伸缩;具体地,当压力值达到触发应用集群的限流阈值的压力值以内的最大值时,可以触发启动弹性平台,该弹性平台可以根据线上应用集群的负载,动态调整应用集群的容量。
具体的,弹性平台会监测应用集群的负载能力,并设置有负载的缩容阈值和扩容阈值(扩容阀值=限流阀值),当应用集群的负载能力达到缩容阈值时,此时需要对应用集群进行缩容,减小应用集群的规模,当应用集群的负载能力达到扩容阈值时需要扩容,增大应用集群的规模。例如,可以设置CPU负载80%为缩容阈值,CPU负载90%为扩容阈值。
本步骤中,当监测到应用集群的负载能力达到弹性平台的缩容阈值时,该装置对应用集群进行缩容,具体可以按照预设的缩容比例对应用集群进行逐步缩容。
步骤302,当应用集群缩容至应用集群的负载能力达到上述弹性伸缩的扩容阈值时,将应用集群的测试机器的每秒平均请求数作为测试机器的平均单机能力。
在缩容后,应用集群的负载能力必然会增大,当监测到应用集群缩容至应用集群的负载能力达到弹性平台的扩容阈值时,即可将此时应用集群的测试机器的每秒平均请求数作为测试机器的平均单机能力。
由此可见,该装置利用弹性伸缩可以根据线上应用集群的负载,动态调整应用集群的容量,不仅可减低成本,并能提升线上应用集群稳定性。
在利用上述方法获得测试机器的平均单机能力后,即可执行前述步骤103计算获得应用集群的容量。
在本申请的另一实施例中,如图4所示,该获得应用集群容量的方法还可以包括:
步骤401,根据计划应用集群的承受能力调节应用集群的容量。
本实施例可以应用于大促前的容量准备,当预先计划了应用集群的承受能力时,可以再根据该计划应用集群的承受能力对应用集群的容量进行调节。
具体的,可以根据计划应用集群的承受能力(P)与应用集群的压力总值(L)之间的比值调节应用集群的容量,得到应用集群的线上环境容量。
如,可以按照如下公式计算应用集群的线上环境容量=(P/L)*已获得的应用集群的容量。
该调节过程可以实现应用集群自动化完成大促容量准备。
在本申请的一种可选实施例中,所述方法还可以包括:在获取所有应用集群的容量后,计算单个应用集群在所有应用集群中的容量配比。假设应用集群的数量为100,则可以分别计算单个应用集群的容量相对于所有应用集群的容量的比例,以得到相应的容量配比。这样,在计划应用集群的实际容量不能满足线上环境容量需求时,可以按照上述容量配比进行单个应用集群的容量的准备。例如,按照上述公式计算得到第i个应用集群的线上环境容量Ci,进一步计算得到所有应用集群的线上环境容量C,则可以基于C进行容量准备;假设准备得到的计划应用集群的实际容量R小于C,则可以在R和上述容量配比的基础上进行单个应用集群的容量的分配。
为使本领域技术人员更好地理解本申请实施例,在此给出本申请的一种获得应用集群容量的方法示例,该示例具体可以包括如下步骤:
步骤S1、选定待测试的测试机器,并将上述测试机器放置到隔离出来的仿真环境,并且,在上述仿真环境中,可以按照预置比例对上述测试机器进行分组,得到的压测分组可以与应用集群一一兑现。
步骤S2、使用压测工具,按照预置的初始压力值n,,对压测分组中的应用集群进行整体压测;
步骤S3、在该初始压力值设置过大导致触发了应用集群的限流阈值的情况下,通过 压测工具可以按照预设的步长逐渐减小压力值;其中,该预设的步长可以是s%,本申请实施例对于预设的步长的具体数值不加以限制;
步骤S4、在当前压力值达到触发应用集群的限流阈值的压力值以内的最大值时,启动弹性平台进行应用集群的容量调节;
步骤S5、通过弹性平台监测应用集群的负载能力,并设置负载能力的缩容阈值和扩容阈值(扩容阀值=限流阀值),在应用集群都未触发扩容阈值的情况下,可以对应用集群进行缩容,减小应用集群的规模;当某个应用集群缩容到一定比例时,负载必定会达到弹性平台的扩容阀值可以将该应用集群的平均单机的gps(每秒请求数,Query Per Second)作为该应用集群的平均单机能力,直到获取所有应用集群的平均单机能力;
上述负载具体可以包括:CPU、请求RT(响应时间,Response Time)以CPU为例,可以设置80%为其缩容阈值、90%为其扩容阈值。
步骤S6、由于弹性平台的扩容阀值与限流阀值相同,因为缩容的步长值可能会超出扩容阀值的几个百分点,为了精确计算应用集群的容量,可以通过扩容对上述平均单机能力进行微调,扩容数量=当前应用集群接受的压力总量/平均单机能力;在完成所有应用集群的微调后,得到应用集群的当前容量、单个应用集群的容量配比和当前的压测流量L;
步骤S7、进行大促容量准备,具体地,可以根据计划应用集群的承受能力(P)与应用集群的压力总值(L)之间的比值调节应用集群的容量,得到应用集群的线上环境容量;
步骤S8、根据上述应用集群的线上环境容量,逐个准备应用程序的容量,多则缩,少则扩,全程自动化完成大促容量准备;其中,计划应用集群的实际容量不能满足线上环境容量需求时,可以按照上述容量配比进行单个应用集群的容量的准备。
需要说明的是,对于方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请实施例并不受所描述的动作顺序的限制,因为依据本申请实施例,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作并不一定是本申请实施例所必须的。
参照图5,示出了本申请一种获得应用集群容量装置实施例的结构框图,具体可以包括如下单元:
仿真单元501,被配置设置仿真的待测试的应用集群,所述应用集群包括至少两个测试机器。
压测单元502,被配置为对所述应用集群的测试机器进行整体压测,获得所述测试机器的平均单机能力。
容量计算单元503,被配置为根据所述应用集群的压力总值及所述测试机器的平均单机能力,计算获得所述应用集群的容量。
本申请实施例中,该装置通过上述单元设置仿真的待测试的应用集群,并对整个仿真的应用集群的多个测试机器进行整体压测,可以获得更准确更真实的平均单机能力,进而可以获得更准确的应用集群的容量。
在另一实施例中,如图6所示,压测单元502具体可以包括:
初始化子单元601,被配置为按照预设的初始压力值对所述应用集群的测试机器进行整体压测。
调节子单元602,被配置为调节压力值。
获取子单元603,当所述压力值达到触发所述应用集群的限流阈值的压力值以内的最大值时,获得所述测试机器的平均单机能力。
其中,调节子单元602,具体可以被配置为当所述初始压力值触发所述应用集群的限流阈值时,按照预设步长减小压力值。
在另一实施例中,如图7所示,获取子单元603又可以进一步包括:
缩容子单元701,被配置为当应用集群的负载能力达到弹性伸缩的缩容阈值时,对所述应用集群进行缩容。
确定子单元702,被配置为当所述应用集群缩容至所述应用集群的负载能力达到所述弹性伸缩的扩容阈值时,将所述应用集群的所述测试机器的每秒平均请求数作为所述测试机器的平均单机能力。
其中,缩容子单元701,具体可以被配置为按照预设的缩容比例对所述应用集群进行逐步缩容。
在另一实施例中,如图8所示,该装置还可以包括:
容量调节单元801,被配置为根据计划应用集群的承受能力调节所述应用集群的容量。
该容量调节单元801,具体可以被配置为根据所述计划应用集群的承受能力与所述应用集群的压力总值之间的比值调节所述应用集群的容量。
本申请实施例还提供了一种电子设备,包括存储器和处理器。
处理器与存储器通过总线相互连接;总线可以是ISA(工业标准结构,Industry Standard Architecture)总线、PCI(外部设备互联,Peripheral Component Interconnect)总线或EISA(扩展工业标准结构,Extended Industry Standard Architecture)总线等。所述总线可以分为地址总线、数据总线、控制总线等。
其中,存储器用于存储一段程序,具体地,程序可以包括程序代码,所述程序代码包括计算机操作指令。存储器可能包含高速RAM存储器,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。
处理器用于读取存储器中的程序代码,执行以下步骤:
设置仿真的待测试的应用集群,所述应用集群中包括至少两个测试机器;
对所述应用集群的测试机器进行整体压测,获得所述测试机器的平均单机能力;
根据所述应用集群的压力总值及所述测试机器的平均单机能力,计算获得所述应用集群的容量。
对于装置实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。
本领域内的技术人员应明白,本申请实施例的实施例可提供为方法、装置、或计算机程序产品。因此,本申请实施例可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
在一个典型的配置中,所述计算机设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、 静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括非持续性的电脑可读媒体(transitory media),如调制的数据信号和载波。
本申请实施例是参照根据本申请实施例的方法、终端设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理终端设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理终端设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理终端设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理终端设备上,使得在计算机或其他可编程终端设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程终端设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
尽管已描述了本申请实施例的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例做出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本申请实施例范围的所有变更和修改。
最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者终端设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者终端设备所固有的要素。在没有更多限制的情况下,由语句“包 括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者终端设备中还存在另外的相同要素。
以上对本申请所提供的一种获得应用集群容量的方法和一种获得应用集群容量的装置,进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。

Claims (13)

  1. 一种获得应用集群容量的方法,其特征在于,包括:
    设置仿真的待测试的应用集群,所述应用集群包括至少两个测试机器;
    对所述应用集群的测试机器进行整体压测,获得所述测试机器的平均单机能力;
    根据所述应用集群的压力总值及所述测试机器的平均单机能力,计算获得所述应用集群的容量。
  2. 根据权利要求1所述的方法,其特征在于,所述对所述应用集群的测试机器进行整体压测,获得所述测试机器的平均单机能力,包括:
    按照预设的初始压力值对所述应用集群的测试机器进行整体压测;
    调节压力值;
    当所述压力值达到触发所述应用集群的限流阈值的压力值以内的最大值时,获得所述测试机器的平均单机能力。
  3. 根据权利要求2所述的方法,其特征在于,所述调节压力值包括:
    当所述初始压力值触发所述应用集群的限流阈值时,按照预设步长减小压力值。
  4. 根据权利要求2所述的方法,其特征在于,所述获得所述测试机器的平均单机能力,包括:
    当应用集群的负载能力达到弹性伸缩的缩容阈值时,对所述应用集群进行缩容;
    当所述应用集群缩容至所述应用集群的负载能力达到所述弹性伸缩的扩容阈值时,将所述应用集群的所述测试机器的每秒平均请求数作为所述测试机器的平均单机能力。
  5. 根据权利要求4所述的方法,其特征在于,所述对所述应用集群进行缩容,包括:
    按照预设的缩容比例对所述应用集群进行逐步缩容。
  6. 根据权利要求1至5中任一所述的方法,其特征在于,所述方法还包括:
    在获取所有应用集群的容量后,计算单个应用集群在所有应用集群中的容量配比。
  7. 根据权利要求1至5中任一所述的方法,其特征在于,所述方法还包括:
    根据计划应用集群的承受能力调节所述应用集群的容量。
  8. 根据权利要求7所述的方法,其特征在于,所述根据计划应用集群的承受能力调节所述应用集群的容量,包括:
    根据所述计划应用集群的承受能力与所述应用集群的压力总值之间的比值调节所述应用集群的容量。
  9. 根据权利要求1至5中任一所述的方法,其特征在于,在所述应用集群的数量为1时,所述应用集群包括:至少两个测试机器,在所述应用集群的数量大于1时,其中的单个应用集群包括:至少一个测试机器。
  10. 一种获得应用集群容量的装置,其特征在于,包括:
    仿真单元,被配置为设置仿真的待测试的应用集群,所述应用集群包括至少两个测试机器;
    压测单元,被配置为对所述应用集群的测试机器进行整体压测,获得所述测试机器的平均单机能力;
    容量计算单元,被配置为根据所述应用集群的压力总值及所述测试机器的平均单机能力,计算获得所述应用集群的容量。
  11. 根据权利要求10所述的装置,其特征在于,所述压测单元包括:
    初始化子单元,被配置为按照预设的初始压力值对所述应用集群的测试机器进行整体压测;
    调节子单元,被配置为调节压力值;
    获取子单元,当所述压力值达到触发所述应用集群的限流阈值的压力值以内的最大值时,获得所述测试机器的平均单机能力。
  12. 根据权利要求11所述的装置,其特征在于,所述获取子单元包括:
    缩容子单元,被配置为当应用集群的负载能力达到弹性伸缩的缩容阈值时,对所述应用集群进行缩容;
    确定子单元,被配置为当所述应用集群缩容至所述应用集群的负载能力达到所述弹性伸缩的扩容阈值时,将所述应用集群的所述测试机器的每秒平均请求数作为所述测试机器的平均单机能力。
  13. 根据权利要求10至12中任一所述的装置,其特征在于,所述装置还包括:
    容量调节单元,被配置为根据计划应用集群的承受能力调节所述应用集群的容量。
PCT/CN2016/104837 2015-11-16 2016-11-07 一种获得应用集群容量的方法和装置 WO2017084505A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US15/769,050 US11231947B2 (en) 2015-11-16 2016-11-07 Method and apparatus for determining the capacity of an application cluster
US17/572,736 US20220129288A1 (en) 2015-11-16 2022-01-11 Method and apparatus for determining the capacity of an application cluster

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510784781.2A CN106708621B (zh) 2015-11-16 2015-11-16 一种获得应用集群容量的方法和装置
CN201510784781.2 2015-11-16

Related Child Applications (2)

Application Number Title Priority Date Filing Date
US15/769,050 A-371-Of-International US11231947B2 (en) 2015-11-16 2016-11-07 Method and apparatus for determining the capacity of an application cluster
US17/572,736 Continuation US20220129288A1 (en) 2015-11-16 2022-01-11 Method and apparatus for determining the capacity of an application cluster

Publications (1)

Publication Number Publication Date
WO2017084505A1 true WO2017084505A1 (zh) 2017-05-26

Family

ID=58717323

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/104837 WO2017084505A1 (zh) 2015-11-16 2016-11-07 一种获得应用集群容量的方法和装置

Country Status (3)

Country Link
US (2) US11231947B2 (zh)
CN (1) CN106708621B (zh)
WO (1) WO2017084505A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110008030A (zh) * 2019-04-16 2019-07-12 苏州浪潮智能科技有限公司 一种元数据访问的方法、系统及设备
CN112363926A (zh) * 2020-11-10 2021-02-12 平安普惠企业管理有限公司 生产环境容量检测方法、装置、计算机设备及存储介质
CN113656299A (zh) * 2021-08-12 2021-11-16 北京百度网讯科技有限公司 极限qps的确定方法、装置、电子设备及可读存储介质

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109669668B (zh) * 2017-10-17 2020-11-24 北京京东尚科信息技术有限公司 一种系统性能测试中实现模拟交易执行的方法和装置
CN110321270A (zh) * 2018-03-29 2019-10-11 广东神马搜索科技有限公司 单机性能测试方法、装置及服务器
CN110311810A (zh) * 2019-06-13 2019-10-08 北京奇艺世纪科技有限公司 一种服务器资源配置方法、装置、电子设备及存储介质
CN111400049A (zh) * 2020-03-26 2020-07-10 北京搜房科技发展有限公司 资源调整方法及装置
US20210319151A1 (en) * 2020-04-14 2021-10-14 Citrix Systems, Inc. Systems and Methods for Production Load Simulation
CN112506751B (zh) * 2020-11-27 2022-11-18 浪潮电子信息产业股份有限公司 一种服务器整机性能的对比测试方法、装置、设备及介质
CN113703913B (zh) * 2021-08-06 2024-04-23 长江存储科技有限责任公司 设备测试方法及装置
CN113923216B (zh) * 2021-09-29 2023-12-15 阿里巴巴(中国)有限公司 一种分布式集群限流系统及方法和分布式集群节点

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6505249B1 (en) * 1999-12-28 2003-01-07 Bellsouth Intellectual Property Corporation Method for optimizing end-to-end processing performance by selecting optimal values after running benchmarks repeatedly with different values
CN104182288A (zh) * 2014-08-18 2014-12-03 浪潮电子信息产业股份有限公司 一种服务器集群系统功耗自动化测试的方法
CN104794058A (zh) * 2015-05-07 2015-07-22 合肥云中信息科技有限公司 一种云桌面虚拟环境性能的测试方法

Family Cites Families (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5675739A (en) 1995-02-03 1997-10-07 International Business Machines Corporation Apparatus and method for managing a distributed data processing system workload according to a plurality of distinct processing goal types
US6571288B1 (en) * 1999-04-26 2003-05-27 Hewlett-Packard Company Apparatus and method that empirically measures capacity of multiple servers and forwards relative weights to load balancer
US6898564B1 (en) * 2000-05-23 2005-05-24 Microsoft Corporation Load simulation tool for server resource capacity planning
US6865527B2 (en) 2000-12-18 2005-03-08 Hewlett-Packard Development Company, L.P. Method and apparatus for computing data storage assignments
US8104041B2 (en) 2006-04-24 2012-01-24 Hewlett-Packard Development Company, L.P. Computer workload redistribution based on prediction from analysis of local resource utilization chronology data
CN100501695C (zh) * 2006-12-25 2009-06-17 中国电信股份有限公司 应用软件在生产环境下的性能预测方法
US8433749B2 (en) 2009-04-15 2013-04-30 Accenture Global Services Limited Method and system for client-side scaling of web server farm architectures in a cloud data center
US9448824B1 (en) 2010-12-28 2016-09-20 Amazon Technologies, Inc. Capacity availability aware auto scaling
US8997107B2 (en) 2011-06-28 2015-03-31 Microsoft Technology Licensing, Llc Elastic scaling for cloud-hosted batch applications
CN102411515A (zh) * 2011-07-29 2012-04-11 国网信息通信有限公司 一种服务器容量估算的方法和系统
US8856797B1 (en) 2011-10-05 2014-10-07 Amazon Technologies, Inc. Reactive auto-scaling of capacity
CN102394799B (zh) * 2011-11-29 2013-10-30 山东中创软件工程股份有限公司 一种应用服务器集群效率测试方法及系统
US20130185729A1 (en) 2012-01-13 2013-07-18 Rutgers, The State University Of New Jersey Accelerating resource allocation in virtualized environments using workload classes and/or workload signatures
CN102646062B (zh) * 2012-03-20 2014-04-09 广东电子工业研究院有限公司 一种云计算平台应用集群弹性扩容方法
US9817699B2 (en) 2013-03-13 2017-11-14 Elasticbox Inc. Adaptive autoscaling for virtualized applications
US10552745B2 (en) 2013-10-18 2020-02-04 Netflix, Inc. Predictive auto scaling engine
US9612876B2 (en) 2013-12-19 2017-04-04 Xerox Corporation Method and apparatus for estimating a completion time for mapreduce jobs
US11474874B2 (en) 2014-08-14 2022-10-18 Qubole, Inc. Systems and methods for auto-scaling a big data system
US9547534B2 (en) 2014-10-10 2017-01-17 International Business Machines Corporation Autoscaling applications in shared cloud resources
US9513935B2 (en) 2014-10-28 2016-12-06 International Business Machines Corporation Auto-scaling thresholds in elastic computing environments
US9626295B2 (en) 2015-07-23 2017-04-18 Qualcomm Incorporated Systems and methods for scheduling tasks in a heterogeneous processor cluster architecture using cache demand monitoring

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6505249B1 (en) * 1999-12-28 2003-01-07 Bellsouth Intellectual Property Corporation Method for optimizing end-to-end processing performance by selecting optimal values after running benchmarks repeatedly with different values
CN104182288A (zh) * 2014-08-18 2014-12-03 浪潮电子信息产业股份有限公司 一种服务器集群系统功耗自动化测试的方法
CN104794058A (zh) * 2015-05-07 2015-07-22 合肥云中信息科技有限公司 一种云桌面虚拟环境性能的测试方法

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110008030A (zh) * 2019-04-16 2019-07-12 苏州浪潮智能科技有限公司 一种元数据访问的方法、系统及设备
CN110008030B (zh) * 2019-04-16 2020-06-19 苏州浪潮智能科技有限公司 一种元数据访问的方法、系统及设备
CN112363926A (zh) * 2020-11-10 2021-02-12 平安普惠企业管理有限公司 生产环境容量检测方法、装置、计算机设备及存储介质
CN113656299A (zh) * 2021-08-12 2021-11-16 北京百度网讯科技有限公司 极限qps的确定方法、装置、电子设备及可读存储介质
CN113656299B (zh) * 2021-08-12 2023-08-22 北京百度网讯科技有限公司 极限qps的确定方法、装置、电子设备及可读存储介质

Also Published As

Publication number Publication date
CN106708621A (zh) 2017-05-24
US20220129288A1 (en) 2022-04-28
CN106708621B (zh) 2020-10-27
US20190065222A1 (en) 2019-02-28
US11231947B2 (en) 2022-01-25

Similar Documents

Publication Publication Date Title
WO2017084505A1 (zh) 一种获得应用集群容量的方法和装置
EP2921964B1 (en) Partition expansion method and device
TWI755415B (zh) 雲端環境下應用集群資源分配的方法、裝置和系統
WO2020220743A1 (zh) 一种计算机数据处理方法及装置
CN109408590B (zh) 分布式数据库的扩容方法、装置、设备及存储介质
WO2017162028A1 (zh) 一种模拟线上压力测试的方法和装置
WO2020063686A1 (zh) 一种热负荷预测方法、装置、可读介质及电子设备
US10796038B2 (en) Estimating think times
CN111162520B (zh) 一种电网映像方法及系统
TWI671708B (zh) 一種流速控制方法及裝置
WO2021169386A1 (zh) 一种图数据处理方法、装置、设备、介质
EP2948841A1 (en) Shared resource contention
CN107391230B (zh) 一种确定虚拟机负载的实现方法和装置
CN110389365A (zh) 一种卫星导航定位方法及装置、终端、存储介质
TW201828063A (zh) 一種獲得應用集群容量的方法和裝置
US10387578B1 (en) Utilization limiting for nested object queries
CN114069667B (zh) 一种储能群功率分配方法、系统、处理设备及存储介质
CN106909472B (zh) 一种分布式文件系统的输入/输出负载调整方法及装置
KR101674324B1 (ko) 실시간 제어 응용에 적용되는 태스크 스케쥴링 장치 및 방법
CN103902371A (zh) 一种用户态程序获取内核jiffies的方法和系统
TW201506636A (zh) 簽核動態調整方法及系統
Guo et al. Precision controllable Gaver–Wynn–Rho algorithm in Laplace transform triple reciprocity boundary element method for three dimensional transient heat conduction problems
WO2021037083A1 (zh) 用于处理数据的方法、装置以及相关产品
US20190391837A1 (en) Processing division device, simulator system and processing division method
CN108255586B (zh) 功能服务的排序方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16865682

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16865682

Country of ref document: EP

Kind code of ref document: A1