Method and device for testing interference rate of off-line and on-line mixing part
By adjusting resource utilization and calculating interference rates for offline and online services, the problem of assessing the interference of offline services on online services was solved, thereby improving resource utilization and the efficiency of physical machine usage.
Patent Information
- Application Number
- CN202410620682.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-17
- Publication Date
- 2025-11-18
AI Technical Summary
Existing technologies cannot determine the extent to which offline services interfere with online services, making it impossible to assess the effectiveness and resource utilization of hybrid offline/online deployments.
This paper provides a method for testing the interference rate of mixed online and offline services. By obtaining the resource utilization results of online and offline services, adjusting the resource utilization status of offline services, and calculating the interference rate, the method assesses the impact on online services.
It enables the testing of the interference rate of offline services to online services, and can reasonably allocate resources to improve the efficiency and resource utilization of physical machines.
Smart Images

Figure CN120980554A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of software testing technology, and in particular to a method and apparatus for testing the interference rate of online and offline mixed components. Background Technology
[0002] To address the issue of low cluster resource utilization by online services, a hybrid online / offline deployment technique is employed, co-deploying online and offline services to improve cluster resource utilization. However, since offline and online services are deployed on the same physical machine, they can interfere with each other. Currently, there is no technology available to determine the extent of interference between offline and online services, thus making it impossible to assess the effectiveness of the hybrid online / offline deployment. Summary of the Invention
[0003] In view of this, embodiments of the present invention provide an interference rate testing method and apparatus for offline-online mixed deployments, which can test the interference rate of offline services on online services during offline-online mixed deployments to determine the effectiveness of the offline-online mixed deployment, and reasonably allocate resources for online and offline services based on the interference rate to improve the utilization efficiency of physical machines.
[0004] To achieve the above objectives, according to one aspect of the present invention, a method for testing the interference rate of online and offline mixing regions is provided, comprising:
[0005] Acquire online and offline services deployed on the same physical machine;
[0006] The resource utilization result of the offline service on the physical machine is controlled as a first result, and a first indicator result corresponding to the first result is determined for the online service;
[0007] The control adjusts the first result to a second result, and determines the second indicator result of the online service corresponding to the second result;
[0008] Based on the results of the first and second indicators, the interference rate of the offline service on the online service is determined.
[0009] Optionally, determining the first indicator result of the online service corresponding to the first result includes:
[0010] The online services are subjected to metric testing to obtain one or more first test results;
[0011] The first indicator result is determined based on one or more of the first test results.
[0012] Optionally, determining the second indicator result of the online service corresponding to the second result includes:
[0013] Perform metric testing on the online services and obtain one or more second test results;
[0014] The second indicator result is determined based on the results of one or more second tests.
[0015] Optionally, the resource utilization result is the CPU usage percentage, and the online service is subjected to metric testing, including:
[0016] The query rate per second was tested for the online service.
[0017] Optionally, the resource utilization result is the network transmission rate, and the online service is subjected to indicator testing, including:
[0018] The network outflow rate of the online service was tested.
[0019] Optionally, the interference rate of the offline service on the online service is determined based on the results of the first and second indicators, including:
[0020] Determine the difference between the result of the first indicator and the result of the second indicator;
[0021] The interference rate is determined based on the difference.
[0022] Optionally, the second indicator result includes multiple second test results. Based on the first indicator result and the second indicator result, the interference rate of the offline service on the online service is determined, including:
[0023] Determine the difference between the first indicator result and each of the second test results, and determine each difference;
[0024] The interference rate is determined based on the number of differences and the second test results.
[0025] According to another aspect of the present invention, an interference rate testing apparatus for offline and online mixing is provided, comprising:
[0026] The acquisition module retrieves online and offline services deployed on the same physical machine.
[0027] The first determining module controls the resource utilization result of the offline service on the physical machine to be the first result, and determines the first indicator result of the online service corresponding to the first result;
[0028] The second determining module controls the adjustment of the first result to the second result, and determines the second indicator result of the online service corresponding to the second result;
[0029] The third determining module determines the interference rate of the offline service on the online service based on the results of the first indicator and the results of the second indicator.
[0030] According to another aspect of the present invention, an electronic device is provided, comprising:
[0031] One or more processors;
[0032] Storage device for storing one or more programs.
[0033] When the one or more programs are executed by the one or more processors, the one or more processors implement the interference rate testing method for offline and online mixed components provided by the present invention.
[0034] According to another aspect of the present invention, a computer-readable medium is provided having a computer program stored thereon, which, when executed by a processor, implements the interference rate testing method for offline and online mixing provided by the present invention.
[0035] One embodiment of the above invention has the following advantages or beneficial effects: The interference rate testing method for offline-online mixed deployments of the present invention first acquires online and offline services deployed on the same physical machine. Then, by controlling the resource utilization result of the offline service on the physical machine as a first result, a first indicator result corresponding to the first result of the online service is determined. Next, the first result of the offline service is adjusted to a second result, and a second indicator result corresponding to the second result of the online service is determined. Based on the first and second indicator results, the interference rate of the offline service on the online service is determined. This method can test the interference rate of the offline service on the online service in offline-online mixed deployments, thereby obtaining methods for calculating the interference rate under different scenarios. The effectiveness of offline-online mixed deployments is determined by the interference rate obtained from the test, so as to reasonably allocate resources for offline and online services, improve the utilization efficiency of the physical machine, and improve resource utilization.
[0036] The further effects of the aforementioned unconventional alternative methods will be explained below in conjunction with specific implementation methods. Attached Figure Description
[0037] The accompanying drawings are provided to better understand the invention and are not intended to unduly limit the scope of the invention. Wherein:
[0038] Figure 1 This is a schematic diagram of the main flow of an offline / online interference rate testing method according to an embodiment of the present invention;
[0039] Figure 2 This is a schematic diagram of the main flow of another method for testing the interference rate of offline mixed parts according to an embodiment of the present invention;
[0040] Figure 3 This is a schematic diagram of the main flow of another method for testing the interference rate of an offline mixed section according to an embodiment of the present invention;
[0041] Figure 4 This is a schematic diagram of the main modules of the interference rate testing device for offline and online mixing according to an embodiment of the present invention;
[0042] Figure 5 This is an exemplary system architecture diagram in which embodiments of the present invention can be applied;
[0043] Figure 6 This is a schematic diagram of the structure of a computer system suitable for implementing terminal devices or servers of the present invention. Detailed Implementation
[0044] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of the present invention, including various details to aid understanding. These details should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the invention. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0045] Figure 1 This is a schematic diagram of the main flow of an offline / online interference rate testing method according to an embodiment of the present invention, as shown below. Figure 1 As shown, the interference rate test method for the offline / online mixed section includes the following steps:
[0046] Step S101: Obtain online and offline services deployed on the same physical machine;
[0047] Step S102: Control the resource utilization result of offline services on the physical machine as the first result, and determine the first indicator result of online services corresponding to the first result;
[0048] Step S103: Control the adjustment of the first result to the second result, and determine the second indicator result of the online business corresponding to the second result;
[0049] Step S104: Determine the interference rate of offline services on online services based on the results of the first and second indicators.
[0050] In this embodiment of the invention, the method for testing the interference rate of offline-online hybrid deployment is applied to offline-online hybrid deployment technology to test the degree of interference of offline services to online services, so as to determine the effect of hybrid deployment.
[0051] In this embodiment of the invention, before acquiring online and offline services deployed on the same physical machine, the online and offline services are mixed and deployed on the same physical machine, i.e., mixed online and offline deployment. Here, a physical machine can be a server in a server cluster. The online service is an application or application system that is sensitive to latency, has high stability, and has peaks and troughs. Online services, such as shopping websites, need to respond quickly to user clicks, and the lower the latency, the better. The offline service is an application or application system that is not sensitive to latency, can be executed repeatedly, and has high resource requirements. Offline services, such as big data analysis applications, require a lot of computing but are not sensitive to latency, and usually need to run for several hours to complete data analysis.
[0052] In this embodiment of the invention, multiple online and offline services can be deployed simultaneously on the same physical machine. Kubernetes (k8s, a container orchestration technology) can be used to deploy online and offline services on the same physical machine. A Container Registry (POD) is the smallest unit managed by Kubernetes. Online and offline services run through k8s PODs, with each corresponding to a different POD, achieving partial resource isolation. However, since online and offline services running on the same physical machine need to share resources, such as CPU (Central Processing Unit) and network resources, resource contention will occur. Therefore, it is necessary to determine the interference rate of offline services on online services, achieving both improved physical machine resource utilization and reasonable resource allocation.
[0053] In this embodiment of the invention, when acquiring online and offline services deployed on the same physical machine, it can be determined by acquiring the service identifier of each service; that is, the service identifier of each service indicates whether the corresponding service is online or offline. Alternatively, a preset identifier can be configured for each online service in advance. If the preset identifier exists, the service is considered online; otherwise, it is considered offline.
[0054] In this embodiment of the invention, after obtaining online and offline services deployed on the same physical machine, the interference rate of offline services on online services can be tested under different application scenarios. This allows for optimization of resource utilization for both offline and online services, improving the effectiveness of mixed deployment. Different application scenarios may include low physical machine load, high physical machine load, low online service load, high online service load, high network transmission rate, and low network transmission rate. The corresponding interference rates include CPU utilization interference rate and / or network interference rate.
[0055] In this embodiment of the invention, when testing the interference rate of offline services to online services, the resource utilization result of online services on the physical machine can be kept unchanged under the same application scenario, while the resource utilization result of offline services on the physical machine can be adjusted. The interference rate can then be determined based on the indicator results of online services before and after the adjustment.
[0056] In this embodiment of the invention, the application scenarios are as follows: A physical machine is under low load, and the load of online services is controlled to remain at a low level to test the interference rate of offline services on low-load online services; or, the load of online services is controlled to remain at a high level to test the interference rate of offline services on high-load online services. A physical machine is under high load, and the load of online services is controlled to remain at a low level to test the interference rate of offline services on low-load online services; or, the load of online services is controlled to remain at a high level to test the interference rate of offline services on high-load online services. Here, low physical machine load refers to a low CPU utilization rate of the physical machine, for example, less than 10%; high physical machine load refers to a high CPU utilization rate of the physical machine, for example, greater than 60%; controlling the load of online services to remain at a low level is such as 20% CPU utilization, and controlling the load of online services to remain at a high level is such as 80% CPU utilization.
[0057] In this embodiment of the invention, the resource utilization result of offline services on the physical machine is taken as the first result, and the first indicator result corresponding to the first result of online services is determined, which may specifically include:
[0058] Conduct metric testing on online services and obtain one or more first test results;
[0059] The first indicator result is determined based on one or more first test results.
[0060] In this embodiment of the invention, when the resource utilization result is the first result, one or more indicator tests can be performed on the online service, or the indicator test results of the online service can be monitored to obtain one or more first test results. One of the multiple first test results can be selected as the first indicator result, or the average value of the multiple first test results can be calculated and the average value can be used as the first indicator test result.
[0061] In this embodiment of the invention, the resource utilization result of offline services on the physical machine is controlled to be a second result, that is, the resource utilization result is adjusted from the first result to the second result, such as... Figure 2 As shown, the results of the second indicator corresponding to the second indicator for online business can specifically include:
[0062] Step S201: Perform metric testing on online services and obtain one or more second test results;
[0063] Step S202: Determine the second indicator result based on one or more second test results.
[0064] In this embodiment of the invention, when the resource utilization result is the second result, multiple indicator tests can be performed on the online service, or the indicator test results of the online service can be monitored to obtain one or more second test results. These one or more second test results can be used as the second indicator result. That is, the second indicator result can be any one of the second test results or multiple second test results. The number of second test results can be greater than or equal to the number of first test results to improve the accuracy of interference rate calculation.
[0065] In this embodiment of the invention, the resource utilization result is the CPU usage percentage. The online service is tested for metrics, including testing the query rate per second of the online service. The first result can be a CPU usage percentage of 0% or any other CPU usage percentage. The second result can be any CPU usage percentage other than the first result. The interference rate of offline services on online services at different CPU usage percentages can be calculated.
[0066] For example, when the physical machine and online services are under low load, the CPU usage percentage for online services is controlled at 20%, and the CPU usage percentage for offline services is controlled at 0%. Multiple queries per second (QPS) for the online services are obtained, and the average of these QPS values is calculated. The first metric result is obtained; then, the CPU usage percentage of offline services is adjusted, such as applying a small pressure to offline services, for example, controlling the pressure at 20%, i.e., controlling the CPU usage percentage of offline services at 20%. The QPS of online services is tested n times to obtain the second metric result, i.e., the QPS values are Q1...Qn, where n is a natural number greater than 1. Based on the first metric result... The interference rate of offline services on online services is obtained from the results of the second indicator, Q1...Qn. Alternatively, high pressure can be applied to offline services, such as controlling the pressure at 80%, i.e., controlling the CPU usage ratio of offline services to 80%, to obtain the second indicator value for online services.
[0067] When the physical machine is under low load and the online service is under high load, the CPU usage of the online service is controlled at 80%, and the CPU usage of the offline service is controlled at 0%. Multiple queries per second (QPS) for the online service are obtained, and the average of these QPS is calculated. Obtain the first metric result; then apply a small pressure to the offline service, such as controlling the pressure at 20%, that is, controlling the CPU usage ratio of the offline service to 20%, and test the QPS of the online service n times to obtain the second metric result, that is, obtain the QPS value of Q1...Qn, where n is a natural number greater than 1, and then based on the first metric result... The interference rate of offline services on online services is obtained from the results of the second indicator, Q1...Qn. Alternatively, high pressure can be applied to offline services, such as controlling the pressure at 80%, i.e., controlling the CPU usage ratio of offline services to 80%, to obtain the second indicator value for online services.
[0068] When the physical machine is under high load and the online service is under low load, the CPU usage of the online service is controlled at 20%, and the CPU usage of the offline service is controlled at 0%. Multiple queries per second (QPS) for the online service are obtained, and the average of these QPS is calculated. Obtain the first metric result; then apply a small pressure to the offline service, such as controlling the pressure at 20%, that is, controlling the CPU usage ratio of the offline service to 20%, and test the QPS of the online service n times to obtain the second metric result, that is, obtain the QPS value of Q1...Qn, where n is a natural number greater than 1, and then based on the first metric result... The interference rate of offline services on online services is obtained from the results of the second indicator, Q1...Qn. Alternatively, high pressure can be applied to offline services, such as controlling the pressure at 80%, i.e., controlling the CPU usage ratio of offline services to 80%, to obtain the second indicator value for online services.
[0069] When both the physical machine and online services are under high load, the CPU usage of online services is controlled at 80%, while the CPU usage of offline services is controlled at 0%. Multiple queries per second (QPS) for online services are obtained, and the average of these QPS is calculated. Obtain the first metric result; then apply a small pressure to the offline service, such as controlling the pressure at 20%, that is, controlling the CPU usage ratio of the offline service to 20%, and test the QPS of the online service n times to obtain the second metric result, that is, obtain the QPS value of Q1...Qn, where n is a natural number greater than 1, and then based on the first metric result... The interference rate of offline services on online services is obtained from the results of the second indicator, Q1...Qn. Alternatively, high pressure can be applied to offline services, such as controlling the pressure at 80%, i.e., controlling the CPU usage ratio of offline services to 80%, to obtain the second indicator value for online services.
[0070] In this embodiment of the invention, when user click volume is high, such as during a flash sale, the online service load is at a high level; when user click volume is low, the online service load is at a low level. During interference rate testing, stress generation software such as ab (ApacheBench, a stress testing tool) can be used to simulate scenarios with high or low user click volume, controlling the online service load to remain at a high or low level. Applying stress to offline services can adjust the CPU usage percentage of offline services. Stress control for offline services can also be achieved using stress generation software, such as stress-ng (a stress testing tool), which can generate different CPU consumption levels to achieve varying levels of stress.
[0071] In this embodiment of the invention, the resource utilization result is the network transmission rate. The online service is tested for performance indicators, including testing the network outflow rate of the online service. That is, the interference rate of the offline service on the online service network can be tested by adjusting the network transmission rate of the offline service. For example, the network transmission rate of the offline service can be controlled to a first result, which can be 0 or any other arbitrary value. The network outflow rate of the online service is then tested by controlling the network transmission rate of the online service to obtain a first performance indicator result, i.e., a first network outflow rate, which can be the average of multiple network outflow rates. Then, the network transmission rate of the offline service is controlled to a second result, which can be any network transmission rate other than the first result, to obtain a second performance indicator result for the online service, i.e., a second network outflow rate. The second network outflow rate can be one or more. The interference rate is then obtained based on the first and second network outflow rates.
[0072] For example, if the message sending rate of the offline service is controlled to be 0, and the message sending rate of the online service is controlled to be 20% of the network card's maximum rate for 5 minutes, the outflow rate of the online service is T. If the offline service continues to send messages for 5 minutes at 80% of the network card's maximum rate, while the message sending data and rate of the online service remain unchanged, the outflow rate of the online service is T1. Based on T and T1, the interference rate of the offline service on the network of low-traffic online services can be obtained.
[0073] For example, if the message sending rate of the offline service is controlled to be 0, and the message sending rate of the online service is controlled to be 80% of the network card's maximum speed for 5 minutes, the outflow rate of the online service is T. If the offline service continues to send messages for 5 minutes at a rate of 20% of the network card's maximum speed, while the message sending data and rate of the online service remain unchanged, the outflow rate of the online service is T2. Based on T and T2, the interference rate of the offline service on the network of high-traffic online services can be obtained.
[0074] For example, if the message sending rate of the offline service is controlled to be 0, and the message sending rate of the online service is controlled to be 80% of the network card's maximum rate for 5 minutes, the outflow rate of the online service is T. If the offline service continues to send messages for 5 minutes at 80% of the network card's maximum rate, while the message sending data and rate of the online service remain unchanged, the outflow rate of the online service is T3. Based on T and T3, the interference rate of the high-traffic offline service on the network of the high-traffic online service can be obtained.
[0075] In this embodiment of the invention, determining the interference rate of offline services to online services based on the first indicator result and the second indicator result includes: determining the difference between the first indicator result and the second indicator result; and determining the interference rate based on the difference. That is, if the first indicator result is any test result or the average of multiple first test results, and the second indicator result is any second test result or the average of multiple second test results, then the difference between the second indicator result and the first indicator result is calculated, and the quotient of this difference and the first indicator result is calculated. This quotient is then used as the interference rate. For example, when the resource utilization result is the network transmission rate, the difference between the second network transmission rate and the first network transmission rate can be calculated, and then the quotient of this difference and the first network transmission rate can be used as the interference rate. Based on T and T1, the interference rate of offline services to low-traffic online services can be obtained as (T1-T) / T×100%. Based on T and T2, the interference rate of offline services to high-traffic online services can be obtained as (T2-T) / T×100%. Based on T and T3, the interference rate of high-traffic offline services to high-traffic online services can be obtained as (T3-T) / T×100%.
[0076] In embodiments of the present invention, such as Figure 3 As shown, the second indicator results include multiple second test results. Based on the first and second indicator results, the interference rate of offline services on online services is determined, including:
[0077] Step S301: Determine the difference between the first indicator result and each second test result, and determine each difference;
[0078] Step S302: Determine the interference rate based on the number of each difference and the second test result.
[0079] In this embodiment of the invention, the first indicator result can be any first test result or the average of multiple first test results. The second indicator result includes multiple second test results. Then, the standard deviation is calculated based on the first and second indicator results. Specifically, firstly, the difference between each second test result and the first indicator result is calculated to obtain each difference. Then, the square of each difference is calculated, and the squares of each difference are summed to obtain a sum. The arithmetic square root of the quotient of the sum and the number of second test results is calculated to obtain the interference rate. For example, the resource utilization result is the CPU usage percentage, and the first indicator result is... The second indicator result is Q1…Qn; then the interference rate I of offline services on the CPU usage of online services is shown in equation (1).
[0080]
[0081] The interference rate testing method for mixed online and offline deployments according to this invention first acquires online and offline services deployed on the same physical machine. Then, by controlling the resource utilization result of the offline service on the physical machine as a first result, a first indicator result for the online service is determined. Next, the first result of the offline service is adjusted to a second result, and a second indicator result for the online service is determined. Based on the first and second indicator results, the interference rate of the offline service on the online service is determined. This method enables the testing of the interference rate of offline services on online services in mixed online and offline deployments, thereby obtaining methods for calculating the interference rate under different scenarios. The effectiveness of the mixed online and offline deployment is determined by the interference rate obtained from the test, allowing for the rational allocation of resources for offline and online services, improving the utilization efficiency of the physical machine, and increasing resource utilization.
[0082] According to another aspect of the embodiments of the present invention, such as Figure 4 As shown, an interference rate testing device 400 for offline and online mixing is provided, comprising:
[0083] Module 401 retrieves online and offline services deployed on the same physical machine;
[0084] The first determining module 402 controls the resource utilization result of offline services on the physical machine as the first result, and determines the first indicator result of online services corresponding to the first result;
[0085] The second determining module 403 controls the adjustment of the first result to the second result, and determines the second indicator result of the online business corresponding to the second result;
[0086] The third determining module 404 determines the interference rate of offline services on online services based on the results of the first and second indicators.
[0087] In this embodiment of the invention, the first determining module 402 is further configured to: perform indicator testing on online services and obtain one or more first test results; and determine a first indicator result based on one or more first test results.
[0088] In this embodiment of the invention, the second determining module 403 is further configured to: perform indicator testing on online services and obtain one or more second test results; and determine a second indicator result based on one or more second test results.
[0089] In this embodiment of the invention, the resource utilization result is the CPU usage percentage, and the first determining module 402 or the second determining module 403 is further used to: test the query rate per second of online services.
[0090] In this embodiment of the invention, the resource utilization result is the network transmission rate, and the first determining module 402 or the second determining module 403 is further used to: test the network outflow rate of online services.
[0091] In this embodiment of the invention, the third determining module 404 is further configured to: determine the difference between the first indicator result and the second indicator result; and determine the interference rate based on the difference.
[0092] In this embodiment of the invention, the second indicator result includes multiple second test results, and the third determining module 404 is further used to: determine the difference between the first indicator result and each second test result, determine each difference, and determine the interference rate based on each difference and the number of second test results.
[0093] According to another aspect of the present invention, an electronic device is provided, comprising: one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the interference rate testing method for offline and online mixing provided by the present invention.
[0094] According to another aspect of the present invention, a computer-readable medium is provided having a computer program stored thereon, which, when executed by a processor, implements the interference rate testing method for offline and online mixing provided by the present invention.
[0095] Figure 5 An exemplary system architecture 500 is shown that can be applied to the interference rate testing method or apparatus for offline mixed regions according to embodiments of the present invention.
[0096] like Figure 5As shown, system architecture 500 may include terminal devices 501, 502, and 503, a network 504, and a server 505. Network 504 serves as the medium for providing communication links between terminal devices 501, 502, and 503 and server 505. Network 504 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0097] Users can use terminal devices 501, 502, and 503 to interact with server 505 via network 504 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 501, 502, and 503, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).
[0098] Terminal devices 501, 502, and 503 can be various electronic devices with displays that support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0099] Server 505 can be a server that provides various services, such as a backend management server that supports shopping websites browsed by users using terminal devices 501, 502, and 503 (for example only). The backend management server can analyze and process data such as received product information query requests, and feed back the processing results (such as target push information, product information - for example only) to the terminal device.
[0100] It should be noted that the interference rate testing method for offline and online mixed circuits provided in this embodiment of the invention is generally executed by server 505, and correspondingly, the interference rate testing device for offline and online mixed circuits is generally set in server 505.
[0101] It should be understood that Figure 5 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0102] The following is for reference. Figure 6 It shows a schematic diagram of the structure of a computer system 600 suitable for implementing a terminal device of the present invention. Figure 6 The terminal device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.
[0103] like Figure 6As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 602 or programs loaded from storage section 608 into random access memory (RAM) 603. The RAM 603 also stores various programs and data required for the operation of the system 600. The CPU 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0104] The following components are connected to I / O interface 605: an input section 606 including a keyboard, mouse, etc.; an output section 607 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to I / O interface 605 as needed. A removable medium 611, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 610 as needed so that computer programs read from it can be installed into storage section 608 as needed.
[0105] In particular, according to the embodiments disclosed in this invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 609, and / or installed from removable medium 611. When the computer program is executed by central processing unit (CPU) 601, it performs the functions defined above in the system of this invention.
[0106] It should be noted that the computer-readable medium shown in this invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0107] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0108] The modules described in the embodiments of the present invention can be implemented in software or hardware. The described modules can also be housed in a processor; for example, a processor can be described as including an acquisition module, a first determining module, a second determining module, and a third determining module. The names of these modules do not necessarily limit the module itself; for example, the acquisition module can also be described as "a module for acquiring online and offline services deployed on the same physical machine."
[0109] In another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiments; or it may exist independently and not assembled into the device. The computer-readable medium carries one or more programs, which, when executed by the device, cause the device to include: acquiring online and offline services deployed on the same physical machine; controlling the resource utilization result of the offline service on the physical machine to be a first result, and determining a first indicator result of the online service corresponding to the first result; controlling the adjustment of the first result to a second result, and determining a second indicator result of the online service corresponding to the second result; and determining the interference rate of the offline service on the online service based on the first indicator result and the second indicator result.
[0110] According to the technical solution of this embodiment of the invention, the interference rate testing method for offline and online mixed deployments first acquires online and offline services deployed on the same physical machine. Then, by controlling the resource utilization result of the offline service on the physical machine as a first result, a first indicator result corresponding to the first result of the online service is determined. Next, the first result of the offline service is adjusted to a second result, and a second indicator result corresponding to the second result of the online service is determined. Based on the first and second indicator results, the interference rate of the offline service on the online service is determined. This method can test the interference rate of the offline service on the online service in offline and online mixed deployments, thereby obtaining methods for calculating the interference rate under different scenarios. The effectiveness of the offline and online mixed deployment is determined by the interference rate obtained from the test, so as to reasonably allocate resources for offline and online services, improve the utilization efficiency of the physical machine, and improve resource utilization.
[0111] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for testing the interference rate of online and offline mixed regions, characterized in that, include: Acquire online and offline services deployed on the same physical machine; The resource utilization result of the offline service on the physical machine is controlled as a first result, and a first indicator result corresponding to the first result is determined for the online service; The control adjusts the first result to a second result, and determines the second indicator result of the online service corresponding to the second result; Based on the results of the first and second indicators, the interference rate of the offline service on the online service is determined.
2. The method according to claim 1, characterized in that, Determining the first indicator result corresponding to the first result for the online service includes: The online services are subjected to metric testing to obtain one or more first test results; The first indicator result is determined based on one or more of the first test results.
3. The method according to claim 1, characterized in that, Determining the second indicator result corresponding to the second result for the online service includes: Perform metric testing on the online services and obtain one or more second test results; The second indicator result is determined based on the results of one or more second tests.
4. The method according to claim 2 or 3, characterized in that, The resource utilization result is the CPU usage percentage. The online services are tested using various metrics, including: The query rate per second was tested for the online service.
5. The method according to claim 2 or 3, characterized in that, The resource utilization result is the network transmission rate. The online service is tested for performance indicators, including: The network outflow rate of the online service was tested.
6. The method according to claim 1, characterized in that, Based on the results of the first and second indicators, the interference rate of the offline service on the online service is determined, including: Determine the difference between the result of the first indicator and the result of the second indicator; The interference rate is determined based on the difference.
7. The method according to claim 1, characterized in that, The second indicator result includes multiple second test results. Based on the first indicator result and the second indicator result, the interference rate of the offline service on the online service is determined, including: Determine the difference between the first indicator result and each of the second test results, and determine each difference; The interference rate is determined based on the number of differences and the second test results.
8. An interference rate testing device for offline and online mixed-mode components, characterized in that, include: The acquisition module retrieves online and offline services deployed on the same physical machine. The first determining module controls the resource utilization result of the offline service on the physical machine to be the first result, and determines the first indicator result of the online service corresponding to the first result; The second determining module controls the adjustment of the first result to the second result, and determines the second indicator result of the online service corresponding to the second result; The third determining module determines the interference rate of the offline service on the online service based on the results of the first indicator and the results of the second indicator.
9. An electronic device, characterized in that, include: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-7.
10. A computer-readable medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-7.