A dynamic switching system based on four-way cross-X type optical fiber jumper

Through the dynamic switching system of four-way crossed X-type optical fiber jumpers, the problems of low communication efficiency and high maintenance cost of optical fiber jumpers are solved, accurate monitoring and flexible response of server load are achieved, and system stability and reliability are improved.

CN117939334BActive Publication Date: 2024-10-18BEIJING JILIU TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410106679.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-25
Publication Date
2024-10-18
Estimated Expiration
2044-01-25

AI Technical Summary

Technical Problem

The existing optical fiber jumpers have low communication efficiency and high maintenance costs, resulting in small server clusters, poor expansion performance, inability to respond to changes in server load in a timely manner, and low monitoring accuracy.

Method used

A dynamic switching system based on four-way crossed Adjust server resources.

Benefits of technology

It improves communication efficiency, reduces maintenance costs, enables precise monitoring and flexible response to server load, improves system stability and reliability, and avoids waste of resources and failures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117939334B_ABST
    Figure CN117939334B_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of optical fiber interconnection network, and in particular to a dynamic switching system based on a four-way cross X-type optical fiber jumper, comprising servers interconnected by the four-way cross X-type optical fiber jumper, and a parameter acquisition unit connected to a first server, for acquiring a database connection pool usage rate, a request number, a CPU and a memory usage sum, a thread pool thread number, and a database connection pool number of the first server, a first data processing unit calculating a response efficiency evaluation value of the server, and determining whether to monitor the load of the first server, a second data processing unit determining a monitoring mode and an expansion of the first server, and an adjustment unit adjusting the thread number or expanding the first server. The invention overcomes the problems in the prior art that the optical fiber jumper has low communication efficiency and high maintenance cost, and at the same time, the monitoring accuracy of the server load is low, resulting in poor server scalability and low response efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of optical fiber interconnection network, and in particular to a dynamic switching system based on four-way cross X-type optical fiber jumpers. Background Art

[0002] In modern data centers and network architectures, server performance and resource management are key factors in ensuring system stability and response efficiency. With the development of cloud computing and big data technologies, server loads change dynamically, which requires server resources to be dynamically adjusted according to real-time needs. To achieve this goal, a system that can intelligently monitor and dynamically adjust server resources is needed.

[0003] Traditional server resource management methods are usually static or rely on manual intervention, which is not flexible and timely enough when dealing with emergencies or unconventional loads. For example, when the usage of the server's database connection pool suddenly increases, the traditional system may not be able to respond quickly, resulting in increased service delays or even service unavailability. In addition, data synchronization and backup between servers are usually scheduled rather than based on real-time data usage.

[0004] Chinese Patent Publication No.: CN112804002A discloses a short-distance interconnection network based on MPO fiber optic patch cords, including: the short-distance interconnection network is a three-level interconnection network, the input level is composed of m r×rm core MPO-MPO fiber optic patch cord interconnection modules, labeled 1, 2, ..., α, ..., m, and the output level is composed of r m×mr core MPO-MPO fiber optic patch cord interconnection modules, labeled 1, 2, ..., β, ..., r; the MPO-MPO fiber optic patch cord interconnection modules of the input level and the output level are connected through N N×NLC fiber optic patch cord interconnection modules of the intermediate level, and N=mr.

[0005] It can be seen that the existing technology has the following problems: due to the low communication efficiency and high maintenance cost of the existing fiber optic jumpers, the server cluster is small in scale and has poor scalability. At the same time, the monitoring accuracy of the server load is low, and the server cannot be expanded in time, resulting in an inability to respond quickly. Summary of the invention

[0006] To this end, the present invention provides a dynamic switching system based on a four-way cross-X-type fiber optic jumper to overcome the problems of low communication efficiency and high maintenance cost of fiber optic jumpers in the prior art, as well as low accuracy in monitoring the load of the server, resulting in poor server scalability and low response efficiency.

[0007] To achieve the above object, the present invention provides a dynamic switching system based on a four-way cross-X-type optical fiber jumper, comprising:

