WO2015196369A1 - Distributed cache control method and apparatus - Google Patents

Distributed cache control method and apparatus Download PDF

Info

Publication number
WO2015196369A1
WO2015196369A1 PCT/CN2014/080630 CN2014080630W WO2015196369A1 WO 2015196369 A1 WO2015196369 A1 WO 2015196369A1 CN 2014080630 W CN2014080630 W CN 2014080630W WO 2015196369 A1 WO2015196369 A1 WO 2015196369A1
Authority
WO
WIPO (PCT)
Prior art keywords
cache node
cluster system
node
cache
cluster
Prior art date
Application number
PCT/CN2014/080630
Other languages
French (fr)
Chinese (zh)
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 CN201480037256.8A priority Critical patent/CN105393518B/en
Priority to PCT/CN2014/080630 priority patent/WO2015196369A1/en
Publication of WO2015196369A1 publication Critical patent/WO2015196369A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications

Definitions

  • the embodiments of the present invention relate to computer technologies, and in particular, to a distributed cache control method and apparatus. Background technique
  • caches have been widely used in the cache function of cluster systems, especially the development of distributed cache clusters, which greatly improves the speed of data cache. And efficiency.
  • Clusters of object caching systems such as social networking service sites (Facebook) typically perform cluster optimization management by: reducing storage data latency; adjusting cluster deployment by assessing the impact of load on cache misses Ways, specifically, analyzing the relationship between memory cache, memory replacement algorithm and cache miss, providing a more efficient Render Algorithm; or configuring the resource by changing the size of the cache by defining a predefined length optimization.
  • the embodiment of the present invention provides a distributed cache control method and apparatus, and performs a corresponding adjustment strategy on the resources of the cluster system by monitoring the satisfaction degree of the user to the Quality of Service (Qos) of the cluster system.
  • Qos Quality of Service
  • an embodiment of the present invention provides a distributed cache control method, including: collecting client statistics information of a cache node in a cluster system;
  • Calculating an average expected value of the user according to the client statistical information Determining a resource adjustment manner for the cluster system according to an average expected value of the user and a desired threshold;
  • the determining, by the user expected value and the expected threshold, a resource adjustment manner for the cluster system including:
  • the client statistics include the cluster data access response time, a cluster cache hit ratio, and cluster data.
  • the calculating the average expected value of the user according to the client statistics including: calculating, according to the cluster data access response time, the cluster cache hit ratio, and the cluster data throughput, the user to each cache
  • the expected value of the node is: wherein, the data fetch response time indicating the cache node i, the _ ⁇ ⁇ represents the cache hit ratio of the cache node i, and the TH ⁇ represents the data throughput of the cache node i , the l 1 2 and ⁇ 3 represent weights;
  • the method before the determining, by the user, the resource adjustment manner of the cluster system according to the average expected value and the expected threshold of the user, the method further includes:
  • the resource utilization information of the cache node includes a hardware parameter of the cache node, an operating system parameter, and the cache node is a configuration parameter in the cluster system, where the operating system parameter is used to calculate a load value of the cache node;
  • E n f(X n J n , Z n ) ;
  • the X indicates the hardware parameter of the cache node, the 1 indicates the load value of the cache node, and the 2 indicates the configuration parameter of the cache node in the cluster system;
  • Determining, by changing at least one of the x, the y, and the Z, to each cache in the cluster system when the criz is greater than the first desired threshold or less than the second desired threshold The node performs resource adjustment such that the adjusted value is less than the first desired threshold and greater than the second desired threshold.
  • the method further includes: calculating, according to a load value of the cache node, a current average load value of the cluster system; When the first expected threshold is greater than the second expected threshold, a resource adjustment manner for the cluster system is determined according to a current average load value and a load threshold of the cluster system.
  • the determining, by the current average load value and the load threshold of the cluster system, a resource adjustment manner for the cluster system including :
  • the embodiment of the present invention provides a distributed cache control apparatus, including: a collection module, configured to collect client statistics information of a cache node in a cluster system; and a calculation module, configured to collect a client according to the collection module The statistical information calculates the average expected value of the user;
  • a decision module configured to determine, according to an average expected value of the user obtained by the computing module, a resource adjustment manner to the cluster system according to a desired threshold
  • an execution module configured to perform a node shrink operation or a node expansion operation on the cache node in the cluster system according to the resource adjustment manner determined by the decision module.
  • the determining module is specifically configured to: when the average expected value of the user is greater than a first expected threshold, determine to perform the node shrinking operation on the cluster system; or And determining, when the average expected value of the user is less than a second expected threshold, performing the node expansion operation on the cluster system.
  • the client statistics include the cluster data access response time, the cluster cache hit ratio, and the cluster data.
  • the calculation module is specifically configured to calculate, according to the cluster data access response time, the cluster cache hit ratio, and the cluster data throughput, an expected value of the user for each cache node: where ⁇ ; — represents the data fetch response time of the cache node i, the _ ⁇ represents the cache hit ratio of the cache node i, the 7H ; _ ⁇ . Representing the data throughput of the cache node i, the ⁇ , ⁇ , and ⁇ represent weights; and further calculating the average expected value of the user ⁇ : according to the expected value of the cache node by the user.
  • the collecting module is further configured to collect, before the determining module determines a resource adjustment manner of the cluster system, Resource utilization information of a cache node in the cluster system;
  • the determining module comprising: an obtaining unit, configured to acquire, according to resource utilization information of the cache node and the client statistical information collected by the collecting module, an expected value of the user for each cache node and the cache node Relationship curve of resource utilization information;
  • a determining unit configured to determine, according to the expected value of each cache node and the expected threshold, and a relationship curve acquired by the acquiring unit, a resource adjustment manner for each cache node in the cluster system;
  • the execution module is specifically configured to perform resource adjustment on each cache node in the cluster system according to the resource adjustment manner determined by the determining unit and the resource utilization information of the cache node collected by the collection module.
  • the resource utilization information of the cache node includes a hardware parameter of the cache node, an operating system parameter, and the cache node is a configuration parameter in the cluster system, where the operating system parameter is used to calculate a load value of the cache node;
  • the obtaining unit is specifically configured to acquire, according to hardware parameters of the cache node, a load value of the cache node, configuration parameters of the cache node in the cluster system, and statistics of the client.
  • the relationship between the expected value of the user for each cache node according to the hardware parameters of the cache node, the load value of the cache node, and the configuration parameter of the cache node in the cluster system is:
  • E n f(X n J n , Z n ) ;
  • the X indicates the hardware parameter of the cache node, the ⁇ represents the load value of the cache node, and the ⁇ represents the configuration parameter of the cache node in the cluster system;
  • the determining unit is specifically configured to determine, by changing at least one of the X, the y, and the Z, when the hail is greater than the first desired threshold or less than the second desired threshold
  • the resource adjustment is performed on each cache node in the cluster system, such that the adjustedire is less than the first desired threshold and greater than the second desired threshold.
  • the calculating module is further configured to calculate a current status of the cluster system according to a load value of the cache node Average load value;
  • the decision module is further configured to determine, according to the current average load value and the load threshold of the cluster system, when determining that the ⁇ is less than the first expected threshold and greater than the second expected threshold The resource adjustment method of the cluster system.
  • the distributed cache control method and device collects the client's statistical information of each cache node in the cluster system to obtain the average expected value of the user for the system, and according to the average expected value and the expected threshold.
  • the resource adjustment scheme of the cluster system is compared to perform corresponding node contraction or node expansion operation on the cache node in the system.
  • the user's satisfaction with the cluster system QoS is monitored, and the resources of the cluster system are adjusted accordingly.
  • the strategy improves the quality of the client's service.
  • FIG. 1 is a flowchart of a distributed cache control method according to Embodiment 1 of the present invention
  • FIG. 2 is a schematic structural diagram of a cluster system provided by the embodiment shown in FIG. 1;
  • FIG. 3 is a flowchart of a distributed cache control method according to Embodiment 2 of the present invention
  • FIG. 4 is a flowchart of a distributed cache control method according to Embodiment 3 of the present invention
  • FIG. 6 is a schematic structural diagram of a distributed cache control apparatus according to Embodiment 5 of the present invention
  • FIG. FIG. 7 is a schematic structural diagram of a cluster control server according to Embodiment 6 of the present invention. detailed description
  • FIG. 1 is a flowchart of a distributed cache control method according to Embodiment 1 of the present invention.
  • the method of this embodiment is applicable to the case where the cache node is allocated resources in the cluster system.
  • the method may be performed by a distributed cache control device or a cluster control server, which is usually implemented in hardware and/or software, and may be integrated in the memory of the server, for example integrated in the processor. In the chip, it is executed by the processor.
  • the method of this embodiment includes the following steps:
  • S110 Collect client statistics of the cache node in the cluster system.
  • a cluster system includes a plurality of interconnected computers, which can usually be a distributed system.
  • a cluster control server controls a plurality of clients connected thereto.
  • the client may be referred to as a cache node in the following embodiments.
  • the data processing in the data processing usually adopts the distributed cache clustering technology. This embodiment is described by taking the Memcached clustering technology that is currently used as an example.
  • FIG. 2 the structure of the clustering system provided in the embodiment shown in FIG.
  • the cluster control server is connected to n cache nodes, such as Memcached server 1 to Memcached server n, each cache node is a separate client, including a server and a memory, and the n cache nodes are An application server connection that provides an application for each buffer node.
  • the execution entities in this embodiment and the following embodiments are all cluster control servers, and the server collects client statistics information of each buffer node connected thereto, and the client statistics information may be user behavior perception of the client, usually based on the pair of users.
  • the Qos satisfaction survey in particular, can collect the client statistical information in a preset time window, and provide basic information for the control method provided in this embodiment.
  • the collected client statistics information is information of each cache node connected to the cluster control server, and the hardware resources and system configurations of each cache node may be different or the same, therefore, the user The satisfaction of each cached QoS may also be different.
  • the user's average expected value of the user's expected value of each buffer node may be calculated to obtain a comprehensive evaluation of the overall QoS of the cluster system, for example, According to the collected client statistics, the average expected value of the cluster system is obtained by using the optimization theory algorithm of operations research.
  • the conventional methods for resource allocation and adjustment in a cluster system include: reducing the storage data delay, adjusting the cluster deployment mode by evaluating the impact of the load on the cache miss, or changing the size of the cache by making a predefined step size for resource adjustment.
  • the prior art generally adopts a single analysis and judgment rule for resource adjustment.
  • the error rate of the data cache in the cluster system is high, and the resource control is performed according to the resource monitoring of the cache node itself, and cannot be It reflects the user's satisfaction with the QoS of each cache node.
  • the resource adjustment of the cluster system is determined according to the user's demand for Qos. For example, a desired threshold may be preset, and a resource adjustment scheme may be decided by comparing the expected threshold with the average expected value of the user.
  • the specific manner of adjusting the resource adjustment may be: determining that the node shrinking operation is performed on the cluster system when the average expected value of the user is greater than the first expected threshold; or determining that the average expected value of the user is less than the second expected threshold.
  • a node expansion operation is performed on the cluster system.
  • the first expected threshold and the second expected threshold are the expected threshold ranges. When the calculated average expected threshold exceeds the range, the resource of the cluster system needs to be adjusted accordingly; on the one hand, the average expected value is high. In this range, the user is more satisfied with the QoS of the cache node in the cluster system, that is, the cost of the current resource configuration of the cluster system is higher. Therefore, some cache nodes in the system can be shut down to reduce system resources.
  • the foregoing adjustment policy is performed on the resources of the cluster system by comparing the average expected value of the user with the expected threshold.
  • each of the cluster systems may be operated by an operation instruction according to the indication of the foregoing policy.
  • the cache node performs a shrinking or expanding operation, and the execution of the operation corresponds to the resource adjustment policy described above, for example, changing the number of cache nodes in the cluster system.
  • the distributed cache control method collects client statistics of each cache node in the cluster system to obtain an average expected value of the system, and determines the cluster system according to the comparison between the average expected value and the expected threshold.
  • the resource adjustment scheme is implemented to perform corresponding node contraction or node expansion operation on the cache node in the system.
  • the user is satisfied with the QoS of the cluster system, and the corresponding adjustment strategy is implemented on the resources of the cluster system, thereby improving the client.
  • Service quality of the terminal further, dynamically adjust the resource utilization of the cluster system by monitoring the average expected value of the user, and reduce the consumption of system resources as much as possible while ensuring that the user's QoS of the cluster system is expected, and correspondingly improve The efficiency of the use of system resources.
  • FIG. 3 is a flowchart of a distributed cache control method according to Embodiment 2 of the present invention. As shown in FIG. 3, the method provided in this embodiment includes the following steps:
  • S210 Collect client statistics of the cache node in the cluster system.
  • S210 refers to S110 in Embodiment 1.
  • S220 Collect resource utilization information of the cache node in the cluster system.
  • the resource utilization information of each cache node may be collected, and the cache nodes themselves from the cluster system.
  • the resources utilization information is monitored.
  • the resource utilization information of the cache node may include a central processing unit (CPU), memory, and network input/output (Input/Output, referred to as: 10) utilization,
  • CPU central processing unit
  • memory volatile and non-volatile memory
  • Network input/output Input/Output, referred to as: 10
  • the collection of the client statistics and the resource utilization information of the cache node may be implemented by using a code instruction.
  • the code for collecting resource information provided by the embodiment is specifically:
  • Struct stat get- size
  • Double timeDiff currentTime.tv— sec - global— stats.last_time.tv — sec + 1 e-6 * (currentTime .tv_sec - global_stats.last_time.tv_sec);
  • Double rps global— stats.requests/timeDiff;
  • Double std getStdDev(&global_stats.response_time);
  • the resource utilization information of the cache node may include, for example, a hardware parameter (Hardware Parameter) of the cache node, an operating system parameter (Operating System Parameter), and configuration parameters of each cache node in the cluster system (Memcached Configuration).
  • the operating system parameter represents the working state of the cache node, that is, the utilization of the node, and is used to calculate the load value of the cache node, which can be represented by the CPU, the memory, and the network IO.
  • the definition of x is the eigenvalue of the hardware parameter of the cache node, which represents the total number of distributed cache nodes in the cluster system where the cache node is currently located. Therefore, the value of X hail represents the number of cache nodes currently composed by the cluster system.
  • the division of resources is achieved through configuration files in the system.
  • Definition 1 is the eigenvalue of the operating system parameter of the cache node, and represents the working state of each cache node. This embodiment is described by taking the CPU, memory, and network IO utilization as an example. Therefore, the value of y au corresponds to different cache nodes. The working state, the value of which is the resource utilization of the cache node. Through the dynamic adjustment of load balancing, the load value of the cache node can be expressed as:
  • CPUi, MEM, , ⁇ respectively represent the CPU, memory, and network IO utilization of the i-th cache node, where ", and ⁇ are weights; specifically, the i-th cache node Load value.
  • the definition Z is the characteristic value of the configuration parameter of the cache node in the cluster system, and represents the parameter setting of different Memcached in the cache node. Therefore, the value of z clients corresponds to the running parameter of Memcached of different cache nodes, and the parameter is configured by the Memcached command.
  • Line or profile settings, 2nd can be expressed as:
  • (2) represents the set of configuration files for each cache node in the cluster system.
  • Memcached cluster application when the Memcached cluster application is first executed, it can be run using the default Memcached configuration file.
  • the expected value of the cache node obtained by the user in the embodiment may be expressed as a function according to a hardware parameter of the cache node, a load value of the cache node, and a configuration parameter of the cache node in the cluster system. :
  • S240 Determine a resource adjustment manner of each cache node in the cluster system according to a user expectation value and a desired threshold for each cache node, and the relationship curve.
  • the expected value of the user for each cache node has been obtained along with the corresponding X tract, ! and the change curve, that is, X tract, !
  • the change of ⁇ or ⁇ has an effect on the caravan, so, according to the comparison with the expected threshold, the resource adjustment strategy of each cache node in the cluster system can be determined, so that the adjusted caravan is within the range of the desired threshold.
  • the embodiment specifically adjusts the resource utilization of each buffer node in the cluster system, which is different from the overall resource of the cluster system in the above embodiment; specifically, for the user-to-partial part
  • the node whose expected value of the buffer node is within the desired threshold range does not need to perform resource adjustment.
  • the buffer node may be respectively corresponding to the corresponding relationship of (3) above.
  • the resources are redistributed, for example, the CPU usage of the partial cache node is turned off or turned on, the proportion of the buffer function in the memory is adjusted, the bandwidth of the network is used, and the like. Therefore, the method provided in this embodiment only needs to be satisfactory to the user.
  • the cache node that achieves the expected effect performs resource adjustment, which saves the cost of resource adjustment by the cluster system, reduces the bit error rate of the cluster system, and increases the flexibility of the resource adjustment scheme.
  • the distributed cache control method collects client statistics information and resource utilization information of each cache node in the cluster system, and acquires a relationship between the expected value of each cache node and the resource utilization information of the corresponding cache node. Determining, according to the comparison between the expected value of each cache node and the expected threshold, the resource adjustment scheme of the cache node in the cluster system, so as to implement resource adjustment for the cache node that does not achieve the desired effect in the cluster system.
  • the embodiment combines the user satisfaction with the cache node Qos and the resource utilization information of the corresponding node, and adjusts the resource of the cache node in the cluster system, which is beneficial to reducing the error rate of the cluster system. Further, this embodiment provides The distributed cache control method only needs to perform resource adjustment on the cache node whose user satisfaction degree does not achieve the expected effect, which saves the cost of resource adjustment of the cluster system, and increases the flexibility of the resource adjustment scheme.
  • FIG. 4 is a flowchart of a distributed cache control method according to Embodiment 3 of the present invention. As shown in FIG. 4, the method provided in this embodiment includes the following steps:
  • S310 Collect client statistics of the cache node in the cluster system.
  • S320 Calculate an average expected value of the user according to the client statistical information.
  • the client statistics collected in this embodiment may include a cluster data access response time (Cluster Date Access Response Time), and a cluster cache. Cache Hit Rate and Cluster Date Throughput Rate; S320 specifically includes: calculating a user pair according to the cluster data access response time, the cluster cache hit ratio, and the cluster data throughput
  • the expected value of the cache node is: (4) where ⁇ ⁇ represents the data access response time of the cache node i, Ri—one represents the cache hit ratio of the cache node i, and THL ⁇ represents the data throughput of the cache node i, ⁇ ⁇ , ⁇ and represent the weight; and then calculate the average expected value of the user ⁇ : according to the user's expected value for each cache node.
  • S360 refers to S130 in Embodiment 1.
  • S370 Determine a resource adjustment manner for the cluster system according to a current average load value and a load threshold of the cluster system.
  • the satisfaction degree of the user to the QoS can reach the expected requirement
  • the method for adjusting the resource can be further determined according to the comparison between the current average load value of the cluster system and the load threshold; for example, the specific manner of adjusting the resource decision
  • the method may be: when the current average load value of the cluster system is greater than the first load threshold, determine that the node expansion operation is performed on the cluster system; or, when the current average load value of the cluster system is less than the second load threshold, determine The cluster system performs the node shrink operation.
  • the first load threshold and the second load threshold are load threshold ranges.
  • the resource of the cluster system needs to be adjusted accordingly;
  • the current average load value is higher than the range, the current load of each cache node in the cluster system is higher. Therefore, the system load can be reduced by increasing the number of cache nodes in the system.
  • the current average load value is lower than the current load value. In the scope, it indicates that the load of each cache node in the cluster system is not saturated. Therefore, the system resource consumption can be reduced by turning off some cache nodes in the system.
  • the current average load value of the cluster system is within the range of the load threshold, indicating that the resource configuration of the cluster system conforms to the load balancing principle on the premise that the user's satisfaction with the QoS is expected.
  • the configuration of the distributed cache control method provided in this embodiment may be performed cyclically.
  • the configuration of the distributed cache control method provided in this embodiment may be performed cyclically.
  • the decision of the resource adjustment mode of the cluster system may also be: Cache nodes satisfying > ⁇ in the cluster system form an migrating node The set, the cache nodes satisfying ⁇ ⁇ constitute a set of move-in nodes, where ⁇ : represents the current average load value of the cluster system, and f is a preset ratio obtained by long-term historical monitoring data.
  • the new cache node is added to the set of the moved node, that is, The number of X grasping user service, data migration is gradually performed by the application background; if it is calculated that the set of the moved node is much larger than the number of the set of the moved node, it is determined that the node is executed for the cluster system.
  • the cache node with smaller load value in the cluster system can be selected to perform the merge operation, that is, the number of X propeller is reduced, and the data migration by the application background is also performed under the condition of ensuring user service. .
  • the distributed cache control method provided in this embodiment determines the client's statistical information and resource utilization information of each cache node in the cluster system according to the average expected value of the system and the current load average value of the system.
  • the resource adjustment scheme of the cluster system ensures the quality of service of the client, and further improves the efficiency of using system resources.
  • the range of the expected threshold may be changed to adapt to the hardware and software configuration of the current cluster system.
  • the requirements of the cluster data access response time, the cluster cache hit ratio, or the cluster data throughput can be changed, especially the cluster cache hit ratio, which directly limits the concurrent access volume of the Memcached client, that is, directly limits the number of access request connections.
  • the method provided by the embodiment is advantageous for maintaining the normal working state of the cluster system and finding a solution for solving the resource depletion.
  • FIG. 5 is a schematic structural diagram of a distributed cache control apparatus according to Embodiment 4 of the present invention.
  • the distributed cache control apparatus provided in this embodiment specifically includes: a collection module 11, a calculation module 12, a decision module 13 and an execution module 14.
  • the collecting module 11 is configured to collect client statistics of the cache node in the cluster system.
  • the calculating module 12 is configured to calculate an average expected value of the user according to the client statistics collected by the collecting module 11.
  • the decision module 13 is configured to determine a resource adjustment manner for the cluster system according to the average expected value of the user obtained by the calculation module 12 and the expected threshold.
  • the executing module 14 is configured to perform a node contraction operation or a node expansion operation on the cache node in the cluster system according to the resource adjustment manner determined by the decision module 13.
  • the decision module 13 is specifically configured to: the average expected value of the user is greater than the first When the threshold is expected, it is determined that the node shrink operation is performed on the cluster system; or, when the average expected value of the user is less than the second desired threshold, it is determined that the node expansion operation is performed on the cluster system.
  • the first expected threshold and the second expected threshold are the expected threshold ranges. When the calculated average expected threshold exceeds the range, the resource of the cluster system needs to be adjusted accordingly; on the one hand, the average expected value is high. In this range, the user is more satisfied with the QoS of the cache node in the cluster system, that is, the cost of the current resource configuration of the cluster system is higher.
  • the collection module 11 can continue to execute.
  • the operation of collecting the client statistics information of the cache node in the cluster system may be performed cyclically by the distributed cache control device provided in this embodiment.
  • the distributed cache control device provided by the embodiment of the present invention is configured to perform the distributed cache control method provided by the first embodiment of the present invention, and has a corresponding function module, and the implementation principle and the technical effect thereof are similar, and details are not described herein again.
  • FIG. 6 is a schematic structural diagram of a distributed cache control apparatus according to Embodiment 5 of the present invention. As shown in FIG. 6, the apparatus provided in this embodiment is based on the apparatus structure shown in FIG. 5, and the collection module 11 is further configured to collect the cluster system before the decision module 13 determines the resource adjustment mode of the cluster system. In the present embodiment, the collection module 11 does not have a clear sequence of collection of client statistical information and resource utilization information.
  • the decision module 13 includes: an obtaining unit 15 configured to acquire, according to the resource utilization information of the cache node and the client statistical information collected by the collection module 11, the expected value of the cache node and the resource utilization information of the cache node.
  • the determining unit 16 is configured to determine a resource adjustment manner of each cache node in the cluster system according to a desired value and a desired threshold of each cache node and a relationship curve acquired by the obtaining unit 15 .
  • the resource utilization information of the cache node collected by the collection module 11 may include the The hardware parameter of the cache node, the operating system parameter, and the configuration parameter of the cache node in the cluster system, and the operating system parameter is used to calculate the load value of the cache node.
  • the obtaining unit 15 is configured to obtain, according to the hardware parameter of the cache node, the load value of the cache node, the configuration parameter of the cache node in the cluster system, and the statistics information of the client,
  • the expected value of the cache node may be represented by the function form (3) according to the hardware parameter of the cache node, the load value of the cache node, and the configuration parameter of the cache node in the cluster system, and the formula may be Through the long-term monitoring of the collection of historical experience data, for example, a function approximation algorithm can be used to obtain a curve of réelle ⁇ , doctor and ⁇ political; accordingly, the determining unit 16 is specifically used to be greater than the first desired threshold or less than the second when the desired threshold, it is determined ", Y n ⁇ and adjusting at least one of the resources of each cache node in the cluster system by changing the X, less than the first desired value such that the adjusted threshold and greater than a second desired threshold.
  • the distributed cache control apparatus provided in this embodiment separately formulates resource adjustment policies for each cache node in the cluster system, so that the user's satisfaction level with each cache node Qos can reach the expected value requirement.
  • the execution module 14 is further configured to perform resource adjustment on each cache node in the cluster system according to the resource adjustment manner determined by the determining unit 16 and the resource utilization information of the cache node collected by the collection module 11.
  • the distributed cache control device provided by the embodiment of the present invention is configured to perform the distributed cache control method provided by the second embodiment of the present invention, and has a corresponding function module, and the implementation principle and the technical effect thereof are similar, and details are not described herein again.
  • the client statistics collected by the collection module 11 include a cluster data access response time, a cluster cache hit ratio, and a cluster data throughput.
  • the calculation module 12 is specifically configured to The cluster data fetch response time, the cluster cache hit ratio, and the cluster data throughput, and the expected value of the user for each cache node is calculated as the above formula (4), and the average expected value of the user is calculated according to the expected value of the cache node by the user ⁇ : .
  • the collection module 11 collects the resource utilization information of the cache node, and the operating system parameter therein can be used to calculate the load value of the cache node, that is, the calculation module 12, and is further configured to calculate the load value according to the cache node.
  • the current average load value of the cluster system correspondingly, the decision module 13 is further configured to determine, according to the current average load value and the load threshold of the cluster system, when determining that: less than the first expected threshold and greater than the second expected threshold Resource adjustment of the cluster system The whole mode; on the other hand, when it is determined that ⁇ : is greater than the first desired threshold, or is less than the second desired threshold, the resource adjustment mode for the cluster system is determined according to the ⁇ : and the expected threshold.
  • the determining module 13 determines the resource adjustment mode of the cluster system according to the current average load value and the load threshold of the cluster system, and specifically includes: when the current average load value of the cluster system is greater than the first load threshold. And determining to perform a node expansion operation on the cluster system; or, when the current average load value of the cluster system is less than a second load threshold, determining to perform the node shrink operation on the cluster system.
  • the first load threshold and the second load threshold are load threshold ranges. When the calculated current load threshold of the cluster system exceeds the range, the resource of the cluster system needs to be adjusted accordingly. On the one hand, the current average load value is high. In this range, the current load of each cache node in the cluster system is high.
  • the system load can be reduced by increasing the number of cache nodes in the system.
  • the current average load value is lower than the range, The load of each cache node in the cluster system is not saturated. Therefore, the system resource consumption can be reduced by turning off some cache nodes in the system.
  • the current average load value of the cluster system is within the range of the load threshold, indicating that the resource configuration of the cluster system conforms to the load balancing principle on the premise that the user's satisfaction with the QoS is expected.
  • the operation of the distributed cache control device provided in this embodiment may be performed by the collection module 11 to continue the operation of collecting the client statistics and the resource utilization information of the cache node in the cluster system. It is done in a loop.
  • the distributed cache control device provided by the embodiment of the present invention is configured to perform the distributed cache control method provided by the third embodiment of the present invention, and has a corresponding function module, and the implementation principle and the technical effect thereof are similar, and details are not described herein again.
  • FIG. 7 is a schematic structural diagram of a cluster control server according to Embodiment 6 of the present invention.
  • the cluster control server provided in this embodiment specifically includes: a collector 21, a calculator 22, and a processor 23.
  • the collector 21 is configured to collect client statistics of the cache node in the cluster system.
  • the calculator 22 is configured to calculate the average expected value of the user based on the client statistics collected by the collector 21.
  • the processor 23 is configured to obtain an average expected value of the user according to the calculator 22, and a desired threshold The value determines how the resource is adjusted for the cluster system.
  • the processor 23 is further configured to perform a node shrink operation or a node expansion operation on the cache node in the cluster system according to the determined resource adjustment manner.
  • the processor 23 determines that the resource adjustment manner of the cluster system is specifically: when the average expected value of the user is greater than the first expected threshold, determining that the node shrink operation is performed on the cluster system; or, the average expected value of the user When less than the second desired threshold, it is determined that the node expansion operation is performed on the cluster system.
  • the first expected threshold and the second expected threshold are the expected threshold ranges. When the calculated average expected threshold exceeds the range, the resource of the cluster system needs to be adjusted accordingly; on the one hand, the average expected value is high. In this range, the user is more satisfied with the QoS of the cache node in the cluster system, that is, the cost of the current resource configuration of the cluster system is higher.
  • the collector 21 can continue to execute.
  • the operation of collecting the client statistics information of the cache node in the cluster system may be performed cyclically by the cluster control server provided in this embodiment.
  • the cluster control server provided by the embodiment of the present invention is configured to perform the distributed cache control method provided by the first embodiment of the present invention, and has a corresponding physical device.
  • the implementation principle and technical effects are similar, and details are not described herein again.
  • FIG. 7 is a schematic structural diagram of a cluster control server according to Embodiment 7 of the present invention.
  • the collector 21 is further configured to collect the resource utilization information of the cache node in the cluster system before the processor 23 determines the resource adjustment mode of the cluster system. 21 There is no clear sequence of collection of client-side statistics and resource utilization information.
  • the determining, by the processor 23, the resource adjustment manner of the cluster system may be: obtaining the expected value of the user for each cache node and the cache node according to the resource utilization information and the client statistics information of the cache node collected by the collector 21 Resource utilization information relationship curve; The expected value of each cache node, the expected threshold, and the acquired relationship curve determine the resource adjustment mode of each cache node in the cluster system.
  • the resource utilization information of the cache node collected by the collector 21 may include hardware parameters of the cache node, operating system parameters, and configuration parameters of the cache node in the cluster system, where the operating system parameters are used for calculation.
  • the load value of this cache node may include hardware parameters of the cache node, operating system parameters, and configuration parameters of the cache node in the cluster system, where the operating system parameters are used for calculation.
  • the processor 23 obtains a relationship between the expected value of the cache node and the resource utilization information of the cache node, and may be: according to the hardware parameter of the cache node, the load value of the cache node, and the a configuration parameter of the cache node in the cluster system, and the client statistics, obtaining a user expected value for each cache node according to a hardware parameter of the cache node, a load value of the cache node, and the cache node in the cluster system
  • the relationship between the configuration parameters can be expressed in the form of a function (3) above, which can be obtained by long-term monitoring of the collection of historical empirical data. For example, a function approximation algorithm can be used to obtain a curve ofquaint, ⁇ , and ⁇ constitute.
  • the processor 23 determines a resource adjustment manner of each cache node in the cluster system, which may be: when the value is greater than the first desired threshold or less than the second desired threshold, the determination is determined by changing at least X, ynz A resource adjustment for each cache node in the cluster system So that the adjusted is less than the first desired threshold and greater than the second desired threshold.
  • cluster control server provided in this embodiment separately formulates resource adjustment policies for each cache node in the cluster system, so that the user can satisfy the expected value of each cache node Qos.
  • the processor 23 is further configured to adjust the manner and the collector according to the determined resource.
  • the resource utilization information of the collected cache nodes is separately adjusted for resources in each cache node in the cluster system.
  • the cluster control server provided by the embodiment of the present invention is configured to perform the distributed cache control method provided by the second embodiment of the present invention, and has a corresponding physical device, and the implementation principle and technical effects thereof are similar, and details are not described herein again.
  • the client statistics collected by the collector 21 include a cluster data access response time, a cluster cache hit ratio, and a cluster data throughput.
  • the calculator 22 is specifically configured to The cluster data fetch response time, the cluster cache hit ratio, and the cluster data throughput, and the expected value of the user for each cache node is calculated as the above formula (4), and the average expected value of the user is calculated according to the expected value of the cache node by the user ⁇ : .
  • the collector 21 collects the resource utilization information of the cache node, and the operating system parameter therein can be used to calculate the load value of the cache node, that is, the calculator 22, and is further configured to calculate the load value according to the cache node.
  • the current average load value of the cluster system correspondingly, the processor 23 is further configured to determine, according to the current average load value and the load threshold of the cluster system, when determining that: less than the first expected threshold and greater than the second expected threshold
  • the resource adjustment mode of the cluster system when it is determined that ⁇ is greater than the first desired threshold or less than the second desired threshold, the resource adjustment mode for the cluster system is determined according to the ⁇ : and the expected threshold.
  • the processor 23 determines the resource adjustment mode of the cluster system according to the current average load value and the load threshold of the cluster system, and specifically includes: when the current average load value of the cluster system is greater than the first load threshold. And determining to perform a node expansion operation on the cluster system; or, when the current average load value of the cluster system is less than a second load threshold, determining to perform the node shrink operation on the cluster system.
  • the first load threshold and the second load threshold are load threshold ranges. When the calculated current load threshold of the cluster system exceeds the range, the resource of the cluster system needs to be adjusted accordingly. On the one hand, the current average load value is high. In this range, the current load of each cache node in the cluster system is high.
  • the system load can be reduced by increasing the number of cache nodes in the system.
  • the current average load value is lower than the range, The load of each cache node in the cluster system is not saturated. Therefore, the system resource consumption can be reduced by turning off some cache nodes in the system.
  • the current average load value of the cluster system is within the range of the load threshold, indicating that the resource configuration of the cluster system conforms to the load balancing principle on the premise that the user's satisfaction with the QoS is expected.
  • the operation of collecting the cluster statistics of the cache node in the cluster system may be performed by the collector 21, and the execution process of the cluster control server provided in this embodiment may be a loop. ongoing.
  • the cluster control server provided by the embodiment of the present invention is configured to perform the distributed cache control method provided by the third embodiment of the present invention, and has a corresponding physical device.
  • the implementation principle and technical effects are similar, and details are not described herein again.
  • the aforementioned program can be stored in a computer readable storage medium.
  • the program when executed, performs the steps including the various method embodiments described above;
  • the foregoing storage medium includes various media that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.