[0008] A first MPO connector connected to a third MPO connector via a first optical fiber bundle in the optical cable, and connected to a fourth MPO connector via a second optical fiber bundle in the optical cable;

[0009] a second MPO connector connected to the third MPO connector via a third optical fiber bundle in the optical cable, and connected to the fourth MPO connector via a fourth optical fiber bundle in the optical cable;

[0010] A first server connected to the first MPO connector;

[0011] a second server connected to the second MPO connector;

[0012] a third server connected to the third MPO connector;

[0013] a fourth server connected to the fourth MPO connector;

[0014] a parameter acquisition unit connected to the first server and used to acquire the utilization rate of the database connection pool of the first server, the number of requests waiting to obtain a database connection, the sum of the CPU utilization rate and the memory utilization rate, the number of threads in the thread pool, and the number of database connection pools;

[0015] a first data processing unit connected to the parameter acquisition unit, configured to calculate a response efficiency evaluation value of the first server according to the parameters acquired by the parameter acquisition unit, and determine monitoring of the load of the first server according to the response efficiency evaluation value;

[0016] a second data processing unit, which is connected to the parameter acquisition unit and the first data processing unit respectively, and is used to determine a monitoring method for monitoring the load of the first server according to a first relative difference between the response efficiency evaluation value and a preset response efficiency evaluation value;

[0017] Determining the expansion of the first server according to the sum, and determining the expansion mode of expanding the first server according to a second relative difference between the sum and a preset sum;

[0018] Determining an initial determination of the number of threads according to the utilization rate of the database connection pool;

[0019] An adjustment unit is connected to the parameter acquisition unit and the second data processing unit respectively, and is used to determine the adjustment of the number of threads according to the number of threads.

[0020] Furthermore, the first data processing unit calculates the response efficiency evaluation value of the first server according to the following formula:

[0021]

[0022] Wherein, P represents the response efficiency evaluation value, A represents the utilization rate of the database connection pool of the first server, A0 represents the utilization rate of the preset database connection pool of the first server, and B represents the number of requests waiting to obtain a database connection;

[0023] The first data processing unit determines to monitor the load of the first server based on a comparison result that the response efficiency evaluation value of the first server is less than or equal to a preset response efficiency evaluation value.

[0024] Further, the second data processing unit determines to monitor the load of the first server in a first monitoring manner based on the comparison result that the first relative difference is less than or equal to a first preset relative difference, and the first monitoring manner is to determine whether to expand the first server based on the sum of the CPU utilization rate and the memory utilization rate of the first server.

[0025] Further, the second data processing unit determines to monitor the load of the first server in a second monitoring manner based on the comparison result that the first relative difference is greater than a first preset relative difference, and the second monitoring manner is to determine whether to make an initial determination of the number of threads in the thread pool of the first server according to the utilization rate of the database connection pool of the first server.

[0026] Furthermore, the second data processing unit determines to expand the first server based on the comparison result that the sum is greater than a preset sum.

[0027] Furthermore, the second data processing unit determines to expand the first server in a first expansion manner based on the comparison result that the second relative difference is less than or equal to a second preset relative difference. The first expansion manner is to copy all data of the first server to a third server and switch the request waiting to obtain a database connection to the third server.

[0028] Furthermore, the second data processing unit determines to expand the first server in a second expansion manner based on the comparison result that the second relative difference is greater than a second preset relative difference. The second expansion manner is to copy all the data of the first server to the third server and the fourth server respectively, and switch the request waiting to obtain the database connection to the third server and the fourth server.

[0029] Further, the second data processing unit determines an initial determination of the number of threads in the thread pool of the first server based on a comparison result that the database connection pool usage rate of the first server is less than or equal to a preset database connection pool usage rate, and determines to expand the first server in a third expansion manner based on a comparison result that the database connection pool usage rate of the first server is greater than a preset database connection pool usage rate. The third expansion manner is to copy the hot data in the first server, the third server and the fourth server to the second server, and switch the hot data request waiting to obtain a database connection to the second server.

[0030] Furthermore, the second data processing unit determines that the requested data is hot data based on a comparison result that the number of times the requested data is requested on the same day in the first server, the third server, and the fourth server is greater than a preset number of times the requested data is requested on the same day.

[0031] Further, the adjustment unit determines to adjust the number of threads based on the comparison result that the number of threads is less than or equal to the number of database connection pools of the first server, and determines to expand the first server in a third expansion mode based on the comparison result that the number of threads is greater than the number of database connection pools of the first server;

[0032] The adjustment unit determines to adjust the number of threads by a first adjustment coefficient X1=log2(△L+2) based on a comparison result that the third relative difference is less than or equal to a third preset relative difference, and determines to adjust the number of threads by a second adjustment coefficient X2=log 1.5 (ΔL+2) adjusts the number of threads.

[0033] Compared with the prior art, the beneficial effect of the present invention is that the present invention is based on a four-way cross X-shaped optical fiber jumper to connect four servers, uses less optical fiber material, has a shorter transmission distance, has fewer optical cables, has lower subsequent maintenance costs, and has higher communication efficiency.

[0034] Furthermore, the present invention calculates the response efficiency evaluation value of the first server through the database connection pool utilization rate, the preset database connection pool utilization rate and the number of requests waiting to obtain a database connection, so as to more accurately evaluate the response efficiency of the first server.

[0035] Furthermore, the present invention accurately determines whether to monitor the load of the first server through a comparison result of the response efficiency evaluation value of the first server with a preset response efficiency evaluation value, so as to timely monitor the load when the response efficiency level of the first server is low, so that the system can flexibly respond to different loads, and identify resource bottlenecks and potential failure points in advance by monitoring and evaluating the load conditions of the server, thereby performing preventive maintenance and reducing the occurrence of unexpected failures.

[0036] Furthermore, the present invention can more accurately determine the monitoring method for monitoring the load of the first server by comparing the first relative difference with the first preset relative difference, so as to more accurately judge the current load status and flexibly select a suitable monitoring strategy. Through this dynamic and hierarchical monitoring method, the system can more effectively manage the server load and reduce the risk of overload, thereby improving the stability and reliability of the overall system.

[0037] Furthermore, the present invention accurately determines whether to expand the first server by comparing the sum with the preset sum, ensuring that the first server responds quickly when the performance reaches a bottleneck to avoid service quality degradation, and monitors the sum of CPU and memory usage to more accurately evaluate current resource usage, thereby making a decision on whether to expand resources, which helps to optimize resource usage and avoid resource waste.

[0038] Furthermore, the present invention accurately determines the expansion method for expanding the first server by comparing the second relative difference with the second preset relative difference, which helps to maintain the stability of the system. Appropriate expansion can prevent the server from crashing due to overload, while also ensuring the continuity of the service. By copying data to other servers, not only the computing resources are expanded, but also the redundancy and backup of the data are increased, thereby improving data security and the fault tolerance of the system.

[0039] Furthermore, the present invention accurately determines whether to make an initial determination on the number of threads in the thread pool of the first server based on a comparison result of the database connection pool utilization rate of the first server with the preset database connection pool utilization rate, so as to determine whether it is necessary to optimize the size of the thread pool to match the current database connection requirements, thereby improving the response performance and improving the overall resource utilization efficiency. If it is not necessary to optimize the size of the thread pool, the first server is expanded in a third expansion mode to share the load pressure of the first server, the third server and the fourth server.

[0040] Furthermore, the present invention accurately determines whether the requested data is hot data by comparing the number of requests on the day with the preset number of requests on the day, thereby reducing the need for manual analysis and improving efficiency. Hot data usually requires faster access speeds and better response times. By identifying hot data and placing the data separately on a server, it helps to disperse the access pressure on other servers and achieve load balancing.