Abstract

The embodiment of the present invention provides a distributed cache control method and apparatus. The distributed cache control method provided by the present invention includes: collecting client statistic information of the cache nodes in the cluster system; computing the average expected value of users according to the client statistic information; determining the resource adjustment mode of the system according to the average expected value of the users and an expected threshold; performing node contraction operation or node expansion operation on the cache nodes in the cluster system according to the determined resource adjustment mode. The embodiment of the present invention performs corresponding adjustment strategy on the resources of the cluster system by monitoring user satisfaction to the Quality of Service (Qos) of the cluster system, thus improving the quality of service of the client.

Description

分布式缓存控制方法及装置  Distributed cache control method and device
技术领域 Technical field
本发明实施例涉及计算机技术, 尤其涉及一种分布式缓存控制方法及装 置。 背景技术  The embodiments of the present invention relate to computer technologies, and in particular, to a distributed cache control method and apparatus. Background technique
随着计算机技术的发展和广泛使用, 高速缓冲存储器(cache) 已经大规 模的应用于集群系统的缓存功能中, 尤其是分布式 cache集群的发展应用, 在很大程度上提高了数据缓存的速度和效率。  With the development and widespread use of computer technology, caches have been widely used in the cache function of cluster systems, especially the development of distributed cache clusters, which greatly improves the speed of data cache. And efficiency.
随着集群系统中数据流量的增长, 以及分布式 cache集群规模的扩大, 管理控制集群系统中分布式缓存节点的资源分配成为优化系统资源的重要因 素; 举例来说, 目前使用高性能分布式内存对象缓存系统 (Memcached) 的 集群, 例如社交网络服务网站 (Facebook) , 进行集群优化管理的方式通常 包括: 减少存储数据时延; 通过评估负载对高速缓存缺失(cache miss) 的影 响来调整集群部署方式,具体地,分析内存 cache、内存置换算法(Replacement Algorithm ) 与 cache miss 的关系, 提供更有效率的开发算法 (Render Algorithm) ; 或者通过制定预定义歩长来改变 cache的大小进行配置资源的 优化。  With the increase of data traffic in the cluster system and the expansion of the size of the distributed cache cluster, the resource allocation of the distributed cache nodes in the management control cluster system becomes an important factor for optimizing system resources; for example, high-performance distributed memory is currently used. Clusters of object caching systems (Memcached), such as social networking service sites (Facebook), typically perform cluster optimization management by: reducing storage data latency; adjusting cluster deployment by assessing the impact of load on cache misses Ways, specifically, analyzing the relationship between memory cache, memory replacement algorithm and cache miss, providing a more efficient Render Algorithm; or configuring the resource by changing the size of the cache by defining a predefined length optimization.
但是, 现有技术对集群系统的管理方式, 通常仅通过监测集群系统的资 源利用情况, 来制定优化该集群系统资源分配的策略。 发明内容  However, the prior art management method of the cluster system usually only by monitoring the resource utilization of the cluster system, and formulating a strategy for optimizing resource allocation of the cluster system. Summary of the invention
本发明实施例提供一种分布式缓存控制方法及装置, 通过监测用户对集 群系统服务质量 (Quality of Service, 简称为: Qos ) 的满意程度, 对集群系 统的资源执行相应的调整策略。  The embodiment of the present invention provides a distributed cache control method and apparatus, and performs a corresponding adjustment strategy on the resources of the cluster system by monitoring the satisfaction degree of the user to the Quality of Service (Qos) of the cluster system.
第一方面, 本发明实施例提供一种分布式缓存控制方法, 包括: 收集集群系统中缓存节点的客户端统计信息;  In a first aspect, an embodiment of the present invention provides a distributed cache control method, including: collecting client statistics information of a cache node in a cluster system;
根据所述客户端统计信息计算用户的平均期望值; 根据所述用户的平均期望值和期望阈值确定对所述集群系统的资源调整 方式; Calculating an average expected value of the user according to the client statistical information; Determining a resource adjustment manner for the cluster system according to an average expected value of the user and a desired threshold;
根据所述已确定的资源调整方式对所述集群系统中的缓存节点执行节点 收缩操作或者节点扩展操作。  Performing a node shrink operation or a node expansion operation on the cache node in the cluster system according to the determined resource adjustment manner.
在第一方面的第一种可能的实现方式中, 所述根据所述用户期望值和期 望阈值确定对所述集群系统的资源调整方式, 包括:  In a first possible implementation manner of the first aspect, the determining, by the user expected value and the expected threshold, a resource adjustment manner for the cluster system, including:
在所述用户的平均期望值大于第一期望阈值时, 确定对所述集群系统执 行所述节点收缩操作; 或者,  Determining, when the average expected value of the user is greater than a first desired threshold, performing the node shrinking operation on the cluster system; or
在所述用户的平均期望值小于第二期望阈值时, 确定对所述集群系统执 行所述节点扩展操作。  When the average expected value of the user is less than a second desired threshold, it is determined that the node expansion operation is performed on the cluster system.
根据第一方面或第一方面的第一种可能的实现方式, 在第二种可能的实 现方式中, 所述客户端统计信息包括所述集群数据访存响应时间、 集群缓存 命中率和集群数据吞吐量;  According to the first aspect or the first possible implementation manner of the first aspect, in a second possible implementation manner, the client statistics include the cluster data access response time, a cluster cache hit ratio, and cluster data. Throughput
则所述根据所述客户端统计信息计算用户的平均期望值, 包括: 根据所述集群数据访存响应时间、 所述集群缓存命中率和所述集群数据 吞吐量, 计算出所述用户对各缓存节点的期望值为: 其中, 所述 表示缓存节点 i的数据访存响应时间, 所述 _ ^^表 示所述缓存节点 i的缓存命中率,所述 TH ^表示所述缓存节点 i的数据吞吐 量, 所述 l 12和^3表示权值; And the calculating the average expected value of the user according to the client statistics, including: calculating, according to the cluster data access response time, the cluster cache hit ratio, and the cluster data throughput, the user to each cache The expected value of the node is: wherein, the data fetch response time indicating the cache node i, the _ ^ ^ represents the cache hit ratio of the cache node i, and the TH ^ represents the data throughput of the cache node i , the l 1 2 and ^3 represent weights;
根据所述用户对各缓存节点的期望值计算所述用户的平均期望值 ^:。 根据第一方面的第二种可能的实现方式, 在第三种可能的实现方式中, 所述根据所述用户的平均期望值和期望阈值确定对所述集群系统的资源调整 方式之前, 还包括:  Calculating the average expected value of the user ^: according to the expected value of the cache node by the user. According to the second possible implementation manner of the first aspect, in a third possible implementation, before the determining, by the user, the resource adjustment manner of the cluster system according to the average expected value and the expected threshold of the user, the method further includes:
收集所述集群系统中缓存节点的资源利用信息;  Collecting resource utilization information of the cache node in the cluster system;
则所述根据所述用户的平均期望值和期望阈值确定对所述集群系统的资 源调整方式, 包括:  And determining the resource adjustment manner for the cluster system according to the average expected value and the expected threshold of the user, including:
根据收集的所述缓存节点的资源利用信息和所述客户端统计信息获取所 述用户对各缓存节点的期望值与所述缓存节点的资源利用信息的关系曲线; 根据所述用户对各缓存节点的期望值和所述期望阈值, 以及所述关系曲 线确定对所述集群系统中各缓存节点的资源调整方式; Obtaining, according to the collected resource utilization information of the cache node and the client statistical information, a relationship between an expected value of the user for each cache node and resource utilization information of the cache node; according to the user to each cache node Expectation value and the desired threshold, and the relationship The line determines a resource adjustment manner for each cache node in the cluster system;
则所述根据所述已确定的资源调整方式对所述集群系统中的缓存节点执 行节点收缩操作或者节点扩展操作, 包括:  And performing the node shrinking operation or the node expanding operation on the cache node in the cluster system according to the determined resource adjustment manner, including:
根据所述已确定的资源调整方式和所述缓存节点的资源利用信息对所述 集群系统中各缓存节点分别进行资源调整。  And performing resource adjustment on each cache node in the cluster system according to the determined resource adjustment manner and the resource utilization information of the cache node.
根据第一方面的第三种可能的实现方式, 在第四种可能的实现方式中, 所述缓存节点的资源利用信息包括所述缓存节点的硬件参数、操作系统参数, 和所述缓存节点在所述集群系统中的配置参数, 所述操作系统参数用于计算 所述缓存节点的负载值;  According to a third possible implementation manner of the first aspect, in a fourth possible implementation, the resource utilization information of the cache node includes a hardware parameter of the cache node, an operating system parameter, and the cache node is a configuration parameter in the cluster system, where the operating system parameter is used to calculate a load value of the cache node;
则所述根据收集的所述缓存节点的资源利用信息和所述客户端统计信息 获取所述用户对各缓存节点的期望值与所述缓存节点的资源利用信息的关系 曲线, 包括:  And obtaining, according to the collected resource utilization information of the cache node and the client statistical information, a relationship curve between the expected value of each cache node and the resource utilization information of the cache node, including:
根据所述缓存节点的硬件参数、 所述缓存节点的负载值和所述缓存节点 在所述集群系统中的配置参数, 以及所述客户端统计信息, 获取所述用户对 各缓存节点的期望值根据所述缓存节点的硬件参数、所述缓存节点的负载值、 和所述缓存节点在所述集群系统中的配置参数的关系曲线为:  Obtaining, according to the hardware parameter of the cache node, the load value of the cache node, the configuration parameter of the cache node in the cluster system, and the client statistics, the expected value of the user to each cache node according to the The relationship between the hardware parameters of the cache node, the load value of the cache node, and the configuration parameters of the cache node in the cluster system is:
En = f(Xn Jn,Zn) ; E n = f(X n J n , Z n ) ;
其中, 所述 X„表示所述缓存节点的硬件参数, 所述 1 表示所述缓存节点 的负载值, 所述 2„表示所述缓存节点在所述集群系统中的配置参数;  The X indicates the hardware parameter of the cache node, the 1 indicates the load value of the cache node, and the 2 indicates the configuration parameter of the cache node in the cluster system;
则所述根据所述用户对各缓存节点的期望值和所述期望阈值、 以及所述 关系曲线确定对所述集群系统中各缓存节点的资源调整方式, 包括:  And determining a resource adjustment manner for each cache node in the cluster system according to the expected value of the cache node and the expected threshold, and the relationship curve, including:
在所述 „大于所述第一期望阈值或小于所述第二期望阈值时, 确定通过 改变所述 x„、 所述 y„和所述 Z„中至少一项对所述集群系统中各缓存节点进行 资源调整, 使得所述调整后的 £„小于所述第一期望阈值并大于所述第二期望 阈值。  Determining, by changing at least one of the x, the y, and the Z, to each cache in the cluster system when the „ is greater than the first desired threshold or less than the second desired threshold The node performs resource adjustment such that the adjusted value is less than the first desired threshold and greater than the second desired threshold.
根据第一方面的第四种可能的实现方式, 在第五种可能的实现方式中, 还包括: 根据所述缓存节点的负载值计算所述集群系统的当前平均负载值; 确定所述 小于所述第一期望阈值并且大于所述第二期望阈值时, 根据 所述集群系统的当前平均负载值和负载阈值确定对所述集群系统的资源调整 方式。 根据第一方面的第五种可能的实现方式, 在第六种可能的实现方式中, 所述根据所述集群系统的当前平均负载值和负载阈值确定对所述集群系统的 资源调整方式, 包括: According to a fourth possible implementation manner of the first aspect, in a fifth possible implementation, the method further includes: calculating, according to a load value of the cache node, a current average load value of the cluster system; When the first expected threshold is greater than the second expected threshold, a resource adjustment manner for the cluster system is determined according to a current average load value and a load threshold of the cluster system. According to the fifth possible implementation manner of the first aspect, in a sixth possible implementation, the determining, by the current average load value and the load threshold of the cluster system, a resource adjustment manner for the cluster system, including :
在所述集群系统的当前平均负载值大于第一负载阈值时, 确定对所述集 群系统执行所述节点扩展操作; 或者,  Determining, when the current average load value of the cluster system is greater than the first load threshold, performing the node expansion operation on the cluster system; or
在所述集群系统的当前平均负载值小于第二负载阈值时, 确定对所述集 群系统执行所述节点收缩操作。  When the current average load value of the cluster system is less than the second load threshold, it is determined that the node shrink operation is performed on the cluster system.
第二方面, 本发明实施例提供一种分布式缓存控制装置, 包括: 收集模块, 用于收集集群系统中缓存节点的客户端统计信息; 计算模块, 用于根据所述收集模块收集的客户端统计信息计算用户的平 均期望值;  In a second aspect, the embodiment of the present invention provides a distributed cache control apparatus, including: a collection module, configured to collect client statistics information of a cache node in a cluster system; and a calculation module, configured to collect a client according to the collection module The statistical information calculates the average expected value of the user;
决策模块, 用于根据所述计算模块得到的用户的平均期望值, 与期望阈 值确定对所述集群系统的资源调整方式;  a decision module, configured to determine, according to an average expected value of the user obtained by the computing module, a resource adjustment manner to the cluster system according to a desired threshold;
执行模块, 用于根据所述决策模块确定的资源调整方式对所述集群系统 中的缓存节点执行节点收缩操作或者节点扩展操作。  And an execution module, configured to perform a node shrink operation or a node expansion operation on the cache node in the cluster system according to the resource adjustment manner determined by the decision module.
在第二方面的第一种可能的实现方式中, 所述决策模块, 具体用于在所 述用户的平均期望值大于第一期望阈值时, 确定对所述集群系统执行所述节 点收缩操作; 或者, 在所述用户的平均期望值小于第二期望阈值时, 确定对 所述集群系统执行所述节点扩展操作。  In a first possible implementation manner of the second aspect, the determining module is specifically configured to: when the average expected value of the user is greater than a first expected threshold, determine to perform the node shrinking operation on the cluster system; or And determining, when the average expected value of the user is less than a second expected threshold, performing the node expansion operation on the cluster system.
根据第二方面或第二方面的第一种可能的实现方式, 在第二种可能的实 现方式中, 所述客户端统计信息包括所述集群数据访存响应时间、 集群缓存 命中率和集群数据吞吐量;  According to the second aspect or the first possible implementation manner of the second aspect, in a second possible implementation, the client statistics include the cluster data access response time, the cluster cache hit ratio, and the cluster data. Throughput
则所述计算模块, 具体用于根据所述集群数据访存响应时间、 所述集群 缓存命中率和所述集群数据吞吐量, 计算出所述用户对各缓存节点的期望值 为: 其中, 所述 Γ;— 表示缓存节点 i的数据访存响应时间, 所述 _^^表 示所述缓存节点 i的缓存命中率,所述 7H;_^。表示所述缓存节点 i的数据吞吐 量, 所述 ^、 ^和 ^表示权值; 进而根据所述用户对各缓存节点的期望值计 算所述用户的平均期望值^:。 根据第二方面的第二种可能的实现方式, 在第三种可能的实现方式中, 所述收集模块, 还用于在所述决策模块确定对所述集群系统的资源调整方式 之前, 收集所述集群系统中缓存节点的资源利用信息; The calculation module is specifically configured to calculate, according to the cluster data access response time, the cluster cache hit ratio, and the cluster data throughput, an expected value of the user for each cache node: where Γ ; — represents the data fetch response time of the cache node i, the _^^ represents the cache hit ratio of the cache node i, the 7H ; _^. Representing the data throughput of the cache node i, the ^, ^, and ^ represent weights; and further calculating the average expected value of the user ^: according to the expected value of the cache node by the user. According to a second possible implementation manner of the second aspect, in a third possible implementation, the collecting module is further configured to collect, before the determining module determines a resource adjustment manner of the cluster system, Resource utilization information of a cache node in the cluster system;
则所述决策模块, 包括: 获取单元, 用于根据所述收集模块收集的所述 缓存节点的资源利用信息和所述客户端统计信息获取所述用户对各缓存节点 的期望值与所述缓存节点的资源利用信息的关系曲线;  The determining module, comprising: an obtaining unit, configured to acquire, according to resource utilization information of the cache node and the client statistical information collected by the collecting module, an expected value of the user for each cache node and the cache node Relationship curve of resource utilization information;
确定单元, 用于根据所述用户对各缓存节点的期望值和所述期望阈值, 以及所述获取单元获取的关系曲线确定对所述集群系统中各缓存节点的资源 调整方式;  a determining unit, configured to determine, according to the expected value of each cache node and the expected threshold, and a relationship curve acquired by the acquiring unit, a resource adjustment manner for each cache node in the cluster system;
则所述执行模块, 具体用于根据所述确定单元确定的资源调整方式和所 述收集模块收集的缓存节点的资源利用信息对所述集群系统中各缓存节点分 别进行资源调整。  The execution module is specifically configured to perform resource adjustment on each cache node in the cluster system according to the resource adjustment manner determined by the determining unit and the resource utilization information of the cache node collected by the collection module.
根据第二方面的第三种可能的实现方式, 在第四种可能的实现方式中, 所述缓存节点的资源利用信息包括所述缓存节点的硬件参数、操作系统参数, 和所述缓存节点在所述集群系统中的配置参数, 所述操作系统参数用于计算 所述缓存节点的负载值;  According to a third possible implementation manner of the second aspect, in a fourth possible implementation, the resource utilization information of the cache node includes a hardware parameter of the cache node, an operating system parameter, and the cache node is a configuration parameter in the cluster system, where the operating system parameter is used to calculate a load value of the cache node;
则所述获取单元, 具体用于根据所述缓存节点的硬件参数、 所述缓存节 点的负载值和所述缓存节点在所述集群系统中的配置参数, 以及所述客户端 统计信息, 获取所述用户对各缓存节点的期望值根据所述缓存节点的硬件参 数、 所述缓存节点的负载值、 和所述缓存节点在所述集群系统中的配置参数 的关系曲线为:  The obtaining unit is specifically configured to acquire, according to hardware parameters of the cache node, a load value of the cache node, configuration parameters of the cache node in the cluster system, and statistics of the client. The relationship between the expected value of the user for each cache node according to the hardware parameters of the cache node, the load value of the cache node, and the configuration parameter of the cache node in the cluster system is:
En = f(Xn Jn,Zn) ; E n = f(X n J n , Z n ) ;
其中, 所述 X„表示所述缓存节点的硬件参数, 所述 } 表示所述缓存节点 的负载值, 所述 ^表示所述缓存节点在所述集群系统中的配置参数;  The X indicates the hardware parameter of the cache node, the } represents the load value of the cache node, and the ^ represents the configuration parameter of the cache node in the cluster system;
则所述确定单元, 具体用于在所述 „大于所述第一期望阈值或小于所述 第二期望阈值时, 确定通过改变所述 X„、 所述 y„和所述 Z„中至少一项对所述 集群系统中各缓存节点进行资源调整, 使得所述调整后的 „小于所述第一期 望阈值并大于所述第二期望阈值。  The determining unit is specifically configured to determine, by changing at least one of the X, the y, and the Z, when the „ is greater than the first desired threshold or less than the second desired threshold The resource adjustment is performed on each cache node in the cluster system, such that the adjusted „ is less than the first desired threshold and greater than the second desired threshold.
根据第二方面的第四种可能的实现方式, 在第五种可能的实现方式中, 所述计算模块, 还用于根据所述缓存节点的负载值计算所述集群系统的当前 平均负载值; According to a fourth possible implementation manner of the second aspect, in a fifth possible implementation, the calculating module is further configured to calculate a current status of the cluster system according to a load value of the cache node Average load value;
则所述决策模块, 还用于在判断得出所述^:小于所述第一期望阈值并且 大于所述第二期望阈值时, 根据所述集群系统的当前平均负载值和负载阈值 确定对所述集群系统的资源调整方式。  The decision module is further configured to determine, according to the current average load value and the load threshold of the cluster system, when determining that the ^ is less than the first expected threshold and greater than the second expected threshold The resource adjustment method of the cluster system.
根据第二方面的第五种可能的实现方式, 在第六种可能的实现方式中, 所述决策模块根据所述集群系统的当前平均负载值和负载阈值确定对所述集 群系统的资源调整方式, 具体包括: 在所述集群系统的当前平均负载值大于 第一负载阈值时, 确定对所述集群系统执行所述节点扩展操作; 或者, 在所 述集群系统的当前平均负载值小于第二负载阈值时, 确定对所述集群系统执 行所述节点收缩操作。  According to a fifth possible implementation manner of the second aspect, in a sixth possible implementation, the determining, by the determining, determining, by using a current average load value and a load threshold of the cluster system, a resource adjustment manner for the cluster system Specifically, when the current average load value of the cluster system is greater than the first load threshold, determining to perform the node expansion operation on the cluster system; or, the current average load value of the cluster system is smaller than the second load. At the threshold, it is determined that the node shrink operation is performed on the cluster system.
本发明实施例所提供的分布式缓存控制方法及装置, 通过对集群系统中 各缓存节点的客户端统计信息的收集, 以获取用户对该系统的平均期望值, 并根据该平均期望值与期望阈值的对比确定该集群系统的资源调整方案, 以 实现对系统中缓存节点执行相应的节点收缩或节点扩展操作, 本实施例通过 监测用户对集群系统 Qos的满意程度, 对集群系统的资源执行相应的调整策 略, 提高了客户端的服务质量。 附图说明  The distributed cache control method and device provided by the embodiment of the present invention collects the client's statistical information of each cache node in the cluster system to obtain the average expected value of the user for the system, and according to the average expected value and the expected threshold. The resource adjustment scheme of the cluster system is compared to perform corresponding node contraction or node expansion operation on the cache node in the system. In this embodiment, the user's satisfaction with the cluster system QoS is monitored, and the resources of the cluster system are adjusted accordingly. The strategy improves the quality of the client's service. DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对实 施例或现有技术描述中所需要使用的附图作一简单地介绍, 显而易见地, 下 面描述中的附图是本发明的一些实施例, 对于本领域普通技术人员来讲, 在 不付出创造性劳动性的前提下, 还可以根据这些附图获得其他的附图。  In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, a brief description of the drawings used in the embodiments or the prior art description will be briefly described below. Obviously, the drawings in the following description It is a certain embodiment of the present invention, and other drawings can be obtained from those skilled in the art without any inventive labor.
图 1为本发明实施例一所提供的一种分布式缓存控制方法的流程图; 图 2为图 1所示实施例提供的一种集群系统的结构示意图;  1 is a flowchart of a distributed cache control method according to Embodiment 1 of the present invention; FIG. 2 is a schematic structural diagram of a cluster system provided by the embodiment shown in FIG. 1;
图 3为本发明实施例二所提供的一种分布式缓存控制方法的流程图; 图 4为本发明实施例三所提供的一种分布式缓存控制方法的流程图; 图 5为本发明实施例四所提供的一种分布式缓存控制装置的结构示意 图;  FIG. 3 is a flowchart of a distributed cache control method according to Embodiment 2 of the present invention; FIG. 4 is a flowchart of a distributed cache control method according to Embodiment 3 of the present invention; A schematic diagram of a structure of a distributed cache control device provided in Example 4;
图 6为本发明实施例五所提供的一种分布式缓存控制装置的结构示意 图; 图 7为本发明实施例六所提供的一种集群控制服务器的结构示意图。 具体实施方式 FIG. 6 is a schematic structural diagram of a distributed cache control apparatus according to Embodiment 5 of the present invention; FIG. FIG. 7 is a schematic structural diagram of a cluster control server according to Embodiment 6 of the present invention. detailed description
为使本发明实施例的目的、 技术方案和优点更加清楚, 下面将结合本发 明实施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描述, 显然, 所描述的实施例是本发明一部分实施例, 而不是全部的实施例。 基于 本发明中的实施例, 本领域普通技术人员在没有做出创造性劳动前提下所获 得的所有其他实施例, 都属于本发明保护的范围。  The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is a partial embodiment of the invention, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
实施例一  Embodiment 1
图 1为本发明实施例一所提供的一种分布式缓存控制方法的流程图。 本 实施例的方法适用于在集群系统中控制缓存节点分配资源的情况。 该方法可 由分布式缓存控制装置或集群控制服务器执行, 该分布式缓存控制装置或集 群控制服务器通常以硬件和 /或软件的方式来实现, 可以集成在该服务器的存 储器中, 例如集成在处理器芯片中, 供处理器调用执行。 本实施例的方法包 括如下步骤:  FIG. 1 is a flowchart of a distributed cache control method according to Embodiment 1 of the present invention. The method of this embodiment is applicable to the case where the cache node is allocated resources in the cluster system. The method may be performed by a distributed cache control device or a cluster control server, which is usually implemented in hardware and/or software, and may be integrated in the memory of the server, for example integrated in the processor. In the chip, it is executed by the processor. The method of this embodiment includes the following steps:
S110, 收集集群系统中缓存节点的客户端统计信息。  S110. Collect client statistics of the cache node in the cluster system.
集群系统中包括多台互连的计算机, 通常可以组成是分布式系统, 由一 台集群控制服务器控制与其连接的多台客户机, 客户机在以下实施例中可以 称为缓存节点, 该集群系统中的数据处理通常采用分布式 cache集群技术, 本实施例以目前通常使用的 Memcached集群技术为例予以说明,如图 2所示, 为图 1所示实施例提供的一种集群系统的结构示意图, 集群控制服务器与 n 个缓存节点连接, 该缓存节点例如是 Memcached服务器 1到 Memcached服 务器 n, 每个缓存节点都是一台独立的客户机, 包括服务器和存储器, 并且 该 n个缓存节点都与应用服务器连接, 该应用服务器为各缓冲节点提供应用 程序。 本实施例及以下各实施例中的执行主体均为集群控制服务器, 该服务 器收集与其连接的各缓冲节点的客户端统计信息, 客户端统计信息可以为客 户端的用户行为感知, 通常基于对用户对 Qos的满意度调査, 具体地, 可以 在预置的一段时间窗口中收集该客户端统计信息, 为本实施例提供的控制方 法提供基础信息。  A cluster system includes a plurality of interconnected computers, which can usually be a distributed system. A cluster control server controls a plurality of clients connected thereto. The client may be referred to as a cache node in the following embodiments. The data processing in the data processing usually adopts the distributed cache clustering technology. This embodiment is described by taking the Memcached clustering technology that is currently used as an example. As shown in FIG. 2, the structure of the clustering system provided in the embodiment shown in FIG. The cluster control server is connected to n cache nodes, such as Memcached server 1 to Memcached server n, each cache node is a separate client, including a server and a memory, and the n cache nodes are An application server connection that provides an application for each buffer node. The execution entities in this embodiment and the following embodiments are all cluster control servers, and the server collects client statistics information of each buffer node connected thereto, and the client statistics information may be user behavior perception of the client, usually based on the pair of users. The Qos satisfaction survey, in particular, can collect the client statistical information in a preset time window, and provide basic information for the control method provided in this embodiment.
S120, 根据该客户端统计信息计算用户的平均期望值。 在本实施例中, 收集的客户端统计信息是与集群控制服务器连接的每个 缓存节点的信息, 每个缓存节点的硬件资源和系统配置可以是不同的, 也可 以是相同的, 因此, 用户对每个缓存的 Qos的满意度也可能是不同的; 在具 体实现中, 可以通过用户对各缓冲节点的期望值的计算用户的平均期望值, 以获取用户对该集群系统整体 Qos的综合评价, 例如根据收集的客户端统计 信息, 运用运筹学的最优化理论算法得到用户对该集群系统的平均期望值。 S120. Calculate an average expected value of the user according to the client statistical information. In this embodiment, the collected client statistics information is information of each cache node connected to the cluster control server, and the hardware resources and system configurations of each cache node may be different or the same, therefore, the user The satisfaction of each cached QoS may also be different. In a specific implementation, the user's average expected value of the user's expected value of each buffer node may be calculated to obtain a comprehensive evaluation of the overall QoS of the cluster system, for example, According to the collected client statistics, the average expected value of the cluster system is obtained by using the optimization theory algorithm of operations research.
S130, 根据用户的平均期望值和期望阈值确定对该集群系统的资源调整 方式。  S130. Determine a resource adjustment manner for the cluster system according to the average expected value of the user and the expected threshold.
目前, 对集群系统中资源分配和调整的常规方式包括: 减少存储数据时 延, 通过评估负载对 cache miss的影响来调整集群部署方式, 或者通过制定 预定义步长来改变 cache 的大小进行资源调整; 显然地, 现有技术通常采用 单一的分析判断规则进行资源调整的依据, 集群系统中数据缓存的误码率较 高, 并且都根据缓存节点本身的资源监控来进行资源的控制管理, 并不能体 现用户对各缓存节点的 Qos的满意程度。 在本实施例中, 根据用户对 Qos的 需求确定该集群系统的资源调整, 例如可以预设期望阈值, 并通过该期望阈 值与用户的平均期望值的比较决策资源调整的方案。  Currently, the conventional methods for resource allocation and adjustment in a cluster system include: reducing the storage data delay, adjusting the cluster deployment mode by evaluating the impact of the load on the cache miss, or changing the size of the cache by making a predefined step size for resource adjustment. Obviously, the prior art generally adopts a single analysis and judgment rule for resource adjustment. The error rate of the data cache in the cluster system is high, and the resource control is performed according to the resource monitoring of the cache node itself, and cannot be It reflects the user's satisfaction with the QoS of each cache node. In this embodiment, the resource adjustment of the cluster system is determined according to the user's demand for Qos. For example, a desired threshold may be preset, and a resource adjustment scheme may be decided by comparing the expected threshold with the average expected value of the user.
举例来说, 决策资源调整的具体方式可以为: 在用户的平均期望值大于 第一期望阈值时, 确定对该集群系统执行节点收缩操作; 或者, 在用户的平 均期望值小于第二期望阈值时, 确定对该集群系统执行节点扩展操作。 需要 说明的是, 第一期望阈值与第二期望阈值为期望阈值范围, 在计算出的平均 期望阈值超出该范围时, 就需要对集群系统的资源进行相应的调整策略; 一 方面, 平均期望值高于该范围时, 用户对该集群系统中缓存节点的 Qos的满 意程度较高, 即说明集群系统的当前资源配置消耗的成本较高, 因此, 可以 关闭该系统中部分缓存节点以降低系统资源的消耗, 另一方面, 平均期望值 低于该范围时, 用户对该集群系统中缓存节点的 Qos的满意程度较低, 即说 明集群系统的当前资源配置不能满足用户的需求, 因此, 可以增加系统中缓 存节点的数量以提高用户满意程度和系统使用效率。  For example, the specific manner of adjusting the resource adjustment may be: determining that the node shrinking operation is performed on the cluster system when the average expected value of the user is greater than the first expected threshold; or determining that the average expected value of the user is less than the second expected threshold. A node expansion operation is performed on the cluster system. It should be noted that the first expected threshold and the second expected threshold are the expected threshold ranges. When the calculated average expected threshold exceeds the range, the resource of the cluster system needs to be adjusted accordingly; on the one hand, the average expected value is high. In this range, the user is more satisfied with the QoS of the cache node in the cluster system, that is, the cost of the current resource configuration of the cluster system is higher. Therefore, some cache nodes in the system can be shut down to reduce system resources. Consumption, on the other hand, when the average expected value is lower than the range, the user is less satisfied with the QoS of the cache node in the cluster system, that is, the current resource configuration of the cluster system cannot meet the user's needs, and therefore, the system can be increased. The number of cache nodes to increase user satisfaction and system efficiency.
需要说明的是, 本实施例中用户的平均期望值在期望阈值的范围内时, 说明用户对 Qos的满意程度达到预期的要求, 不需要对集群系统的资源进行 调整, 可以重新开始执行 S110, 继续收集集群系统中缓存节点的客户端统计 信息, 本实施例提供的分布式缓存控制方法可以是循环执行的。 It should be noted that, in this embodiment, when the average expected value of the user is within the range of the expected threshold, the user's satisfaction with the QoS is expected to be expected, and the resources of the cluster system need not be adjusted, and the S110 may be restarted. Collect client statistics for cache nodes in the cluster system The distributed cache control method provided in this embodiment may be executed cyclically.
S140, 根据已确定的资源调整方式对该集群系统中的缓存节点执行节点 收缩操作或者节点扩展操作。  S140. Perform a node shrink operation or a node expansion operation on the cache node in the cluster system according to the determined resource adjustment manner.
在本实施例中, 上述已通过用户的平均期望值和期望阈值的对比, 对集 群系统的资源做出调整策略, 在具体实现中, 可以按照上述策略的指示通过 操作指令对该集群系统中的各缓存节点执行收缩或扩展操作, 该操作的执行 是与上述资源调整的策略相对应的, 例如改变集群系统中缓存节点数量。  In this embodiment, the foregoing adjustment policy is performed on the resources of the cluster system by comparing the average expected value of the user with the expected threshold. In a specific implementation, each of the cluster systems may be operated by an operation instruction according to the indication of the foregoing policy. The cache node performs a shrinking or expanding operation, and the execution of the operation corresponds to the resource adjustment policy described above, for example, changing the number of cache nodes in the cluster system.
本实施例所提供的分布式缓存控制方法, 通过收集集群系统中各缓存节 点的客户端统计信息, 以获取用户对该系统的平均期望值, 并根据该平均期 望值与期望阈值的对比确定该集群系统的资源调整方案, 以实现对系统中缓 存节点执行相应的节点收缩或节点扩展操作, 本实施例通过监测用户对集群 系统 Qos的满意程度, 对集群系统的资源执行相应的调整策略, 提高了客户 端的服务质量; 进一步地, 通过对用户的平均期望值的监测动态调整该集群 系统的资源利用, 在保证用户对集群系统 Qos在预期要求的情况下尽可能的 降低系统资源的消耗, 还相应地提高了系统资源的使用效率。  The distributed cache control method provided in this embodiment collects client statistics of each cache node in the cluster system to obtain an average expected value of the system, and determines the cluster system according to the comparison between the average expected value and the expected threshold. The resource adjustment scheme is implemented to perform corresponding node contraction or node expansion operation on the cache node in the system. In this embodiment, the user is satisfied with the QoS of the cluster system, and the corresponding adjustment strategy is implemented on the resources of the cluster system, thereby improving the client. Service quality of the terminal; further, dynamically adjust the resource utilization of the cluster system by monitoring the average expected value of the user, and reduce the consumption of system resources as much as possible while ensuring that the user's QoS of the cluster system is expected, and correspondingly improve The efficiency of the use of system resources.
实施例二  Embodiment 2
图 3为本发明实施例二所提供的一种分布式缓存控制方法的流程图。 如 图 3所示, 本实施例提供的方法包括如下歩骤:  FIG. 3 is a flowchart of a distributed cache control method according to Embodiment 2 of the present invention. As shown in FIG. 3, the method provided in this embodiment includes the following steps:
S210, 收集集群系统中缓存节点的客户端统计信息。  S210. Collect client statistics of the cache node in the cluster system.
具体地, S210的具体实现方式参照实施例一中的 S110。  Specifically, the specific implementation manner of S210 refers to S110 in Embodiment 1.
S220, 收集该集群系统中缓存节点的资源利用信息。  S220. Collect resource utilization information of the cache node in the cluster system.
在本实施例中,不仅可以收集集群系统中各缓存节点的客户端统计信息, 用于获取用户对 Qos的满意程度, 还可以收集各缓存节点的资源利用信息, 从集群系统中各缓存节点自身的资源利用上进行监控, 例如缓存节点的资源 利用信息可以包括中央处理器 (Central Processing Unit, 简称为: CPU) 、 内 存和网络输入 /输出 (Input/Output, 简称为: 10) 利用率, 本实施例从集群系 统的资源监控和用户感知两方面进行监测, 以提供一种高性能的分布式缓存 控制方案。  In this embodiment, not only the client statistics of each cache node in the cluster system may be collected, but also the user is satisfied with the QoS of the QoS node, and the resource utilization information of each cache node may be collected, and the cache nodes themselves from the cluster system. The resources utilization information is monitored. For example, the resource utilization information of the cache node may include a central processing unit (CPU), memory, and network input/output (Input/Output, referred to as: 10) utilization, The embodiment monitors resource monitoring and user perception of the cluster system to provide a high performance distributed cache control scheme.
需要说明的是, 本实施例中 S220与 S210没有明确的先后顺序, 本实施 例以 S220在 S210之后执行予以示出。 在具体实现中, 对缓存节点的客户端统计信息和资源利用信息的收集可 以通过代码指令的方式实现, 举例来说, 本实施例提供的收集资源信息的代 码具体为: It should be noted that, in this embodiment, there is no clear sequence of S220 and S210, and this embodiment is shown by S220 after S210. In a specific implementation, the collection of the client statistics and the resource utilization information of the cache node may be implemented by using a code instruction. For example, the code for collecting resource information provided by the embodiment is specifically:
struct memcached— stats {〃定义统计信息数据结构  Struct memcached— stats {〃Define statistics data structure
int requests;  Int requests;
// memcached 用户命令操作方式  // memcached user command mode of operation
int gets;  Int gets;
int multigets;  Int multigets;
int sets;  Int sets;
int adds;  Int adds;
int replaces;  Int replaces;
int deletes;  Int deletes;
int hits;  Int hits;
int misses;  Int misses;
struct stat response—time;  Struct stat response—time;
struct stat get— size;  Struct stat get- size;
struct timeval last— time;  Struct timeval last— time;
};  };
void printGlobalStats(struct config* config) {  Void printGlobalStats(struct config* config) {
pthread—mutex—lock(& stats—lock);  Pthread—mutex—lock(&stats—lock);
struct timeval currentTime;  Struct timeval currentTime;
gettimeofday(&currentTime, NULL);  Gettimeofday(&currentTime, NULL);
//定义 metric指标计算公式  / / Define the metric indicator calculation formula
double timeDiff = currentTime.tv— sec - global— stats.last_time.tv— sec + 1 e-6 * (currentTime .tv_sec - global_stats.last_time.tv_sec);  Double timeDiff = currentTime.tv— sec - global— stats.last_time.tv — sec + 1 e-6 * (currentTime .tv_sec - global_stats.last_time.tv_sec);
double rps = global— stats.requests/timeDiff;  Double rps = global— stats.requests/timeDiff;
double std = getStdDev(&global_stats.response_time);  Double std = getStdDev(&global_stats.response_time);
}  }
S230, 根据收集的缓存节点的资源利用信息和客户端统计信息获取用户 对各缓存节点的期望值与该缓存节点的资源利用信息的关系曲线。 在本实施例中, 缓存节点的资源利用信息例如可以包括该缓存节点的硬 件参数 (Hardware Parameter)、操作系统参数 ( Operating System Parameter ), 和各缓存节点在该集群系统中的配置参数 ( Memcached Configuration Parameter) , 具体地, 操作系统参数代表缓存节点的工作状态, 即为节点的 利用率, 用于计算该缓存节点的负载值, 可以通过上述 CPU、 内存和网络 IO 表示。 S230. Acquire, according to the collected resource utilization information of the cache node and the client statistical information, a relationship between a user expectation value of each cache node and resource utilization information of the cache node. In this embodiment, the resource utilization information of the cache node may include, for example, a hardware parameter (Hardware Parameter) of the cache node, an operating system parameter (Operating System Parameter), and configuration parameters of each cache node in the cluster system (Memcached Configuration). Parameter) , specifically, the operating system parameter represents the working state of the cache node, that is, the utilization of the node, and is used to calculate the load value of the cache node, which can be represented by the CPU, the memory, and the network IO.
举例来说, 定义 x„为缓存节点的硬件参数的特征值, 代表缓存节点当前 所在集群系统内分布式缓存节点的总数, 因此, X„的取值代表集群系统当前 是由多少个缓存节点构成的, 其资源划分是通过系统中配置文件实现的。  For example, the definition of x is the eigenvalue of the hardware parameter of the cache node, which represents the total number of distributed cache nodes in the cluster system where the cache node is currently located. Therefore, the value of X „ represents the number of cache nodes currently composed by the cluster system. The division of resources is achieved through configuration files in the system.
定义 1 为缓存节点的操作系统参数的特征值, 代表各缓存节点的工作状 态, 本实施例以包括 CPU、 内存, 网络 IO利用率为例予以说明, 因此, y„的 取值对应不同缓存节点的工作状态,其值是缓存节点的资源利用率,通过 可 以实现负载均衡的动态调节, 缓存节点的负载值可以表示为:  Definition 1 is the eigenvalue of the operating system parameter of the cache node, and represents the working state of each cache node. This embodiment is described by taking the CPU, memory, and network IO utilization as an example. Therefore, the value of y„ corresponds to different cache nodes. The working state, the value of which is the resource utilization of the cache node. Through the dynamic adjustment of load balancing, the load value of the cache node can be expressed as:
γ _ * CPUi + β * MEMi + χ * NETi (工) " _ 3 , γ _ * CPU i + β * MEM i + χ * NET i (工) " _ 3 ,
上述 (1 ) 中, CPUi , MEM, , ?Γ;分别表示第 i个缓存节点的 CPU、 内 存和网络 IO的利用率, 其中, 《、 和 ^为权值; 具体为第 i个缓存节点 的负载值。 In the above (1), CPUi, MEM, , Γ ; respectively represent the CPU, memory, and network IO utilization of the i-th cache node, where ", and ^ are weights; specifically, the i-th cache node Load value.
定义 Z„为缓存节点在该集群系统中配置参数的特征值, 代表缓存节点中 不同的 Memcached 的参数设置, 因此, z„的取值对应不同缓存节点的 Memcached的运行参数,其参数由 Memcached命令行或配置文件设定, 2„具 体可以表示为:  The definition Z is the characteristic value of the configuration parameter of the cache node in the cluster system, and represents the parameter setting of different Memcached in the cache node. Therefore, the value of z„ corresponds to the running parameter of Memcached of different cache nodes, and the parameter is configured by the Memcached command. Line or profile settings, 2 „ can be expressed as:
Zn e {Conf{ , Conf2 , ... , Conf{ , ... , Confn }, (2) 上述 (2 ) 中, 是第 i个缓存节点的 Memcached参数配置文件 ID,Z n e {Conf { , Conf 2 , ... , Conf { , ... , Conf n }, (2) In the above (2), is the Memcached parameter configuration file ID of the i-th cache node,
(2) 式表示该集群系统中各缓存节点的配置文件集合。 (2) represents the set of configuration files for each cache node in the cluster system.
需要说明的是, 在初次执行 Memcached集群应用程序时, 可以使用默认 的 Memcached的配置文件运行。  It should be noted that when the Memcached cluster application is first executed, it can be run using the default Memcached configuration file.
在具体实现中, 本实施例中获取的用户对各缓存节点的期望值根据缓存 节点的硬件参数、 缓存节点的负载值和缓存节点在该集群系统中的配置参数 的对应关系可以用函数形式表示为:  In a specific implementation, the expected value of the cache node obtained by the user in the embodiment may be expressed as a function according to a hardware parameter of the cache node, a load value of the cache node, and a configuration parameter of the cache node in the cluster system. :
En = f(Xn , Yn , Zn ) , (3 ) 上述(3 )表示的函数关系式, 可以通过长期监控历史经验数据的收集获 取, 例如可以采用函数逼近算法, 获得 £„随 „、 y n z„的变化曲线。 E n = f(X n , Y n , Z n ) , (3 ) The functional relationship represented by (3) above can be obtained by long-term monitoring of the collection of historical empirical data. For example, a function approximation algorithm can be used to obtain a variation curve of „„, ynz„.
S240, 根据用户对各缓存节点的期望值和期望阈值, 以及该关系曲线确 定对该集群系统中各缓存节点的资源调整方式。  S240. Determine a resource adjustment manner of each cache node in the cluster system according to a user expectation value and a desired threshold for each cache node, and the relationship curve.
在本实施例中, 对于每个缓存节点来说, 已获得用户对各缓存节点的期 望值随着对应的 X„、 !和 的变化曲线, 即已知 X„、 ! 或^的变化对£„的影 响, 因此, 可以根据该 „和期望阈值的对比, 确定出对该集群系统中各缓存 节点的资源调整策略, 使得调整后的 „在期望阈值的范围内。  In this embodiment, for each cache node, the expected value of the user for each cache node has been obtained along with the corresponding X„, ! and the change curve, that is, X„, ! The change of ^ or ^ has an effect on the „, so, according to the comparison with the expected threshold, the resource adjustment strategy of each cache node in the cluster system can be determined, so that the adjusted „ is within the range of the desired threshold.
具体地, 在 „大于第一期望阈值或小于第二期望阈值时, 确定通过改变 xn , 1和 z„中至少一项对该集群系统中各缓存节点进行资源调整, 使得调整后的 £„小于该第一期望阈值并大于该第二期望阈值。 需要说明的是, 本实施例提 供的分布式缓存控制方法, 分别对集群系统中各缓存节点进行资源调整策略 的制定, 使得用户对每个缓存节点 Qos的满意程度都可以达到预期值要求。 Specifically, when „ is greater than the first desired threshold or less than the second desired threshold, determining to adjust resources of each cache node in the cluster system by changing at least one of x n , 1 and z „, so that the adjusted It is smaller than the first desired threshold and greater than the second desired threshold. It should be noted that the distributed cache control method provided in this embodiment separately performs resource adjustment policies on each cache node in the cluster system, so that the user The satisfaction level of the cache node Qos can reach the expected value.
S250, 根据已确定的资源调整方式和缓存节点的资源利用信息对该集群 系统中各缓存节点分别进行资源调整。  S250. Perform resource adjustment on each cache node in the cluster system according to the determined resource adjustment manner and the resource utilization information of the cache node.
与上述实施例一不同的, 本实施例具体对集群系统中每个缓冲节点的资 源利用分别进行资源调整, 不同于上述实施例中对集群系统的整体资源进行 调整; 具体地, 对于用户对部分缓冲节点的期望值在期望阈值范围内的节点 来说, 不需要进行资源调整, 对于用户对部分缓冲节点的期望值超出期望阈 值范围的节点来说, 可以通过上述(3 ) 的对应关系分别对缓冲节点的资源进 行重新分配, 例如关闭或开启部分缓存节点的 CPU使用率, 调整内存中用于 缓冲功能的比例, 限制网络的使用带宽等, 因此, 本实施例提供的方法仅需 要对用户满意程度没有达到预期效果的缓存节点执行资源调整, 节省了集群 系统进行资源调整的成本, 降低了集群系统的误码率, 并且增加了资源调整 方案的灵活性。  Different from the above-mentioned first embodiment, the embodiment specifically adjusts the resource utilization of each buffer node in the cluster system, which is different from the overall resource of the cluster system in the above embodiment; specifically, for the user-to-partial part The node whose expected value of the buffer node is within the desired threshold range does not need to perform resource adjustment. For the node whose expected value of the partial buffer node exceeds the expected threshold range, the buffer node may be respectively corresponding to the corresponding relationship of (3) above. The resources are redistributed, for example, the CPU usage of the partial cache node is turned off or turned on, the proportion of the buffer function in the memory is adjusted, the bandwidth of the network is used, and the like. Therefore, the method provided in this embodiment only needs to be satisfactory to the user. The cache node that achieves the expected effect performs resource adjustment, which saves the cost of resource adjustment by the cluster system, reduces the bit error rate of the cluster system, and increases the flexibility of the resource adjustment scheme.
本实施例所提供的分布式缓存控制方法, 通过收集集群系统中各缓存节 点的客户端统计信息和资源利用信息, 并获取用户对各缓存节点的期望值与 对应的缓存节点的资源利用信息的关系, 根据用户对各缓存节点的期望值与 期望阈值的对比确定对该集群系统中缓存节点的资源调整方案, 以实现具体 对集群系统中用户满意程度未达到预期效果的缓存节点进行资源调整, 本实 施例结合用户对缓存节点 Qos的满意程度和对应节点的资源利用信息, 分别 对集群系统中缓存节点进行资源调整的方式,有利于降低集群系统的误码率; 进一歩地, 本实施例提供的分布式缓存控制方法, 仅需要对用户满意程度没 有达到预期效果的缓存节点执行资源调整, 节省了集群系统进行资源调整的 成本, 并且增加了资源调整方案的灵活性。 The distributed cache control method provided in this embodiment collects client statistics information and resource utilization information of each cache node in the cluster system, and acquires a relationship between the expected value of each cache node and the resource utilization information of the corresponding cache node. Determining, according to the comparison between the expected value of each cache node and the expected threshold, the resource adjustment scheme of the cache node in the cluster system, so as to implement resource adjustment for the cache node that does not achieve the desired effect in the cluster system. The embodiment combines the user satisfaction with the cache node Qos and the resource utilization information of the corresponding node, and adjusts the resource of the cache node in the cluster system, which is beneficial to reducing the error rate of the cluster system. Further, this embodiment provides The distributed cache control method only needs to perform resource adjustment on the cache node whose user satisfaction degree does not achieve the expected effect, which saves the cost of resource adjustment of the cluster system, and increases the flexibility of the resource adjustment scheme.
实施例三  Embodiment 3
图 4为本发明实施例三所提供的一种分布式缓存控制方法的流程图。 如 图 4所示, 本实施例提供的方法包括如下步骤:  FIG. 4 is a flowchart of a distributed cache control method according to Embodiment 3 of the present invention. As shown in FIG. 4, the method provided in this embodiment includes the following steps:
S310, 收集集群系统中缓存节点的客户端统计信息。  S310. Collect client statistics of the cache node in the cluster system.
S320, 根据该客户端统计信息计算用户的平均期望值。  S320. Calculate an average expected value of the user according to the client statistical information.
具体地, S310~S320的具体实现方式参照实施例一中的 S 1 10~S 120 本实施例中收集的客户端统计信息可以包括集群数据访存响应时间 ( Cluster Date Access Response Time ) 、 集群缓存命中率 ( Cache Hit Rate )和 集群数据吞吐量(Cluster Date Throughput Rate ); 则 S320具体包括: 根据该 集群数据访存响应时间、 该集群缓存命中率和该集群数据吞吐量, 计算出用 户对各缓存节点的期望值为: 上述 (4 ) 式中, Γ ϊρ 表示缓存节点 i的数据访存响应时间, Ri—一表 示缓存节点 i的缓存命中率, THL^表示缓存节点 i的数据吞吐量, Λ】、 ^和 表 示权值; 进而根据用户对各缓存节点的期望值计算该用户的平均期望值 ^:。 Specifically, the specific implementation manners of S310~S320 refer to S110~S120 in the first embodiment. The client statistics collected in this embodiment may include a cluster data access response time (Cluster Date Access Response Time), and a cluster cache. Cache Hit Rate and Cluster Date Throughput Rate; S320 specifically includes: calculating a user pair according to the cluster data access response time, the cluster cache hit ratio, and the cluster data throughput The expected value of the cache node is: (4) where Γ ϊρ represents the data access response time of the cache node i, Ri—one represents the cache hit ratio of the cache node i, and THL^ represents the data throughput of the cache node i, Λ 】, ^ and represent the weight; and then calculate the average expected value of the user ^: according to the user's expected value for each cache node.
S330, 收集该集群系统中缓存节点的资源利用信息, 该缓存节点的资源 利用信息同样可以包括该缓存节点的硬件参数、 操作系统参数, 和各缓存节 点在该集群系统中的配置参数,该操作系统参数用于计算缓存节点的负载值。  S330, collecting resource utilization information of the cache node in the cluster system, where the resource utilization information of the cache node may also include hardware parameters of the cache node, operating system parameters, and configuration parameters of each cache node in the cluster system, the operation System parameters are used to calculate the load value of the cache node.
具体地, S330的具体实现方式参照实施例一中的 S220  For details, refer to S220 in Embodiment 1 for the specific implementation manner of S330.
需要说明的是,本实施例中 S330与 S310~S320没有明确的现有顺序,本 实施例以 S330在 S310~S320之后执行予以示出。  It should be noted that, in this embodiment, there is no clear existing sequence of S330 and S310~S320. This embodiment is shown by S330 after S310~S320.
S340, 计算各缓存节点的负载值, 并根据各缓存节点的负载值计算该集 群系统的当前平均负载值。  S340. Calculate a load value of each cache node, and calculate a current average load value of the cluster system according to a load value of each cache node.
S350, 判断^:是否小于第一期望阈值并且大于第二期望阈值; 若否, 则 执行 S360; 若是, 则执行 S370 S360, 根据^和期望阈值确定对集群系统的资源调整方式。 S350, determining whether: is smaller than the first desired threshold and greater than the second desired threshold; if not, executing S360; if yes, executing S370 S360, determining a resource adjustment manner for the cluster system according to the sum threshold and the expected threshold.
具体地, S360的具体实现方式参照实施例一中的 S 130。  Specifically, the specific implementation manner of S360 refers to S130 in Embodiment 1.
S370, 根据集群系统的当前平均负载值和负载阈值确定对集群系统的资 源调整方式。  S370. Determine a resource adjustment manner for the cluster system according to a current average load value and a load threshold of the cluster system.
在本实施例中, 用户对 Qos的满意程度可以达到预期的要求, 并且可以 进一步根据集群系统的当前平均负载值与负载阈值的比较决策资源调整的方 式; 举例来说, 决策资源调整的具体方式可以为: 在该集群系统的当前平均 负载值大于第一负载阈值时, 确定对该集群系统执行该节点扩展操作; 或者, 在该集群系统的当前平均负载值小于第二负载阈值时, 确定对该集群系统执 行该节点收缩操作。 需要说明的是, 第一负载阈值与第二负载阈值为负载阈 值范围, 在计算出的集群系统的当前负载阈值超出该范围时, 就需要对集群 系统的资源进行相应的调整策略; 一方面, 当前平均负载值高于该范围时, 说明集群系统中各缓存节点的当前负载较高, 因此, 可以通过增加系统中缓 存节点的数量以降低系统负荷; 另一方面, 当前平均负载值低于该范围时, 说明该集群系统中各缓存节点的负载并未饱和, 因此, 可以通过关闭系统中 部分缓存节点以降低系统资源的消耗。  In this embodiment, the satisfaction degree of the user to the QoS can reach the expected requirement, and the method for adjusting the resource can be further determined according to the comparison between the current average load value of the cluster system and the load threshold; for example, the specific manner of adjusting the resource decision The method may be: when the current average load value of the cluster system is greater than the first load threshold, determine that the node expansion operation is performed on the cluster system; or, when the current average load value of the cluster system is less than the second load threshold, determine The cluster system performs the node shrink operation. It should be noted that, the first load threshold and the second load threshold are load threshold ranges. When the calculated current load threshold of the cluster system exceeds the range, the resource of the cluster system needs to be adjusted accordingly; When the current average load value is higher than the range, the current load of each cache node in the cluster system is higher. Therefore, the system load can be reduced by increasing the number of cache nodes in the system. On the other hand, the current average load value is lower than the current load value. In the scope, it indicates that the load of each cache node in the cluster system is not saturated. Therefore, the system resource consumption can be reduced by turning off some cache nodes in the system.
需要说明的是, 本实施例中集群系统的当前平均负载值在负载阈值的范 围内时, 说明在用户对 Qos的满意程度达到预期要求的前提下, 集群系统的 资源配置也符合负载均衡的原则, 不需要对集群系统的资源进行调整, 可以 重新开始执行 S310, 继续收集集群系统中缓存节点的客户端统计信息和资源 利用信息, 本实施例提供的分布式缓存控制方法可以是循环执行的。  It should be noted that, in the embodiment, the current average load value of the cluster system is within the range of the load threshold, indicating that the resource configuration of the cluster system conforms to the load balancing principle on the premise that the user's satisfaction with the QoS is expected. The configuration of the distributed cache control method provided in this embodiment may be performed cyclically. The configuration of the distributed cache control method provided in this embodiment may be performed cyclically.
S380, 根据已确定的资源调整方式对该集群系统中的缓存节点执行节点 收缩操作或者节点扩展操作。  S380. Perform a node shrink operation or a node expansion operation on the cache node in the cluster system according to the determined resource adjustment manner.
在本实施例的另一种实现方式中, 根据集群系统的当前平均负载值和负 载阈值, 对集群系统的资源调整方式的决策还可以为: 集群系统中满足 > ε的缓存节点组成迁出节点集合, 满足 ≥ ε的缓存节点组成迁入 节点集合, 其中, ^:表示该集群系统的当前平均负载值, f是通过长期历史监 测数据得出的预置的比值。 根据当前收集的资源利用信息, 若计算得出迁入节点集合远小于迁出节 点集合的数量, 则确定对该集群系统执行节点扩展操作, 将新的缓存节点加 入该迁入节点集合中, 即 X„的数量增加, 并在保障用户服务的条件下, 由应 用程序后台逐步的进行数据迁移; 若计算得出迁入节点集合远大于迁出节点 集合的数量, 则确定对该集群系统执行节点收缩操作, 在具体实现中, 可以 选取集群系统中负载值 较小的缓存节点执行合并操作, 即 X„的数量减少, 同样在保障用户服务的条件下, 由应用程序后台逐歩的进行数据迁移。 In another implementation manner of the embodiment, according to the current average load value and the load threshold of the cluster system, the decision of the resource adjustment mode of the cluster system may also be: Cache nodes satisfying > ε in the cluster system form an migrating node The set, the cache nodes satisfying ≥ ε constitute a set of move-in nodes, where ^: represents the current average load value of the cluster system, and f is a preset ratio obtained by long-term historical monitoring data. According to the currently collected resource utilization information, if it is calculated that the set of the moved node is much smaller than the number of the set of the migrated node, it is determined that the node expansion operation is performed on the cluster system, and the new cache node is added to the set of the moved node, that is, The number of X„ is increased, and under the condition of guaranteeing user service, data migration is gradually performed by the application background; if it is calculated that the set of the moved node is much larger than the number of the set of the moved node, it is determined that the node is executed for the cluster system. In the specific implementation, in the specific implementation, the cache node with smaller load value in the cluster system can be selected to perform the merge operation, that is, the number of X„ is reduced, and the data migration by the application background is also performed under the condition of ensuring user service. .
本实施例所提供的分布式缓存控制方法, 通过集群系统中各缓存节点的 客户端统计信息和资源利用信息的收集, 分别根据用户对该系统的平均期望 值和该系统的当前负载均值确定对该集群系统的资源调整方案, 以保证客户 端的服务质量, 更进一歩提高了系统资源的使用效率。  The distributed cache control method provided in this embodiment determines the client's statistical information and resource utilization information of each cache node in the cluster system according to the average expected value of the system and the current load average value of the system. The resource adjustment scheme of the cluster system ensures the quality of service of the client, and further improves the efficiency of using system resources.
需要说明的是, 若集群系统的当前资源受成本限制, 无法满足用户的平 均期望值在期望阈值的范围内进行资源调整, 可以通过改变该期望阈值的范 围以适应当前集群系统的硬件和软件配置, 通常可以改变集群数据访存响应 时间、 集群缓存命中率或集群数据吞吐量等指标的要求, 尤其是集群缓存命 中率, 直接限制 Memcached客户端的用户并发访问量, 即直接限制访问请求 连接数量, 本实施例提供的方法有利于维持集群系统的正常工作状态, 并且 找到解决资源枯竭的处理方式。  It should be noted that if the current resource of the cluster system is limited by the cost and the user's average expected value cannot be adjusted within the expected threshold, the range of the expected threshold may be changed to adapt to the hardware and software configuration of the current cluster system. Generally, the requirements of the cluster data access response time, the cluster cache hit ratio, or the cluster data throughput can be changed, especially the cluster cache hit ratio, which directly limits the concurrent access volume of the Memcached client, that is, directly limits the number of access request connections. The method provided by the embodiment is advantageous for maintaining the normal working state of the cluster system and finding a solution for solving the resource depletion.
实施例四  Embodiment 4
图 5为本发明实施例四所提供的一种分布式缓存控制装置的结构示意 图。 如图 5所示, 本实施例提供的分布式缓存控制装置, 具体包括: 收集模 块 11、 计算模块 12、 决策模块 13和执行模块 14。  FIG. 5 is a schematic structural diagram of a distributed cache control apparatus according to Embodiment 4 of the present invention. As shown in FIG. 5, the distributed cache control apparatus provided in this embodiment specifically includes: a collection module 11, a calculation module 12, a decision module 13 and an execution module 14.
其中, 收集模块 11, 用于收集集群系统中缓存节点的客户端统计信息。 计算模块 12, 用于根据收集模块 11收集的客户端统计信息计算用户的 平均期望值。  The collecting module 11 is configured to collect client statistics of the cache node in the cluster system. The calculating module 12 is configured to calculate an average expected value of the user according to the client statistics collected by the collecting module 11.
决策模块 13, 用于根据计算模块 12得到的用户的平均期望值, 以及期 望阈值确定对该集群系统的资源调整方式。  The decision module 13 is configured to determine a resource adjustment manner for the cluster system according to the average expected value of the user obtained by the calculation module 12 and the expected threshold.
执行模块 14, 用于根据决策模块 13确定的资源调整方式对该集群系统 中的缓存节点执行节点收缩操作或者节点扩展操作。  The executing module 14 is configured to perform a node contraction operation or a node expansion operation on the cache node in the cluster system according to the resource adjustment manner determined by the decision module 13.
在本实施例中, 该决策模块 13, 具体用于在用户的平均期望值大于第一 期望阈值时, 确定对该集群系统执行节点收缩操作; 或者, 在用户的平均期 望值小于第二期望阈值时, 确定对该集群系统执行节点扩展操作。 需要说明 的是, 第一期望阈值与第二期望阈值为期望阈值范围, 在计算出的平均期望 阈值超出该范围时, 就需要对集群系统的资源进行相应的调整策略; 一方面, 平均期望值高于该范围时, 用户对该集群系统中缓存节点的 Qos的满意程度 较高, 即说明集群系统的当前资源配置消耗的成本较高, 因此, 可以关闭该 系统中部分缓存节点以降低系统资源的消耗, 另一方面, 平均期望值低于该 范围时, 用户对该集群系统中缓存节点的 Qos的满意程度较低, 即说明集群 系统的当前资源配置不能满足用户的需求, 因此, 可以增加系统中缓存节点 的数量以提高用户满意程度和系统使用效率。 In this embodiment, the decision module 13 is specifically configured to: the average expected value of the user is greater than the first When the threshold is expected, it is determined that the node shrink operation is performed on the cluster system; or, when the average expected value of the user is less than the second desired threshold, it is determined that the node expansion operation is performed on the cluster system. It should be noted that the first expected threshold and the second expected threshold are the expected threshold ranges. When the calculated average expected threshold exceeds the range, the resource of the cluster system needs to be adjusted accordingly; on the one hand, the average expected value is high. In this range, the user is more satisfied with the QoS of the cache node in the cluster system, that is, the cost of the current resource configuration of the cluster system is higher. Therefore, some cache nodes in the system can be shut down to reduce system resources. Consumption, on the other hand, when the average expected value is lower than the range, the user is less satisfied with the QoS of the cache node in the cluster system, that is, the current resource configuration of the cluster system cannot meet the user's needs, and therefore, the system can be increased. The number of cache nodes to increase user satisfaction and system efficiency.
需要说明的是, 本实施例中用户的平均期望值在期望阈值的范围内时, 说明用户对 Qos的满意程度达到预期的要求, 不需要对集群系统的资源进行 调整,可以由收集模块 11继续执行收集集群系统中缓存节点的客户端统计信 息的操作, 本实施例提供的分布式缓存控制装置的执行过程可以是循环进行 的。  It should be noted that, in this embodiment, when the average expected value of the user is within the range of the expected threshold, the user's satisfaction with the QoS is expected to be expected, and the resources of the cluster system need not be adjusted, and the collection module 11 can continue to execute. The operation of collecting the client statistics information of the cache node in the cluster system may be performed cyclically by the distributed cache control device provided in this embodiment.
本发明实施例提供的分布式缓存控制装置用于执行本发明实施例一提 供的分布式缓存控制方法, 具备相应的功能模块, 其实现原理和技术效果 类似, 此处不再赘述。  The distributed cache control device provided by the embodiment of the present invention is configured to perform the distributed cache control method provided by the first embodiment of the present invention, and has a corresponding function module, and the implementation principle and the technical effect thereof are similar, and details are not described herein again.
实施例五  Embodiment 5
图 6 为本发明实施例五所提供的一种分布式缓存控制装置的结构示意 图。 如图 6所示, 本实施例提供的装置在上述图 5所示装置结构的基础上, 收集模块 11, 还用于在决策模块 13确定对该集群系统的资源调整方式之前, 收集该集群系统中缓存节点的资源利用信息; 需要说明的是, 本实施例中收 集模块 11对客户端统计信息和资源利用信息的收集没有明确的先后顺序。  FIG. 6 is a schematic structural diagram of a distributed cache control apparatus according to Embodiment 5 of the present invention. As shown in FIG. 6, the apparatus provided in this embodiment is based on the apparatus structure shown in FIG. 5, and the collection module 11 is further configured to collect the cluster system before the decision module 13 determines the resource adjustment mode of the cluster system. In the present embodiment, the collection module 11 does not have a clear sequence of collection of client statistical information and resource utilization information.
相应地, 决策模块 13, 包括: 获取单元 15, 用于根据收集模块 11收集 的该缓存节点的资源利用信息和客户端统计信息获取该用户对各缓存节点的 期望值与该缓存节点的资源利用信息的关系曲线; 确定单元 16, 用于根据用 户对各缓存节点的期望值和期望阈值, 以及获取单元 15获取的关系曲线确定 对该集群系统中各缓存节点的资源调整方式。  Correspondingly, the decision module 13 includes: an obtaining unit 15 configured to acquire, according to the resource utilization information of the cache node and the client statistical information collected by the collection module 11, the expected value of the cache node and the resource utilization information of the cache node. The determining unit 16 is configured to determine a resource adjustment manner of each cache node in the cluster system according to a desired value and a desired threshold of each cache node and a relationship curve acquired by the obtaining unit 15 .
在本实施例中,收集模块 11收集的缓存节点的资源利用信息可以包括该 缓存节点的硬件参数、 操作系统参数, 和该缓存节点在该集群系统中的配置 参数, 该操作系统参数用于计算该缓存节点的负载值。 在具体实现中, 获取 单元 15, 具体用于根据该缓存节点的硬件参数、 该缓存节点的负载值和该缓 存节点在该集群系统中的配置参数, 以及该客户端统计信息, 获取用户对各 缓存节点的期望值根据该缓存节点的硬件参数、 该缓存节点的负载值、 和该 缓存节点在该集群系统中的配置参数的关系曲线, 可以用函数形式表示为上 述(3 )式, 该式可以通过长期监控历史经验数据的收集获取, 例如可以采用 函数逼近算法, 获得 „随 、 „和∑„的变化曲线; 相应地, 确定单元 16, 具 体用于在 „大于第一期望阈值或小于第二期望阈值时, 确定通过改变 X„、 Yn 和^中至少一项对该集群系统中各缓存节点进行资源调整, 使得调整后的 小于第一期望阈值并大于第二期望阈值。 In this embodiment, the resource utilization information of the cache node collected by the collection module 11 may include the The hardware parameter of the cache node, the operating system parameter, and the configuration parameter of the cache node in the cluster system, and the operating system parameter is used to calculate the load value of the cache node. In a specific implementation, the obtaining unit 15 is configured to obtain, according to the hardware parameter of the cache node, the load value of the cache node, the configuration parameter of the cache node in the cluster system, and the statistics information of the client, The expected value of the cache node may be represented by the function form (3) according to the hardware parameter of the cache node, the load value of the cache node, and the configuration parameter of the cache node in the cluster system, and the formula may be Through the long-term monitoring of the collection of historical experience data, for example, a function approximation algorithm can be used to obtain a curve of „随, „ and ∑„; accordingly, the determining unit 16 is specifically used to be greater than the first desired threshold or less than the second when the desired threshold, it is determined ", Y n ^ and adjusting at least one of the resources of each cache node in the cluster system by changing the X, less than the first desired value such that the adjusted threshold and greater than a second desired threshold.
需要说明的是, 本实施例提供的分布式缓存控制装置, 分别对集群系统 中各缓存节点进行资源调整策略的制定, 使得用户对每个缓存节点 Qos的满 意程度都可以达到预期值要求。  It should be noted that the distributed cache control apparatus provided in this embodiment separately formulates resource adjustment policies for each cache node in the cluster system, so that the user's satisfaction level with each cache node Qos can reach the expected value requirement.
在本实施例中, 执行模块 14, 还用于根据确定单元 16确定的资源调整 方式和收集模块 11 收集的缓存节点的资源利用信息对该集群系统中各缓存 节点分别进行资源调整。  In this embodiment, the execution module 14 is further configured to perform resource adjustment on each cache node in the cluster system according to the resource adjustment manner determined by the determining unit 16 and the resource utilization information of the cache node collected by the collection module 11.
本发明实施例提供的分布式缓存控制装置用于执行本发明实施例二提 供的分布式缓存控制方法, 具备相应的功能模块, 其实现原理和技术效果 类似, 此处不再赘述。  The distributed cache control device provided by the embodiment of the present invention is configured to perform the distributed cache control method provided by the second embodiment of the present invention, and has a corresponding function module, and the implementation principle and the technical effect thereof are similar, and details are not described herein again.
在本实施例的另一种实现方式中,收集模块 11收集的客户端统计信息包 括集群数据访存响应时间、 集群缓存命中率和集群数据吞吐量; 相应地, 计 算模块 12, 具体用于根据集群数据访存响应时间、 集群缓存命中率和集群数 据吞吐量, 计算出用户对各缓存节点的期望值为上述(4 )式, 进而根据用户 对各缓存节点的期望值计算该用户的平均期望值^:。  In another implementation manner of the embodiment, the client statistics collected by the collection module 11 include a cluster data access response time, a cluster cache hit ratio, and a cluster data throughput. Accordingly, the calculation module 12 is specifically configured to The cluster data fetch response time, the cluster cache hit ratio, and the cluster data throughput, and the expected value of the user for each cache node is calculated as the above formula (4), and the average expected value of the user is calculated according to the expected value of the cache node by the user^: .
进一步地, 由于收集模块 11收集到缓存节点的资源利用信息, 并且其中 的操作系统参数可以用于计算得到该缓存节点的负载值, 即计算模块 12, 还 用于根据该缓存节点的负载值计算该集群系统的当前平均负载值; 相应地, 决策模块 13, 还用于在判断出^:小于第一期望阈值并且大于第二期望阈值 时, 根据集群系统的当前平均负载值和负载阈值确定对该集群系统的资源调 整方式; 另一方面, 在判断出^:大于第一期望阈值, 或者小于第二期望阈值 时, 则根据^:和期望阈值确定对集群系统的资源调整方式。 Further, the collection module 11 collects the resource utilization information of the cache node, and the operating system parameter therein can be used to calculate the load value of the cache node, that is, the calculation module 12, and is further configured to calculate the load value according to the cache node. The current average load value of the cluster system; correspondingly, the decision module 13 is further configured to determine, according to the current average load value and the load threshold of the cluster system, when determining that: less than the first expected threshold and greater than the second expected threshold Resource adjustment of the cluster system The whole mode; on the other hand, when it is determined that ^: is greater than the first desired threshold, or is less than the second desired threshold, the resource adjustment mode for the cluster system is determined according to the ^: and the expected threshold.
本实施例在具体实现中,决策模块 13根据集群系统的当前平均负载值和 负载阈值确定对该集群系统的资源调整方式, 具体包括: 在该集群系统的当 前平均负载值大于第一负载阈值时, 确定对该集群系统执行节点扩展操作; 或者, 在该集群系统的当前平均负载值小于第二负载阈值时, 确定对集群系 统执行该节点收缩操作。 第一负载阈值与第二负载阈值为负载阈值范围, 在 计算出的集群系统的当前负载阈值超出该范围时, 就需要对集群系统的资源 进行相应的调整策略; 一方面, 当前平均负载值高于该范围时, 说明集群系 统中各缓存节点的当前负载较高, 因此, 可以通过增加系统中缓存节点的数 量以降低系统负荷; 另一方面, 当前平均负载值低于该范围时, 说明该集群 系统中各缓存节点的负载并未饱和, 因此, 可以通过关闭系统中部分缓存节 点以降低系统资源的消耗。  In a specific implementation, the determining module 13 determines the resource adjustment mode of the cluster system according to the current average load value and the load threshold of the cluster system, and specifically includes: when the current average load value of the cluster system is greater than the first load threshold. And determining to perform a node expansion operation on the cluster system; or, when the current average load value of the cluster system is less than a second load threshold, determining to perform the node shrink operation on the cluster system. The first load threshold and the second load threshold are load threshold ranges. When the calculated current load threshold of the cluster system exceeds the range, the resource of the cluster system needs to be adjusted accordingly. On the one hand, the current average load value is high. In this range, the current load of each cache node in the cluster system is high. Therefore, the system load can be reduced by increasing the number of cache nodes in the system. On the other hand, when the current average load value is lower than the range, The load of each cache node in the cluster system is not saturated. Therefore, the system resource consumption can be reduced by turning off some cache nodes in the system.
需要说明的是, 本实施例中集群系统的当前平均负载值在负载阈值的范 围内时, 说明在用户对 Qos的满意程度达到预期要求的前提下, 集群系统的 资源配置也符合负载均衡的原则, 不需要对集群系统的资源进行调整, 可以 由收集模块 11 继续执行收集集群系统中缓存节点的客户端统计信息和资源 利用信息的操作, 本实施例提供的分布式缓存控制装置的执行过程可以是循 环进行的。  It should be noted that, in the embodiment, the current average load value of the cluster system is within the range of the load threshold, indicating that the resource configuration of the cluster system conforms to the load balancing principle on the premise that the user's satisfaction with the QoS is expected. The operation of the distributed cache control device provided in this embodiment may be performed by the collection module 11 to continue the operation of collecting the client statistics and the resource utilization information of the cache node in the cluster system. It is done in a loop.
本发明实施例提供的分布式缓存控制装置用于执行本发明实施例三提 供的分布式缓存控制方法, 具备相应的功能模块, 其实现原理和技术效果 类似, 此处不再赘述。  The distributed cache control device provided by the embodiment of the present invention is configured to perform the distributed cache control method provided by the third embodiment of the present invention, and has a corresponding function module, and the implementation principle and the technical effect thereof are similar, and details are not described herein again.
实施例六  Embodiment 6
图 7为本发明实施例六所提供的一种集群控制服务器的结构示意图。 如 图 7所示, 本实施例提供的集群控制服务器, 具体包括: 收集器 21、计算器 22和处理器 23。  FIG. 7 is a schematic structural diagram of a cluster control server according to Embodiment 6 of the present invention. As shown in FIG. 7, the cluster control server provided in this embodiment specifically includes: a collector 21, a calculator 22, and a processor 23.
其中, 收集器 21, 用于收集集群系统中缓存节点的客户端统计信息。 计算器 22, 用于根据收集器 21收集的客户端统计信息计算用户的平均 期望值。  The collector 21 is configured to collect client statistics of the cache node in the cluster system. The calculator 22 is configured to calculate the average expected value of the user based on the client statistics collected by the collector 21.
处理器 23, 用于根据计算器 22得到的用户的平均期望值, 以及期望阈 值确定对该集群系统的资源调整方式。 The processor 23 is configured to obtain an average expected value of the user according to the calculator 22, and a desired threshold The value determines how the resource is adjusted for the cluster system.
处理器 23, 还用于根据已确定的资源调整方式对该集群系统中的缓存节 点执行节点收缩操作或者节点扩展操作。  The processor 23 is further configured to perform a node shrink operation or a node expansion operation on the cache node in the cluster system according to the determined resource adjustment manner.
在本实施例中, 处理器 23确定对该集群系统的资源调整方式具体为: 在 用户的平均期望值大于第一期望阈值时, 确定对该集群系统执行节点收缩操 作; 或者, 在用户的平均期望值小于第二期望阈值时, 确定对该集群系统执 行节点扩展操作。 需要说明的是, 第一期望阈值与第二期望阈值为期望阈值 范围, 在计算出的平均期望阈值超出该范围时, 就需要对集群系统的资源进 行相应的调整策略; 一方面, 平均期望值高于该范围时, 用户对该集群系统 中缓存节点的 Qos的满意程度较高, 即说明集群系统的当前资源配置消耗的 成本较高, 因此, 可以关闭该系统中部分缓存节点以降低系统资源的消耗, 另一方面, 平均期望值低于该范围时, 用户对该集群系统中缓存节点的 Qos 的满意程度较低, 即说明集群系统的当前资源配置不能满足用户的需求, 因 此, 可以增加系统中缓存节点的数量以提高用户满意程度和系统使用效率。  In this embodiment, the processor 23 determines that the resource adjustment manner of the cluster system is specifically: when the average expected value of the user is greater than the first expected threshold, determining that the node shrink operation is performed on the cluster system; or, the average expected value of the user When less than the second desired threshold, it is determined that the node expansion operation is performed on the cluster system. It should be noted that the first expected threshold and the second expected threshold are the expected threshold ranges. When the calculated average expected threshold exceeds the range, the resource of the cluster system needs to be adjusted accordingly; on the one hand, the average expected value is high. In this range, the user is more satisfied with the QoS of the cache node in the cluster system, that is, the cost of the current resource configuration of the cluster system is higher. Therefore, some cache nodes in the system can be shut down to reduce system resources. Consumption, on the other hand, when the average expected value is lower than the range, the user is less satisfied with the QoS of the cache node in the cluster system, that is, the current resource configuration of the cluster system cannot meet the user's needs, and therefore, the system can be increased. The number of cache nodes to increase user satisfaction and system efficiency.
需要说明的是, 本实施例中用户的平均期望值在期望阈值的范围内时, 说明用户对 Qos的满意程度达到预期的要求, 不需要对集群系统的资源进行 调整,可以由收集器 21继续执行收集集群系统中缓存节点的客户端统计信息 的操作, 本实施例提供的集群控制服务器的执行过程可以是循环进行的。  It should be noted that, in this embodiment, when the average expected value of the user is within the range of the expected threshold, the user's satisfaction with the QoS is expected to meet the expected requirements, and the resources of the cluster system need not be adjusted, and the collector 21 can continue to execute. The operation of collecting the client statistics information of the cache node in the cluster system may be performed cyclically by the cluster control server provided in this embodiment.
本发明实施例提供的集群控制服务器用于执行本发明实施例一提供的 分布式缓存控制方法, 具备相应的实体装置, 其实现原理和技术效果类似, 此处不再赘述。  The cluster control server provided by the embodiment of the present invention is configured to perform the distributed cache control method provided by the first embodiment of the present invention, and has a corresponding physical device. The implementation principle and technical effects are similar, and details are not described herein again.
实施例七  Example 7
如图 7所示, 也为本发明实施例七所提供的一种集群控制服务器的结构 示意图。 在本实施例中, 收集器 21还用于在处理器 23确定对该集群系统的 资源调整方式之前, 收集该集群系统中缓存节点的资源利用信息; 需要说明 的是,本实施例中收集器 21对客户端统计信息和资源利用信息的收集没有明 确的先后顺序。  FIG. 7 is a schematic structural diagram of a cluster control server according to Embodiment 7 of the present invention. In this embodiment, the collector 21 is further configured to collect the resource utilization information of the cache node in the cluster system before the processor 23 determines the resource adjustment mode of the cluster system. 21 There is no clear sequence of collection of client-side statistics and resource utilization information.
相应地, 处理器 23确定对该集群系统的资源调整方式具体可以为: 根据 收集器 21 收集的该缓存节点的资源利用信息和客户端统计信息获取该用户 对各缓存节点的期望值与该缓存节点的资源利用信息的关系曲线; 并根据用 户对各缓存节点的期望值、 期望阈值和已获取的关系曲线确定对该集群系统 中各缓存节点的资源调整方式。 Correspondingly, the determining, by the processor 23, the resource adjustment manner of the cluster system may be: obtaining the expected value of the user for each cache node and the cache node according to the resource utilization information and the client statistics information of the cache node collected by the collector 21 Resource utilization information relationship curve; The expected value of each cache node, the expected threshold, and the acquired relationship curve determine the resource adjustment mode of each cache node in the cluster system.
在本实施例中,收集器 21收集的缓存节点的资源利用信息可以包括该缓 存节点的硬件参数、 操作系统参数, 和该缓存节点在该集群系统中的配置参 数, 该操作系统参数用于计算该缓存节点的负载值。 在具体实现中, 处理器 23获取用户对各缓存节点的期望值与该缓存节点的资源利用信息的关系曲线 的方式, 具体可以为: 根据该缓存节点的硬件参数、 该缓存节点的负载值和 该缓存节点在该集群系统中的配置参数, 以及该客户端统计信息, 获取用户 对各缓存节点的期望值根据该缓存节点的硬件参数、 该缓存节点的负载值、 和该缓存节点在该集群系统中的配置参数的关系曲线, 可以用函数形式表示 为上述(3 )式, 该式可以通过长期监控历史经验数据的收集获取, 例如可以 采用函数逼近算法, 获得 „随 „、 和∑„的变化曲线; 相应地, 处理器 23 确定对该集群系统中各缓存节点的资源调整方式, 具体可以为: 在 „大于第 一期望阈值或小于第二期望阈值时, 确定通过改变 X„、 y n z„中至少一项对 该集群系统中各缓存节点进行资源调整, 使得调整后的 小于第一期望阈值 并大于第二期望阈值。  In this embodiment, the resource utilization information of the cache node collected by the collector 21 may include hardware parameters of the cache node, operating system parameters, and configuration parameters of the cache node in the cluster system, where the operating system parameters are used for calculation. The load value of this cache node. In a specific implementation, the processor 23 obtains a relationship between the expected value of the cache node and the resource utilization information of the cache node, and may be: according to the hardware parameter of the cache node, the load value of the cache node, and the a configuration parameter of the cache node in the cluster system, and the client statistics, obtaining a user expected value for each cache node according to a hardware parameter of the cache node, a load value of the cache node, and the cache node in the cluster system The relationship between the configuration parameters can be expressed in the form of a function (3) above, which can be obtained by long-term monitoring of the collection of historical empirical data. For example, a function approximation algorithm can be used to obtain a curve of „, 、, and ∑„. Correspondingly, the processor 23 determines a resource adjustment manner of each cache node in the cluster system, which may be: when the value is greater than the first desired threshold or less than the second desired threshold, the determination is determined by changing at least X, ynz A resource adjustment for each cache node in the cluster system So that the adjusted is less than the first desired threshold and greater than the second desired threshold.
需要说明的是, 本实施例提供的集群控制服务器, 分别对集群系统中各 缓存节点进行资源调整策略的制定, 使得用户对每个缓存节点 Qos的满意程 度都可以达到预期值要求。  It should be noted that the cluster control server provided in this embodiment separately formulates resource adjustment policies for each cache node in the cluster system, so that the user can satisfy the expected value of each cache node Qos.
在本实施例中, 处理器 23, 还用于根据已确定的资源调整方式和收集器 In this embodiment, the processor 23 is further configured to adjust the manner and the collector according to the determined resource.
21收集的缓存节点的资源利用信息对该集群系统中各缓存节点分别进行资源 调整。 The resource utilization information of the collected cache nodes is separately adjusted for resources in each cache node in the cluster system.
本发明实施例提供的集群控制服务器用于执行本发明实施例二提供的 分布式缓存控制方法, 具备相应的实体装置, 其实现原理和技术效果类似, 此处不再赘述。  The cluster control server provided by the embodiment of the present invention is configured to perform the distributed cache control method provided by the second embodiment of the present invention, and has a corresponding physical device, and the implementation principle and technical effects thereof are similar, and details are not described herein again.
在本实施例的另一种实现方式中,收集器 21收集的客户端统计信息包括 集群数据访存响应时间、 集群缓存命中率和集群数据吞吐量; 相应地, 计算 器 22, 具体用于根据集群数据访存响应时间、 集群缓存命中率和集群数据吞 吐量, 计算出用户对各缓存节点的期望值为上述(4)式, 进而根据用户对各 缓存节点的期望值计算该用户的平均期望值^:。 进一步地, 由于收集器 21收集到缓存节点的资源利用信息, 并且其中的 操作系统参数可以用于计算得到该缓存节点的负载值, 即计算器 22, 还用于 根据该缓存节点的负载值计算该集群系统的当前平均负载值; 相应地, 处理 器 23, 还用于在判断出^:小于第一期望阈值并且大于第二期望阈值时,根据 集群系统的当前平均负载值和负载阈值确定对该集群系统的资源调整方式; 另一方面, 在判断出^大于第一期望阈值, 或者小于第二期望阈值时, 则根 据^:和期望阈值确定对集群系统的资源调整方式。 In another implementation manner of the embodiment, the client statistics collected by the collector 21 include a cluster data access response time, a cluster cache hit ratio, and a cluster data throughput. Accordingly, the calculator 22 is specifically configured to The cluster data fetch response time, the cluster cache hit ratio, and the cluster data throughput, and the expected value of the user for each cache node is calculated as the above formula (4), and the average expected value of the user is calculated according to the expected value of the cache node by the user ^: . Further, the collector 21 collects the resource utilization information of the cache node, and the operating system parameter therein can be used to calculate the load value of the cache node, that is, the calculator 22, and is further configured to calculate the load value according to the cache node. The current average load value of the cluster system; correspondingly, the processor 23 is further configured to determine, according to the current average load value and the load threshold of the cluster system, when determining that: less than the first expected threshold and greater than the second expected threshold The resource adjustment mode of the cluster system; on the other hand, when it is determined that ^ is greater than the first desired threshold or less than the second desired threshold, the resource adjustment mode for the cluster system is determined according to the ^: and the expected threshold.
本实施例在具体实现中,处理器 23根据集群系统的当前平均负载值和负 载阈值确定对该集群系统的资源调整方式, 具体包括: 在该集群系统的当前 平均负载值大于第一负载阈值时, 确定对该集群系统执行节点扩展操作; 或 者, 在该集群系统的当前平均负载值小于第二负载阈值时, 确定对集群系统 执行该节点收缩操作。 第一负载阈值与第二负载阈值为负载阈值范围, 在计 算出的集群系统的当前负载阈值超出该范围时, 就需要对集群系统的资源进 行相应的调整策略; 一方面, 当前平均负载值高于该范围时, 说明集群系统 中各缓存节点的当前负载较高, 因此, 可以通过增加系统中缓存节点的数量 以降低系统负荷; 另一方面, 当前平均负载值低于该范围时, 说明该集群系 统中各缓存节点的负载并未饱和, 因此, 可以通过关闭系统中部分缓存节点 以降低系统资源的消耗。  In a specific implementation, the processor 23 determines the resource adjustment mode of the cluster system according to the current average load value and the load threshold of the cluster system, and specifically includes: when the current average load value of the cluster system is greater than the first load threshold. And determining to perform a node expansion operation on the cluster system; or, when the current average load value of the cluster system is less than a second load threshold, determining to perform the node shrink operation on the cluster system. The first load threshold and the second load threshold are load threshold ranges. When the calculated current load threshold of the cluster system exceeds the range, the resource of the cluster system needs to be adjusted accordingly. On the one hand, the current average load value is high. In this range, the current load of each cache node in the cluster system is high. Therefore, the system load can be reduced by increasing the number of cache nodes in the system. On the other hand, when the current average load value is lower than the range, The load of each cache node in the cluster system is not saturated. Therefore, the system resource consumption can be reduced by turning off some cache nodes in the system.
需要说明的是, 本实施例中集群系统的当前平均负载值在负载阈值的范 围内时, 说明在用户对 Qos的满意程度达到预期要求的前提下, 集群系统的 资源配置也符合负载均衡的原则, 不需要对集群系统的资源进行调整, 可以 由收集器 21 继续执行收集集群系统中缓存节点的客户端统计信息和资源利 用信息的操作, 本实施例提供的集群控制服务器的执行过程可以是循环进行 的。  It should be noted that, in the embodiment, the current average load value of the cluster system is within the range of the load threshold, indicating that the resource configuration of the cluster system conforms to the load balancing principle on the premise that the user's satisfaction with the QoS is expected. The operation of collecting the cluster statistics of the cache node in the cluster system may be performed by the collector 21, and the execution process of the cluster control server provided in this embodiment may be a loop. ongoing.
本发明实施例提供的集群控制服务器用于执行本发明实施例三提供的 分布式缓存控制方法, 具备相应的实体装置, 其实现原理和技术效果类似, 此处不再赘述。  The cluster control server provided by the embodiment of the present invention is configured to perform the distributed cache control method provided by the third embodiment of the present invention, and has a corresponding physical device. The implementation principle and technical effects are similar, and details are not described herein again.
本领域普通技术人员可以理解: 实现上述各方法实施例的全部或部分歩 骤可以通过程序指令相关的硬件来完成。 前述的程序可以存储于一计算机可 读取存储介质中。 该程序在执行时, 执行包括上述各方法实施例的步骤; 而 前述的存储介质包括: ROM、 RAM, 磁碟或者光盘等各种可以存储程序代码 的介质。 It will be understood by those skilled in the art that all or part of the steps of implementing the above method embodiments may be performed by hardware related to the program instructions. The aforementioned program can be stored in a computer readable storage medium. The program, when executed, performs the steps including the various method embodiments described above; The foregoing storage medium includes various media that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.
最后应说明的是: 以上各实施例仅用以说明本发明的技术方案, 而非对 其限制; 尽管参照前述各实施例对本发明进行了详细的说明, 本领域的普通 技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改, 或者对其中部分或者全部技术特征进行等同替换; 而这些修改或者替换, 并 不使相应技术方案的本质脱离本发明各实施例技术方案的范围。  Finally, it should be noted that the above embodiments are only for explaining the technical solutions of the present invention, and are not intended to be limiting thereof; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that The technical solutions described in the foregoing embodiments may be modified, or some or all of the technical features may be equivalently replaced; and the modifications or substitutions do not deviate from the technical solutions of the embodiments of the present invention. range.

Claims

权利 要求书 Claim
1、 一种分布式缓存控制方法, 其特征在于, 包括: A distributed cache control method, comprising:
收集集群系统中缓存节点的客户端统计信息;  Collect client statistics of cache nodes in the cluster system;
根据所述客户端统计信息计算用户的平均期望值;  Calculating an average expected value of the user according to the client statistical information;
根据所述用户的平均期望值和期望阈值确定对所述集群系统的资源调整 方式;  Determining a resource adjustment manner for the cluster system according to an average expected value of the user and a desired threshold;
根据所述已确定的资源调整方式对所述集群系统中的缓存节点执行节点 收缩操作或者节点扩展操作。  Performing a node shrink operation or a node expansion operation on the cache node in the cluster system according to the determined resource adjustment manner.
2、根据权利要求 1所述的方法, 其特征在于, 所述根据所述用户期望值 和期望阈值确定对所述集群系统的资源调整方式, 包括:  The method according to claim 1, wherein the determining a resource adjustment manner for the cluster system according to the user expected value and a desired threshold includes:
在所述用户的平均期望值大于第一期望阈值时, 确定对所述集群系统执 行所述节点收缩操作; 或者,  Determining, when the average expected value of the user is greater than a first desired threshold, performing the node shrinking operation on the cluster system; or
在所述用户的平均期望值小于第二期望阈值时, 确定对所述集群系统执 行所述节点扩展操作。  When the average expected value of the user is less than a second desired threshold, it is determined that the node expansion operation is performed on the cluster system.
3、根据权利要求 1或 2所述的方法, 其特征在于, 所述客户端统计信息 包括所述集群数据访存响应时间、 集群缓存命中率和集群数据吞吐量;  The method according to claim 1 or 2, wherein the client statistical information includes the cluster data access response response time, a cluster cache hit ratio, and a cluster data throughput;
则所述根据所述客户端统计信息计算用户的平均期望值, 包括: 根据所述集群数据访存响应时间、 所述集群缓存命中率和所述集群数据 吞吐量, 计算出所述用户对各缓存节点的期望值为: 其中, 所述 表示缓存节点 i的数据访存响应时间, 所述 _^ 表 示所述缓存节点 i的缓存命中率,所述 7 /,._^表示所述缓存节点 i的数据吞吐 量, 所述 l ^和 Λ表示权值;  And the calculating the average expected value of the user according to the client statistics, including: calculating, according to the cluster data access response time, the cluster cache hit ratio, and the cluster data throughput, the user to each cache The expected value of the node is: wherein, the data fetch response time indicating the cache node i, the _^ represents the cache hit ratio of the cache node i, and the 7/, ._^ represents the cache node i Data throughput, the l ^ and Λ represent weights;
根据所述用户对各缓存节点的期望值计算所述用户的平均期望值 ^:。  Calculating the average expected value of the user ^: according to the expected value of the cache node by the user.
4、根据权利要求 3所述的方法, 其特征在于, 所述根据所述用户的平均 期望值和期望阈值确定对所述集群系统的资源调整方式之前, 还包括: The method according to claim 3, wherein, before determining the resource adjustment manner for the cluster system according to the average expected value and the expected threshold of the user, the method further includes:
收集所述集群系统中缓存节点的资源利用信息;  Collecting resource utilization information of the cache node in the cluster system;
则所述根据所述用户的平均期望值和期望阈值确定对所述集群系统的资 源调整方式, 包括:  And determining the resource adjustment manner for the cluster system according to the average expected value and the expected threshold of the user, including:
根据收集的所述缓存节点的资源利用信息和所述客户端统计信息获取所 述用户对各缓存节点的期望值与所述缓存节点的资源利用信息的关系曲线; 根据所述用户对各缓存节点的期望值和所述期望阈值, 以及所述关系曲 线确定对所述集群系统中各缓存节点的资源调整方式; Obtaining, according to the collected resource utilization information of the cache node and the client statistical information Determining, by the user, a relationship between the expected value of each cache node and the resource utilization information of the cache node; determining, according to the expected value of each cache node and the expected threshold, and the relationship curve, for each of the cluster systems The resource adjustment mode of the cache node;
则所述根据所述已确定的资源调整方式对所述集群系统中的缓存节点执 行节点收缩操作或者节点扩展操作, 包括:  And performing the node shrinking operation or the node expanding operation on the cache node in the cluster system according to the determined resource adjustment manner, including:
根据所述已确定的资源调整方式和所述缓存节点的资源利用信息对所述 集群系统中各缓存节点分别进行资源调整。  And performing resource adjustment on each cache node in the cluster system according to the determined resource adjustment manner and the resource utilization information of the cache node.
5、 根据权利要求 4所述的方法, 其特征在于, 所述缓存节点的资源利用 信息包括所述缓存节点的硬件参数、 操作系统参数, 和所述缓存节点在所述 集群系统中的配置参数,所述操作系统参数用于计算所述缓存节点的负载值; 则所述根据收集的所述缓存节点的资源利用信息和所述客户端统计信息 获取所述用户对各缓存节点的期望值与所述缓存节点的资源利用信息的关系 曲线, 包括:  The method according to claim 4, wherein the resource utilization information of the cache node includes hardware parameters of the cache node, operating system parameters, and configuration parameters of the cache node in the cluster system. The operating system parameter is used to calculate a load value of the cache node; and the obtaining, according to the collected resource utilization information of the cache node and the client statistical information, the expected value and location of each cache node by the user. The relationship curve of the resource utilization information of the cache node includes:
根据所述缓存节点的硬件参数、 所述缓存节点的负载值和所述缓存节点 在所述集群系统中的配置参数, 以及所述客户端统计信息, 获取所述用户对 各缓存节点的期望值根据所述缓存节点的硬件参数、所述缓存节点的负载值、 和所述缓存节点在所述集群系统中的配置参数的关系曲线为:  Obtaining, according to the hardware parameter of the cache node, the load value of the cache node, the configuration parameter of the cache node in the cluster system, and the client statistics, the expected value of the user to each cache node according to the The relationship between the hardware parameters of the cache node, the load value of the cache node, and the configuration parameters of the cache node in the cluster system is:
En ^ f(Xn ,Yn , Z ; E n ^ f(X n , Y n , Z ;
其中, 所述 X„表示所述缓存节点的硬件参数, 所述 表示所述缓存节点 的负载值, 所述 ^表示所述缓存节点在所述集群系统中的配置参数;  The X indicates the hardware parameter of the cache node, the load value of the cache node, and the parameter indicates the configuration parameter of the cache node in the cluster system;
则所述根据所述用户对各缓存节点的期望值和所述期望阈值、 以及所述 关系曲线确定对所述集群系统中各缓存节点的资源调整方式, 包括:  And determining a resource adjustment manner for each cache node in the cluster system according to the expected value of the cache node and the expected threshold, and the relationship curve, including:
在所述 „大于所述第一期望阈值或小于所述第二期望阈值时, 确定通过 改变所述 X„、 所述 1和所述 Z„中至少一项对所述集群系统中各缓存节点进行 资源调整, 使得所述调整后的 „小于所述第一期望阈值并大于所述第二期望 阈值。  Determining, by changing at least one of the X, the 1 and the Z, to each cache node in the cluster system when the „ is greater than the first desired threshold or less than the second desired threshold Resource adjustment is performed such that the adjusted „ is less than the first desired threshold and greater than the second desired threshold.
6、 根据权利要求 5所述的方法, 其特征在于, 还包括: 根据所述缓存节 点的负载值计算所述集群系统的当前平均负载值;  The method according to claim 5, further comprising: calculating a current average load value of the cluster system according to a load value of the cache node;
确定所述^:小于所述第一期望阈值并且大于所述第二期望阈值时, 根据 所述集群系统的当前平均负载值和负载阈值确定对所述集群系统的资源调整 方式。 Determining that the ^: is smaller than the first expected threshold and greater than the second expected threshold, determining resource adjustment to the cluster system according to a current average load value and a load threshold of the cluster system the way.
7、根据权利要求 6所述的方法, 其特征在于, 所述根据所述集群系统的 当前平均负载值和负载阈值确定对所述集群系统的资源调整方式, 包括: 在所述集群系统的当前平均负载值大于第一负载阈值时, 确定对所述集 群系统执行所述节点扩展操作; 或者,  The method according to claim 6, wherein the determining a resource adjustment manner for the cluster system according to a current average load value and a load threshold of the cluster system, including: When the average load value is greater than the first load threshold, determining to perform the node expansion operation on the cluster system; or
在所述集群系统的当前平均负载值小于第二负载阈值时, 确定对所述集 群系统执行所述节点收缩操作。  When the current average load value of the cluster system is less than the second load threshold, it is determined that the node shrink operation is performed on the cluster system.
8、 一种分布式缓存控制装置, 其特征在于, 包括:  8. A distributed cache control device, comprising:
收集模块, 用于收集集群系统中缓存节点的客户端统计信息; 计算模块, 用于根据所述收集模块收集的客户端统计信息计算用户的平 均期望值;  a collection module, configured to collect client statistics of a cache node in the cluster system; and a calculation module, configured to calculate an average expected value of the user according to the client statistics collected by the collection module;
决策模块, 用于根据所述计算模块得到的用户的平均期望值, 与期望阈 值确定对所述集群系统的资源调整方式;  a decision module, configured to determine, according to an average expected value of the user obtained by the computing module, a resource adjustment manner to the cluster system according to a desired threshold;
执行模块, 用于根据所述决策模块确定的资源调整方式对所述集群系统 中的缓存节点执行节点收缩操作或者节点扩展操作。  And an execution module, configured to perform a node shrink operation or a node expansion operation on the cache node in the cluster system according to the resource adjustment manner determined by the decision module.
9、 根据权利要求 8所述的装置, 其特征在于, 所述决策模块, 具体用于 在所述用户的平均期望值大于第一期望阈值时, 确定对所述集群系统执行所 述节点收缩操作; 或者, 在所述用户的平均期望值小于第二期望阈值时, 确 定对所述集群系统执行所述节点扩展操作。  The device according to claim 8, wherein the determining module is configured to: when the average expected value of the user is greater than a first expected threshold, determine to perform the node shrinking operation on the cluster system; Alternatively, when the average expected value of the user is less than a second expected threshold, determining to perform the node expansion operation on the cluster system.
10、 根据权利要求 8或 9所述的装置, 其特征在于, 所述客户端统计信 息包括所述集群数据访存响应时间、 集群缓存命中率和集群数据吞吐量; 则所述计算模块, 具体用于根据所述集群数据访存响应时间、 所述集群 缓存命中率和所述集群数据吞吐量, 计算出所述用户对各缓存节点的期望值 为:  The device according to claim 8 or 9, wherein the client statistical information includes the cluster data memory response response time, a cluster cache hit ratio, and a cluster data throughput; And calculating, according to the cluster data memory response response time, the cluster cache hit ratio, and the cluster data throughput, an expected value of the user for each cache node:
En
Figure imgf000026_0001
_ cachehit i _data;
E n
Figure imgf000026_0001
_ cachehit i _data;
其中, 所述 表示缓存节点 i的数据访存响应时间, 所述 _^^表 示所述缓存节点 i的缓存命中率,所述 TH,. _ 表示所述缓存节点 i的数据吞吐 量, 所述 、 和 ^表示权值; 进而根据所述用户对各缓存节点的期望值计 算所述用户的平均期望值^:。  The data storage response time indicating the cache node i, the _^^ indicates the cache hit ratio of the cache node i, and the TH, . _ indicates the data throughput of the cache node i, And ^ represent weights; and then calculate an average expected value of the user ^: according to the expected value of the user for each cache node.
11、 根据权利要求 10所述的装置, 其特征在于, 所述收集模块, 还用于 在所述决策模块确定对所述集群系统的资源调整方式之前, 收集所述集群系 统中缓存节点的资源利用信息; The device according to claim 10, wherein the collecting module is further used for Collecting resource utilization information of the cache node in the cluster system before the determining module determines a resource adjustment manner of the cluster system;
则所述决策模块, 包括: 获取单元, 用于根据所述收集模块收集的所述 缓存节点的资源利用信息和所述客户端统计信息获取所述用户对各缓存节点 的期望值与所述缓存节点的资源利用信息的关系曲线;  The determining module, comprising: an obtaining unit, configured to acquire, according to resource utilization information of the cache node and the client statistical information collected by the collecting module, an expected value of the user for each cache node and the cache node Relationship curve of resource utilization information;
确定单元, 用于根据所述用户对各缓存节点的期望值和所述期望阈值, 以及所述获取单元获取的关系曲线确定对所述集群系统中各缓存节点的资源 调整方式;  a determining unit, configured to determine, according to the expected value of each cache node and the expected threshold, and a relationship curve acquired by the acquiring unit, a resource adjustment manner for each cache node in the cluster system;
则所述执行模块, 具体用于根据所述确定单元确定的资源调整方式和所 述收集模块收集的缓存节点的资源利用信息对所述集群系统中各缓存节点分 别进行资源调整。  The execution module is specifically configured to perform resource adjustment on each cache node in the cluster system according to the resource adjustment manner determined by the determining unit and the resource utilization information of the cache node collected by the collection module.
12、 根据权利要求 11所述的装置, 其特征在于, 所述缓存节点的资源利 用信息包括所述缓存节点的硬件参数、 操作系统参数, 和所述缓存节点在所 述集群系统中的配置参数, 所述操作系统参数用于计算所述缓存节点的负载 值;  The device according to claim 11, wherein the resource utilization information of the cache node includes hardware parameters of the cache node, operating system parameters, and configuration parameters of the cache node in the cluster system. The operating system parameter is used to calculate a load value of the cache node;
则所述获取单元, 具体用于根据所述缓存节点的硬件参数、 所述缓存节 点的负载值和所述缓存节点在所述集群系统中的配置参数, 以及所述客户端 统计信息, 获取所述用户对各缓存节点的期望值根据所述缓存节点的硬件参 数、 所述缓存节点的负载值、 和所述缓存节点在所述集群系统中的配置参数 的关系曲线为:  The obtaining unit is specifically configured to acquire, according to hardware parameters of the cache node, a load value of the cache node, configuration parameters of the cache node in the cluster system, and statistics of the client. The relationship between the expected value of the user for each cache node according to the hardware parameters of the cache node, the load value of the cache node, and the configuration parameter of the cache node in the cluster system is:
En = f(Xn n , Zn) ; E n = f(X nn , Z n ) ;
其中, 所述 X„表示所述缓存节点的硬件参数, 所述 表示所述缓存节点 的负载值, 所述 ^表示所述缓存节点在所述集群系统中的配置参数;  The X indicates the hardware parameter of the cache node, the load value of the cache node, and the parameter indicates the configuration parameter of the cache node in the cluster system;
则所述确定单元, 具体用于在所述 „大于所述第一期望阈值或小于所述 第二期望阈值时, 确定通过改变所述 X„、 所述 1和所述 Z„中至少一项对所述 集群系统中各缓存节点进行资源调整, 使得所述调整后的 £„小于所述第一期 望阈值并大于所述第二期望阈值。  The determining unit is specifically configured to determine, by changing at least one of the X, the 1 and the Z, when the „ is greater than the first desired threshold or less than the second desired threshold Performing resource adjustment on each cache node in the cluster system such that the adjusted value is less than the first desired threshold and greater than the second desired threshold.
13、 根据权利要求 12所述的装置, 其特征在于, 所述计算模块, 还用于 根据所述缓存节点的负载值计算所述集群系统的当前平均负载值;  The device according to claim 12, wherein the calculating module is further configured to calculate a current average load value of the cluster system according to a load value of the cache node;
则所述决策模块, 还用于在判断得出所述^:小于所述第一期望阈值并且 大于所述第二期望阈值时, 根据所述集群系统的当前平均负载值和负载阈值 确定对所述集群系统的资源调整方式。 The decision module is further configured to determine that the ^ is less than the first desired threshold and When the second expected threshold is greater than the current average load value and the load threshold of the cluster system, a resource adjustment manner for the cluster system is determined.
14、 根据权利要求 13所述的装置, 其特征在于, 所述决策模块根据所述 集群系统的当前平均负载值和负载阈值确定对所述集群系统的资源调整方 式, 具体包括: 在所述集群系统的当前平均负载值大于第一负载阈值时, 确 定对所述集群系统执行所述节点扩展操作; 或者, 在所述集群系统的当前平 均负载值小于第二负载阈值时,确定对所述集群系统执行所述节点收缩操作。  The apparatus according to claim 13, wherein the determining module determines a resource adjustment manner for the cluster system according to a current average load value and a load threshold of the cluster system, specifically: When the current average load value of the system is greater than the first load threshold, determining to perform the node expansion operation on the cluster system; or determining, when the current average load value of the cluster system is less than the second load threshold, determining the cluster The system performs the node contraction operation.
PCT/CN2014/080630 2014-06-24 2014-06-24 Distributed cache control method and apparatus WO2015196369A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201480037256.8A CN105393518B (en) 2014-06-24 2014-06-24 Distributed cache control method and device
PCT/CN2014/080630 WO2015196369A1 (en) 2014-06-24 2014-06-24 Distributed cache control method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2014/080630 WO2015196369A1 (en) 2014-06-24 2014-06-24 Distributed cache control method and apparatus

Publications (1)

Publication Number Publication Date
WO2015196369A1 true WO2015196369A1 (en) 2015-12-30

Family

ID=54936443

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/080630 WO2015196369A1 (en) 2014-06-24 2014-06-24 Distributed cache control method and apparatus

Country Status (2)

Country Link
CN (1) CN105393518B (en)
WO (1) WO2015196369A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108874640A (en) * 2018-05-07 2018-11-23 北京京东尚科信息技术有限公司 A kind of appraisal procedure and device of clustering performance
CN113141264A (en) * 2020-01-16 2021-07-20 北京京东振世信息技术有限公司 High-concurrency access processing method and device and storage medium

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109413147B (en) * 2018-09-13 2021-09-21 深圳壹账通智能科技有限公司 Service node management method, device, equipment and computer readable storage medium
CN109876436B (en) * 2019-01-14 2022-09-20 珠海金山网络游戏科技有限公司 Resource cache setting method and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1506848A (en) * 2002-12-10 2004-06-23 �Ҵ���˾ Method and system for allocating storage in competitive service under distributed computing environment
CN102130959A (en) * 2011-03-22 2011-07-20 浪潮(北京)电子信息产业有限公司 System and method for scheduling cloud storage resource
CN102857577A (en) * 2012-09-24 2013-01-02 北京联创信安科技有限公司 System and method for automatic load balancing of cluster storage
US20130290636A1 (en) * 2012-04-30 2013-10-31 Qiming Chen Managing memory

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8965819B2 (en) * 2010-08-16 2015-02-24 Oracle International Corporation System and method for effective caching using neural networks
CN102624922B (en) * 2012-04-11 2014-08-13 武汉大学 Method for balancing load of network GIS heterogeneous cluster server

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1506848A (en) * 2002-12-10 2004-06-23 �Ҵ���˾ Method and system for allocating storage in competitive service under distributed computing environment
CN102130959A (en) * 2011-03-22 2011-07-20 浪潮(北京)电子信息产业有限公司 System and method for scheduling cloud storage resource
US20130290636A1 (en) * 2012-04-30 2013-10-31 Qiming Chen Managing memory
CN102857577A (en) * 2012-09-24 2013-01-02 北京联创信安科技有限公司 System and method for automatic load balancing of cluster storage

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108874640A (en) * 2018-05-07 2018-11-23 北京京东尚科信息技术有限公司 A kind of appraisal procedure and device of clustering performance
CN108874640B (en) * 2018-05-07 2022-09-30 北京京东尚科信息技术有限公司 Cluster performance evaluation method and device
CN113141264A (en) * 2020-01-16 2021-07-20 北京京东振世信息技术有限公司 High-concurrency access processing method and device and storage medium
CN113141264B (en) * 2020-01-16 2023-12-08 北京京东振世信息技术有限公司 High concurrency access processing method, device and storage medium

Also Published As

Publication number Publication date
CN105393518A (en) 2016-03-09
CN105393518B (en) 2019-03-19

Similar Documents

Publication Publication Date Title
US10439900B2 (en) Quality of service policy based load adaption
US10516582B2 (en) Managing client access for storage cluster performance guarantees
US9419904B2 (en) System and method for throttling service requests using work-based tokens
US9836407B2 (en) Method for using service level objectives to dynamically allocate cache resources among competing workloads
WO2017088717A1 (en) Storage resource allocation method and system
CN109194984B (en) Video frame scheduling method based on edge calculation
US20120221730A1 (en) Resource control system and resource control method
WO2017041556A1 (en) Virtual resource scheduling method
WO2015196369A1 (en) Distributed cache control method and apparatus
US11113192B2 (en) Method and apparatus for dynamically adapting cache size based on estimated cache performance
Abdelsamea et al. Virtual machine consolidation challenges: A review
CN108196935B (en) Cloud computing-oriented virtual machine energy-saving migration method
JP6069515B2 (en) Computer system and memory allocation adjustment method for computer system
KR20150132859A (en) Automatic tuning of virtual data center resource utilization policies
CN105068768B (en) Write strategy control method and device
CN113989561B (en) Parameter aggregation updating method, device and system based on asynchronous federal learning
WO2016172848A1 (en) Method and device for adjusting virtual resources in cloud computing
WO2013127151A1 (en) Power consumption capping control method, device and system
WO2014101894A1 (en) Method and device for determining caching policy
JP2012221340A (en) Control method, program and computer
Zheng et al. Towards a resource migration method in cloud computing based on node failure rule
WO2021136068A1 (en) Resource dispatching method and apparatus, electronic device, and computer readable medium
CN109951317A (en) A kind of buffer replacing method of the popularity sensor model based on user's driving
CN110865871A (en) Resource rationalization application-based virtualized cluster resource scheduling method
CN106775942B (en) Cloud application-oriented solid-state disk cache management system and method

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201480037256.8

Country of ref document: CN

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

Ref document number: 14896160

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: 14896160

Country of ref document: EP

Kind code of ref document: A1