[0041] Furthermore, the present invention accurately determines whether to adjust the number of threads by comparing the number of threads with the number of database connection pools of the first server to determine whether the number of threads of the first server matches the number of database connection pools. The system can avoid resource waste caused by too many threads or performance bottlenecks caused by insufficient threads.

[0042] Furthermore, the present invention determines an adjustment coefficient for adjusting the number of threads by comparing the third relative difference with the third preset relative difference, and more accurately selects a suitable adjustment coefficient to precisely adjust the number of threads to adapt to different performance and resource requirements. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 It is a structural diagram of a dynamic switching system based on a four-way cross-X-type optical fiber jumper according to an embodiment of the present invention;

[0044] Figure 2 It is a structural schematic diagram of a dynamic switching system based on a four-way cross-X-type optical fiber jumper according to an embodiment of the present invention;

[0045] In the figure, 1-first MPO connector, 2-first optical fiber bundle, 3-third MPO connector, 4-second optical fiber bundle, 5-fourth MPO connector, 6-second MPO connector, 7-third optical fiber bundle, 8-fourth optical fiber bundle, 9-first server, 10-second server, 11-third server, 12-fourth server. DETAILED DESCRIPTION

[0046] In order to make the objects and advantages of the present invention more clearly understood, the present invention is further described below in conjunction with embodiments; it should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0047] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the protection scope of the present invention.

[0048] It should be noted that, in the description of the present invention, terms such as "up", "down", "left", "right", "inside" and "outside" indicating directions or positional relationships are based on the directions or positional relationships shown in the drawings. This is merely for the convenience of description and does not indicate or imply that the device or element must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it cannot be understood as a limitation on the present invention.

[0049] In addition, it should be noted that in the description of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0050] See also Figure 1-2As shown, Figure 1 It is a structural diagram of a dynamic switching system based on a four-way cross-X-type optical fiber jumper according to an embodiment of the present invention; Figure 2 The present invention is a schematic structural diagram of a dynamic switching system based on a four-way cross-X-type optical fiber jumper according to an embodiment of the present invention.

[0051] The embodiment of the present invention is based on a dynamic switching system of a four-way cross-X-type optical fiber jumper, comprising:

[0052] The first MPO connector 1 is connected to the third MPO connector 3 through the first optical fiber bundle 2 in the optical cable, and is connected to the fourth MPO connector 5 through the second optical fiber bundle 4 in the optical cable;

[0053] A second MPO connector 6, connected to the third MPO connector via a third optical fiber bundle 7 in the optical cable, and connected to the fourth MPO connector via a fourth optical fiber bundle 8 in the optical cable;

[0054] A first server 9, connected to the first MPO connector;

[0055] A second server 10, connected to the second MPO connector;

[0056] A third server 11, which is connected to the third MPO connector;

[0057] a fourth server 12, connected to the fourth MPO connector;

[0058] a parameter acquisition unit connected to the first server, for acquiring a database connection pool usage rate A, a number of requests waiting to obtain a database connection B, a sum of a CPU usage rate and a memory usage rate Z, a number of threads in a thread pool L, and a number of database connection pools L0 of the first server;

[0059] a first data processing unit connected to the parameter acquisition unit, configured to calculate a response efficiency evaluation value P of the first server according to the parameters acquired by the parameter acquisition unit, and determine monitoring of the load of the first server according to the response efficiency evaluation value P;

[0060] A second data processing unit, which is connected to the parameter acquisition unit and the first data processing unit respectively, and is used to determine a monitoring method for monitoring the load of the first server according to a first relative difference ΔP between the response efficiency evaluation value P and a preset response efficiency evaluation value P0;

[0061] Determine expansion of the first server according to the sum Z, and determine an expansion method for expanding the first server according to a second relative difference ΔZ between the sum Z and a preset sum Z0;

[0062] Determining an initial determination of the number of threads L according to the database connection pool usage rate A;

[0063] An adjustment unit is connected to the parameter acquisition unit and the second data processing unit respectively, and is used to determine the adjustment of the number of threads L according to the number of threads L.

[0064] In the embodiment of the present invention, the optical cable is preferably a 32-core OM3 optical cable, with 8 cores forming a group as an optical fiber bundle.

[0065] Specifically, the present invention is based on a four-way cross X-shaped optical fiber jumper to connect four servers, uses less optical fiber material, has a shorter transmission distance, has a smaller number of optical cables, has lower subsequent maintenance costs and higher communication efficiency.

[0066] Specifically, the first data processing unit calculates the response efficiency evaluation value P of the first server according to the following formula, setting:

[0067]

[0068] Wherein, A represents the utilization rate of the database connection pool of the first server, A0 represents the utilization rate of the preset database connection pool of the first server, and B represents the number of requests waiting to obtain a database connection.

[0069] In the embodiment of the present invention, the preset database connection pool usage rate A0 is set to 60%. Those skilled in the art may adjust the preset database connection pool usage rate A0 according to specific circumstances.

[0070] Specifically, the present invention calculates the response efficiency evaluation value of the first server through the database connection pool utilization rate, the preset database connection pool utilization rate and the number of requests waiting to obtain a database connection, so as to more accurately evaluate the response efficiency of the first server.

[0071] Specifically, the first data processing unit determines whether to monitor the load of the first server according to a comparison result between the response efficiency evaluation value P of the first server and a preset response efficiency evaluation value P0;

[0072] If P≤P0, the first data processing unit determines to monitor the load of the first server;

[0073] If P>P0, the first data processing unit determines not to monitor the load of the first server;

[0074] In the embodiment of the present invention, the preset response efficiency evaluation value P0 is 0.7. The preset response efficiency evaluation value P0 is obtained when the database connection pool usage rate A is 70% or 50%, and the number of requests waiting to obtain a database connection is 5. Those skilled in the art can adjust the preset response efficiency evaluation value P0 according to the specific circumstances.

[0075] Specifically, the present invention accurately determines whether to monitor the load of the first server through a comparison result between the response efficiency evaluation value of the first server and a preset response efficiency evaluation value, so as to timely monitor the load when the response efficiency level of the first server is low, so that the system can flexibly respond to different loads, and identify resource bottlenecks and potential failure points in advance by monitoring and evaluating the load conditions of the server, so as to perform preventive maintenance and reduce the occurrence of unexpected failures.

[0076] Specifically, the second data processing unit calculates a first relative difference △P between the response efficiency evaluation value P and a preset response efficiency evaluation value P0 under the condition that the first data processing unit determines to monitor the load of the first server, and determines a monitoring mode for monitoring the load of the first server according to a comparison result between the first relative difference △P and the first preset relative difference △P0, and sets △P=(P0-P) / P0;

[0077] If ΔP≤ΔP0, the second data processing unit determines to monitor the load of the first server in a first monitoring manner;

[0078] If ΔP>ΔP0, the second data processing unit determines to monitor the load of the first server in a second monitoring manner;

[0079] Among them, the first monitoring method is to determine whether to expand the first server based on the sum Z of the CPU usage and memory usage of the first server, and the second monitoring method is to determine whether to make an initial determination on the number of threads L in the thread pool of the first server based on the database connection pool usage A of the first server.

[0080] In the embodiment of the present invention, the first preset relative difference △P0 is set to 0.29. The first preset relative difference △P0 is obtained when the response efficiency evaluation value P is 0.5. Those skilled in the art may adjust the first preset relative difference △P0 according to specific circumstances.

[0081] Specifically, the present invention accurately determines the monitoring method for monitoring the load of the first server by comparing the first relative difference with the first preset relative difference, can more accurately judge the current load status, and flexibly select a suitable monitoring strategy. Through this dynamic and hierarchical monitoring method, the system can more effectively manage the server load and reduce the risk of overload, thereby improving the stability and reliability of the overall system.

[0082] Specifically, the second data processing unit determines whether to expand the first server according to a comparison result between the sum Z and the preset sum Z0 under the condition that the load of the first server is monitored in the first monitoring mode;

[0083] If Z≤Z0, the second data processing unit determines not to expand the first server;

[0084] If Z>Z0, the second data processing unit determines to expand the first server;

[0085] In the embodiment of the present invention, the preset sum Z0 is set to 160%, and those skilled in the art may adjust the preset sum Z0 according to specific circumstances.

[0086] Specifically, the present invention accurately determines whether to expand the first server by comparing the sum with the preset sum, ensuring that the first server responds quickly when the performance reaches a bottleneck to avoid service quality degradation, and monitors the sum of CPU and memory usage to more accurately evaluate the current resource usage, thereby making a decision on whether to expand resources, which helps to optimize resource usage and avoid resource waste.

[0087] Specifically, the second data processing unit calculates a second relative difference △Z between the sum Z and a preset sum Z0 under the condition of determining to expand the first server, and determines an expansion mode for expanding the first server according to a comparison result of the second relative difference △Z and a second preset relative difference △Z0, and sets △Z=(Z-Z0) / Z0;

[0088] If △Z≤△Z0, the second data processing unit determines to expand the first server in a first expansion manner;

[0089] If ΔZ>ΔZ0, the second data processing unit determines to expand the first server in a second expansion mode;

[0090] The first expansion method is to copy all the data of the first server to the third server, and switch the request waiting for obtaining the database connection to the third server;

[0091] The second expansion mode is to copy all the data of the first server to the third server and the fourth server respectively, and switch the request waiting for obtaining the database connection to the third server and the fourth server.

[0092] In the embodiment of the present invention, the second preset relative difference △Z0 is set to 0.125. The second preset relative difference △Z0 is obtained when the sum Z is 180%. Those skilled in the art can adjust the second preset relative difference △Z0 according to specific circumstances.

[0093] Specifically, the present invention accurately determines the expansion method for expanding the first server by comparing the second relative difference with the second preset relative difference, which helps to maintain the stability of the system. Appropriate expansion can prevent the server from crashing due to overload, while also ensuring the continuity of the service. By copying data to other servers, not only the computing resources are expanded, but also the redundancy and backup of the data are increased, thereby improving data security and the fault tolerance of the system.

[0094] Specifically, the second data processing unit determines whether to perform an initial determination on the number of threads L in the thread pool of the first server according to a comparison result between a database connection pool usage rate A of the first server and a preset database connection pool usage rate A0 under the condition that the load of the first server is monitored in the second monitoring mode;

[0095] If A≤A0, the second data processing unit determines to make an initial determination on the number of threads L in the thread pool of the first server;

[0096] If A>A0, the second data processing unit determines to expand the first server in a third expansion mode;

[0097] The third expansion method is to copy the hot data in the first server, the third server and the fourth server to the second server, and switch the hot data request waiting for obtaining the database connection to the second server.

[0098] Specifically, the present invention accurately determines whether to make an initial determination on the number of threads in the thread pool of the first server based on the comparison result of the database connection pool utilization rate of the first server with the preset database connection pool utilization rate, so as to determine whether it is necessary to optimize the size of the thread pool to match the current database connection requirements, thereby improving the response performance and improving the overall resource utilization efficiency. If it is not necessary to optimize the size of the thread pool, the first server is expanded in a third expansion mode to share the load pressure of the first server, the third server and the fourth server.

[0099] Specifically, the second data processing unit determines whether the requested data is hot data according to a comparison result of the number of requests W of the requested data on the same day in the first server, the third server, and the fourth server and the preset number of requests W0 on the same day, under the condition that the first server is expanded in the third expansion mode;

[0100] If W≤W0, the second data processing unit determines that the requested data is not hot data;

[0101] If W>W0, the second data processing unit determines that the requested data is hot data;

[0102] In the embodiment of the present invention, the preset number of requests W0 for the day is obtained by taking 3% of the sum of the number of requests for all requested data on the first server, the third server and the fourth server on the same day. Those skilled in the art may adjust the preset number of requests W0 for the day according to the specific circumstances.

[0103] Specifically, the present invention accurately determines whether the requested data is hot data by comparing the number of requests on the day with the preset number of requests on the day, thereby reducing the need for manual analysis and improving efficiency. Hot data usually requires faster access speeds and better response times. By identifying hot data and placing the data separately on a server, it helps to disperse the access pressure on other servers and achieve load balancing.

[0104] Specifically, the adjustment unit determines whether to adjust the number of threads L according to a comparison result between the number of threads L and the number of database connection pools L0 of the first server under the condition that the second data processing unit determines to make an initial determination on the number of threads L of the thread pool of the first server;

[0105] If L≤L0, the adjustment unit determines to adjust the number of threads L;

[0106] If L>L0, the adjustment unit determines to expand the first server in a third expansion manner.

[0107] Specifically, the present invention accurately determines whether to adjust the number of threads by comparing the number of threads with the number of database connection pools of the first server to determine whether the number of threads of the first server matches the number of database connection pools. The system can avoid resource waste caused by too many threads or performance bottlenecks caused by insufficient threads.

[0108] Specifically, the adjustment unit calculates a third relative difference △L between the number of threads L and the number of database connection pools L0 of the first server under the condition of determining the number of adjusted threads L, and determines an adjustment coefficient for adjusting the number of threads L according to a comparison result of the third relative difference △L and a third preset relative difference △L0, and sets △L=(L0-L) / L0;

[0109] If ΔL≤ΔL0, the adjustment unit determines to adjust the number of threads L by the first adjustment coefficient X1;

[0110] If ΔL>ΔL0, the adjustment unit determines to adjust the number of threads L by the second adjustment coefficient X2;

[0111] Wherein, the first adjustment coefficient X1=log2(ΔL+2), the second adjustment coefficient X2=log 1.5 (△L+2);

[0112] The adjusted number of threads is set to L1=L×X1, or L1=L×X2.

[0113] In the embodiment of the present invention, the third preset relative difference ΔL0 is set to 0.5, and those skilled in the art may adjust the third preset relative difference ΔL0 according to specific circumstances.

[0114] Specifically, the present invention determines the adjustment coefficient for adjusting the number of threads by comparing the third relative difference with the third preset relative difference, and more accurately selects the appropriate adjustment coefficient to precisely adjust the number of threads to adapt to different performance and resource requirements.

[0115] So far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.

[0116] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A dynamic switching system based on a four-way cross-X type optical fiber jumper, characterized in that: include: A first MPO connector connected to a third MPO connector via a first optical fiber bundle in the optical cable, and connected to a fourth MPO connector via a second optical fiber bundle in the optical cable; a second MPO connector connected to the third MPO connector via a third optical fiber bundle in the optical cable, and connected to the fourth MPO connector via a fourth optical fiber bundle in the optical cable; A first server connected to the first MPO connector; a second server connected to the second MPO connector; a third server connected to the third MPO connector; a fourth server connected to the fourth MPO connector; a parameter acquisition unit connected to the first server and used to acquire the utilization rate of the database connection pool of the first server, the number of requests waiting to obtain a database connection, the sum of the CPU utilization rate and the memory utilization rate, the number of threads in the thread pool, and the number of database connection pools; a first data processing unit connected to the parameter acquisition unit, configured to calculate a response efficiency evaluation value of the first server according to the parameters acquired by the parameter acquisition unit, and determine monitoring of the load of the first server according to the response efficiency evaluation value; a second data processing unit, which is connected to the parameter acquisition unit and the first data processing unit respectively, and is used to determine a monitoring method for monitoring the load of the first server according to a first relative difference between the response efficiency evaluation value and a preset response efficiency evaluation value; Determining the expansion of the first server according to the sum, and determining the expansion mode of expanding the first server according to a second relative difference between the sum and a preset sum; Determining an initial determination of the number of threads according to the utilization rate of the database connection pool; an adjustment unit, connected to the parameter acquisition unit and the second data processing unit respectively, for determining an adjustment to the number of threads according to the number of threads; The second data processing unit determines to expand the first server in a first expansion manner based on the comparison result that the second relative difference is less than or equal to the second preset relative difference, and the first expansion manner is to copy all data of the first server to the third server and switch the request waiting for obtaining the database connection to the third server; The second data processing unit determines to expand the first server in a second expansion mode based on the comparison result that the second relative difference is greater than the second preset relative difference, and the second expansion mode is to copy all the data of the first server to the third server and the fourth server respectively, and switch the request waiting for obtaining the database connection to the third server and the fourth server; The adjusting unit determines to adjust the number of threads based on a comparison result that the number of threads is less than or equal to the number of database connection pools of the first server, and determines to expand the first server in a third expansion mode based on a comparison result that the number of threads is greater than the number of database connection pools of the first server; The adjustment unit determines a first adjustment coefficient based on a comparison result that the third relative difference is less than or equal to a third preset relative difference. Adjust the number of threads, based on the comparison result that the third relative difference is greater than the third preset relative difference, determine the second adjustment coefficient Adjust the number of threads.

2. The dynamic switching system based on four-way cross-X-type optical fiber jumper according to claim 1 is characterized in that: The first data processing unit calculates the response efficiency evaluation value of the first server according to the following formula: , Wherein, P represents the response efficiency evaluation value, A represents the utilization rate of the database connection pool of the first server, A0 represents the utilization rate of the preset database connection pool of the first server, and B represents the number of requests waiting to obtain a database connection; The first data processing unit determines to monitor the load of the first server based on a comparison result that the response efficiency evaluation value of the first server is less than or equal to a preset response efficiency evaluation value.

3. The dynamic switching system based on four-way cross-X-type optical fiber jumper according to claim 2 is characterized in that: The second data processing unit determines to monitor the load of the first server in a first monitoring manner based on the comparison result that the first relative difference is less than or equal to a first preset relative difference. The first monitoring manner is to determine whether to expand the first server based on the sum of the CPU usage and memory usage of the first server.

4. The dynamic switching system based on four-way cross-X-type optical fiber jumper according to claim 3 is characterized in that: The second data processing unit determines to monitor the load of the first server in a second monitoring manner based on the comparison result that the first relative difference is greater than a first preset relative difference. The second monitoring manner is to determine whether to make an initial determination on the number of threads in the thread pool of the first server based on the usage rate of the database connection pool of the first server.

5. The dynamic switching system based on four-way cross-X-type optical fiber jumper according to claim 4, characterized in that: The second data processing unit determines to expand the first server based on the comparison result that the sum is greater than a preset sum.

6. The dynamic switching system based on four-way cross-X-type optical fiber jumper according to claim 5, characterized in that: The second data processing unit determines to make an initial determination on the number of threads in the thread pool of the first server based on a comparison result that the database connection pool usage rate of the first server is less than or equal to a preset database connection pool usage rate, and determines to expand the first server in a third expansion manner based on a comparison result that the database connection pool usage rate of the first server is greater than a preset database connection pool usage rate. The third expansion manner is to copy the hot data in the first server, the third server and the fourth server to the second server, and switch the hot data request waiting for obtaining a database connection to the second server.

7. The dynamic switching system based on four-way cross-X-type optical fiber jumper according to claim 6, characterized in that: The second data processing unit determines that the requested data is hot data based on a comparison result that the number of times the requested data is requested on the same day in the first server, the third server, and the fourth server is greater than a preset number of times the requested data is requested on the same day.

Citation Information

Patent Citations

  • Internal and external network isolation penetration design method

    CN110401635A

  • Short-distance interconnection network based on MPO optical fiber patch cord

    CN112804002A

  • Socket thread pool design method for multi-terminal wireless communication

    CN116755863A

  • Connection pools for parallel processing applications accessing distributed databases

    US20210200765A1

  • Devices for interconnecting nodes in a direct interconnect network

    WO2022096927A1