CN112291086A - A method, system and device for memory expansion of a switch - Google Patents

A method, system and device for memory expansion of a switch Download PDF

Info

Publication number
CN112291086A
CN112291086A CN202011112714.3A CN202011112714A CN112291086A CN 112291086 A CN112291086 A CN 112291086A CN 202011112714 A CN202011112714 A CN 202011112714A CN 112291086 A CN112291086 A CN 112291086A
Authority
CN
China
Prior art keywords
memory
capacity
expanded
switch
expansion
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011112714.3A
Other languages
Chinese (zh)
Inventor
刘小宽
王培辉
颜秉珩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202011112714.3A priority Critical patent/CN112291086A/en
Publication of CN112291086A publication Critical patent/CN112291086A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0896Bandwidth or capacity management, i.e. automatically increasing or decreasing capacities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • H04L49/9005Buffering arrangements using dynamic buffer space allocation

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Memory System (AREA)

Abstract

The invention discloses a method, a system and a device for expanding the memory of a switch, wherein the memory to be used and a standby memory are configured for the switch in advance; acquiring the capacity use condition of a memory to be used; automatically judging whether the memory to be used needs to be expanded according to the capacity use condition; if yes, automatically determining the capacity to be expanded of the memory to be used according to a preset expansion strategy, and automatically planning the memory with the same size as the capacity to be expanded from the standby memory to be used as the expansion capacity of the memory to be used. It can be seen that, this application can carry out the dilatation to the usable memory capacity of switch automatically when the usable memory capacity of switch is not enough, need not user manual operation to user's use experience has been promoted.

Description

Memory capacity expansion method, system and device of switch
Technical Field
The present invention relates to the field of memory capacity expansion, and in particular, to a method, a system, and an apparatus for expanding a memory of a switch.
Background
With the rapid Development of the internet, a Data Plane Development Kit (DPDK) mainly based on software optimization comes from time to time, which provides platform feasibility for the Development of cloud computing technology. At present, when a DPDK type switch is used in a cloud computing platform, the capacity of a Non Uniform Memory Access (NUMA) large page Memory needs to be manually set first, then the DPDK is configured to enable the set NUMA large page Memory, and then the DPDK type switch is created in a network pool for use.
With the increase of the service traffic, the capacity of the NUMA large-page memory initially configured for the DPDK type switch cannot continuously meet the user demand, which causes the network performance of the DPDK type switch to be blocked. In the prior art, generally, when the capacity of a NUMA large-page memory configured for a DPDK type switch cannot continuously meet the user requirement, the capacity of the NUMA large-page memory is manually increased on a memory setting interface to meet the user requirement, but the manual capacity expansion mode is complex to operate, and the user experience is affected.
Therefore, how to provide a solution to the above technical problem is a problem that needs to be solved by those skilled in the art.
Disclosure of Invention
The invention aims to provide a method, a system and a device for expanding the memory of a switch, which can automatically expand the available memory capacity of the switch without manual operation of a user when the available memory capacity of the switch is insufficient, thereby improving the use experience of the user.
In order to solve the above technical problem, the present invention provides a method for expanding a memory of a switch, including:
configuring a memory to be used and a standby memory for the switch in advance;
acquiring the capacity use condition of the memory to be used;
automatically judging whether the memory to be used needs to be expanded according to the capacity use condition;
if yes, automatically determining the capacity to be expanded of the memory to be used according to a preset expansion strategy, and automatically planning the memory with the same size as the capacity to be expanded from the standby memory to be used as the expansion capacity of the memory to be used.
Preferably, the process of obtaining the capacity usage of the memory to be used includes:
after the to-be-used memory is started, starting the cyclic detection of the capacity of the to-be-used memory to obtain the capacity use condition of the to-be-used memory;
dynamically adjusting the cycle detection time of the capacity of the memory to be used according to the capacity use change condition of the memory to be used so as to detect the capacity of the memory to be used according to the cycle detection time after the latest adjustment; wherein the faster the capacity of the memory to be used is used, the shorter the cycle detection time is.
Preferably, the capacity use condition of the memory to be used is obtained; the process of automatically judging whether the memory to be used needs capacity expansion according to the capacity use condition comprises the following steps:
acquiring the used capacity of the memory to be used;
calculating the proportion of the used capacity of the memory to be used to the current total capacity of the memory to be used; the current total capacity of the to-be-used memory is equal to the used capacity of the to-be-used memory plus the current remaining available capacity of the to-be-used memory;
judging whether the proportion exceeds a preset proportion threshold value or not;
if yes, determining that the memory to be used needs to be expanded;
and if not, determining that the memory to be used does not need to be expanded.
Preferably, the process of acquiring the current total capacity of the to-be-used memory includes:
determining the initial total capacity of the memory to be used in advance according to the initial configuration condition of the memory to be used, and taking the initial total capacity as the current total capacity of the memory to be used;
and after automatically planning a memory with the same size as the capacity to be expanded from the standby memory to be used as the expanded capacity of the memory to be used, adding the current total capacity of the memory to be used to the capacity to be expanded to obtain the current updated total capacity of the memory to be used.
Preferably, the process of automatically determining the capacity to be expanded of the memory to be used according to a preset expansion policy includes:
predicting the pre-used memory capacity of the switch in a certain period of time in the future according to the historical capacity use condition of the memory to be used;
and taking the capacity of the pre-used memory as the capacity to be expanded of the memory to be used.
Preferably, the process of predicting the pre-used memory capacity of the switch in a certain period of time in the future according to the historical capacity usage of the memory to be used includes:
a deep learning model for predicting the pre-used memory capacity of the switch within a certain period of time in the future according to the historical capacity use condition of the memory to be used is established and trained in advance;
after the historical capacity use condition of the memory to be used is obtained, the historical capacity use condition of the memory to be used is input into the deep learning model, and the pre-used memory capacity of the switch in a certain period of time in the future is obtained.
In order to solve the above technical problem, the present invention further provides a memory capacity expansion system of a switch, including:
the memory configuration module is used for configuring a memory to be used and a standby memory for the switch in advance;
the capacity acquisition module is used for acquiring the capacity use condition of the memory to be used;
the capacity expansion judging module is used for automatically judging whether the memory to be used needs capacity expansion according to the capacity use condition; if yes, issuing a capacity expansion instruction;
and the memory capacity expansion module is used for automatically determining the capacity to be expanded of the memory to be used according to a preset capacity expansion strategy after receiving the capacity expansion instruction, and automatically planning the memory with the same size as the capacity to be expanded from the standby memory to be used as the expansion capacity of the memory to be used.
Preferably, the capacity obtaining module is specifically configured to:
after the to-be-used memory is started, starting the cyclic detection of the capacity of the to-be-used memory to obtain the capacity use condition of the to-be-used memory;
dynamically adjusting the cycle detection time of the capacity of the memory to be used according to the capacity use change condition of the memory to be used so as to detect the capacity of the memory to be used according to the cycle detection time after the latest adjustment; wherein the faster the capacity of the memory to be used is used, the shorter the cycle detection time is.
Preferably, the memory capacity expansion module is specifically configured to:
predicting the pre-used memory capacity of the switch in a certain period of time in the future according to the historical capacity use condition of the memory to be used;
and taking the capacity of the pre-used memory as the capacity to be expanded of the memory to be used, and automatically planning the memory with the same size as the capacity to be expanded from the standby memory to be used as the expanded capacity of the memory to be used.
In order to solve the above technical problem, the present invention further provides a memory capacity expansion device for a switch, including:
a memory for storing a computer program;
and the processor is used for realizing the steps of the memory capacity expansion method of any switch when executing the computer program.
The invention provides a memory capacity expansion method of a switch, which is characterized in that a memory to be used and a standby memory are configured for the switch in advance; acquiring the capacity use condition of a memory to be used; automatically judging whether the memory to be used needs to be expanded according to the capacity use condition; if yes, automatically determining the capacity to be expanded of the memory to be used according to a preset expansion strategy, and automatically planning the memory with the same size as the capacity to be expanded from the standby memory to be used as the expansion capacity of the memory to be used. It can be seen that, this application can carry out the dilatation to the usable memory capacity of switch automatically when the usable memory capacity of switch is not enough, need not user manual operation to user's use experience has been promoted.
The invention also provides a memory capacity expansion system and device of the switch, and the memory capacity expansion system and device have the same beneficial effects as the memory capacity expansion method.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed in the prior art and the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a flowchart of a method for expanding a memory of a switch according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a memory expansion system of a switch according to an embodiment of the present invention.
Detailed Description
The core of the invention is to provide a method, a system and a device for expanding the memory of the switch, which can automatically expand the available memory capacity of the switch without manual operation of a user when the available memory capacity of the switch is insufficient, thereby improving the user experience.
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for expanding a memory of a switch according to an embodiment of the present invention.
The memory capacity expansion method of the switch comprises the following steps:
step S1: and configuring a memory to be used and a standby memory for the switch in advance.
Specifically, on one hand, the method configures a memory to be used for the switch in advance for the switch to use when the switch works; on the other hand, the method and the device configure the standby memory for the switch in advance for capacity expansion when the capacity of the memory to be used is insufficient.
It can be understood that, in the present application, a spare memory with a relatively sufficient capacity needs to be configured for the switch, so as to successfully expand the capacity in the following.
Step S2: and acquiring the capacity use condition of the memory to be used.
Specifically, according to the method and the device, after the to-be-used memory is started, the capacity of the to-be-used memory is automatically and circularly detected, the used capacity and the remaining available capacity of the to-be-used memory can be known, and therefore the capacity use condition of the to-be-used memory is obtained, and a basis is provided for subsequently judging whether the capacity of the to-be-used memory needs to be expanded or not.
Step S3: automatically judging whether the memory to be used needs to be expanded according to the capacity use condition; if yes, go to step S4.
Specifically, the capacity usage condition of the to-be-used memory can show whether the remaining available capacity of the to-be-used memory is sufficient, and it can be understood that when the remaining available capacity of the to-be-used memory is insufficient, the to-be-used memory needs to be expanded, so that the application can automatically judge whether the to-be-used memory needs to be expanded according to the capacity usage condition of the to-be-used memory, and if the to-be-used memory needs to be expanded, the capacity expansion operation of the to-be-used memory is executed; if the to-be-used memory does not need to be expanded, the expansion operation of the to-be-used memory does not need to be executed.
Step S4: and automatically determining the capacity to be expanded of the memory to be used according to a preset expansion strategy, and automatically planning the memory with the same size as the capacity to be expanded from the standby memory to be used as the expansion capacity of the memory to be used.
It should be noted that the preset of the present application is set in advance, and only needs to be set once, and the reset is not needed unless the modification is needed according to the actual situation.
Specifically, the expansion principle of the memory to be used specifically is as follows: the method comprises the steps of setting a capacity expansion strategy for acquiring the capacity to be expanded of the memory to be used in advance, when the capacity to be expanded of the memory to be used needs to be expanded, automatically determining the capacity to be expanded of the memory to be used according to the preset capacity expansion strategy, and then automatically planning the memory with the same size as the capacity to be expanded of the memory to be used from the standby memory.
The invention provides a memory capacity expansion method of a switch, which is characterized in that a memory to be used and a standby memory are configured for the switch in advance; acquiring the capacity use condition of a memory to be used; automatically judging whether the memory to be used needs to be expanded according to the capacity use condition; if yes, automatically determining the capacity to be expanded of the memory to be used according to a preset expansion strategy, and automatically planning the memory with the same size as the capacity to be expanded from the standby memory to be used as the expansion capacity of the memory to be used. It can be seen that, this application can carry out the dilatation to the usable memory capacity of switch automatically when the usable memory capacity of switch is not enough, need not user manual operation to user's use experience has been promoted.
On the basis of the above-described embodiment:
as an optional embodiment, the process of obtaining the capacity usage of the memory to be used includes:
after the memory to be used is started, starting the cyclic detection of the capacity of the memory to be used to obtain the capacity use condition of the memory to be used;
dynamically adjusting the cycle detection time of the capacity of the memory to be used according to the capacity use change condition of the memory to be used so as to detect the capacity of the memory to be used according to the cycle detection time after the latest adjustment; wherein, the faster the capacity of the memory to be used is used, the shorter the cycle detection time.
Specifically, after the to-be-used memory is started, the automatic cycle detection of the capacity of the to-be-used memory is started so as to obtain the capacity use condition of the to-be-used memory. It can be understood that, if the capacity of the to-be-used memory is used slowly, the present application does not need to scan and detect the capacity of the to-be-used memory once every short time, the power consumption is large, and only when the capacity of the to-be-used memory is used quickly, the capacity of the to-be-used memory needs to be scanned and detected once every short time, and the shortage of the capacity of the to-be-used memory is known.
Based on the above, the method dynamically adjusts the cycle detection time of the capacity of the memory to be used according to the capacity use change condition of the memory to be used, specifically, when the capacity use of the memory to be used is slowed down, the cycle detection time of the capacity of the memory to be used is prolonged, so that the purpose is to scan and detect the capacity of the memory to be used once at a longer time interval; when the capacity of the memory to be used is used more quickly, the cyclic detection time of the capacity of the memory to be used is shortened, and the purpose is to scan and detect the capacity of the memory to be used once at shorter time intervals.
As an optional embodiment, acquiring a capacity use condition of a memory to be used; the process of automatically judging whether the memory to be used needs capacity expansion according to the capacity use condition comprises the following steps:
acquiring the used capacity of a memory to be used;
calculating the proportion of the used capacity of the memory to be used to the current total capacity of the memory to be used; the current total capacity of the to-be-used memory is equal to the used capacity of the to-be-used memory plus the current remaining available capacity of the to-be-used memory;
judging whether the proportion exceeds a preset proportion threshold value or not;
if yes, determining that the memory to be used needs to be expanded;
if not, determining that the memory to be used does not need to be expanded.
Specifically, the capacity use condition of the memory to be used is obtained, specifically, the used capacity of the memory to be used is obtained (cycle detection time dynamic adjustment), and the used capacity of the memory to be used is divided by the current total capacity of the memory to be used, so that the proportion of the used capacity of the memory to be used to the current total capacity of the memory to be used is obtained, and the capacity use condition of the memory to be used is reflected by the proportion of the used capacity of the memory to be used to the current total capacity of the memory to be used.
It can be understood that, the higher the proportion of the used capacity of the memory to be used to the current total capacity of the memory to be used is, the lower the current remaining available capacity of the memory to be used is, and when the current remaining available capacity of the memory to be used is insufficient, the capacity of the memory to be used needs to be expanded, so the application sets a proportion threshold in advance, and considers that: when the proportion of the used capacity of the to-be-used memory to the current total capacity of the to-be-used memory exceeds a preset proportion threshold, the current residual available capacity of the to-be-used memory is too small, and the capacity expansion of the to-be-used memory is necessary; when the proportion of the used capacity of the memory to be used to the current total capacity of the memory to be used does not exceed the preset proportion threshold, the current remaining available capacity of the memory to be used is enough to be used, and the capacity expansion of the memory to be used is not needed.
Based on this, after obtaining the proportion of the used capacity of the memory to be used to the current total capacity of the memory to be used, the method compares the proportion value with a preset proportion threshold value, and if the proportion value exceeds the preset proportion threshold value, the memory to be used is determined to need capacity expansion; and if the proportion value does not exceed the preset proportion threshold value, determining that the capacity of the memory to be used does not need to be expanded.
As an alternative embodiment, the process of obtaining the current total capacity of the to-be-used memory includes:
determining the initial total capacity of the memory to be used in advance according to the initial configuration condition of the memory to be used, and taking the initial total capacity as the current total capacity of the memory to be used;
after the memory with the same size as the capacity to be expanded is automatically planned from the standby memory to be used as the expanded capacity of the memory to be used, the current total capacity of the memory to be used is added with the capacity to be expanded to obtain the current updated total capacity of the memory to be used.
Specifically, after the capacity of the memory to be used is expanded, the total capacity of the memory to be used (the used capacity of the memory to be used + the remaining available capacity of the memory to be used) changes, and it can be understood that, when the ratio of the used capacity of the memory to be used to the current total capacity of the memory to be used is obtained, the current total capacity of the memory to be used needs to be updated according to an actual situation, so as to obtain a real ratio of the used capacity of the memory to be used to the current total capacity of the memory to be used.
Based on this, the initial total capacity of the memory to be used is determined in advance according to the initial configuration condition of the memory to be used, that is, when the memory to be used is not expanded, the initial total capacity of the memory to be used is the current total capacity of the memory to be used. After the memory with the same size as the capacity to be expanded is automatically planned from the standby memory to be used as the expanded capacity of the memory to be used, the current total capacity of the memory to be used plus the capacity to be expanded is the current total capacity of the memory to be used, and if the memory with the same size as the capacity to be expanded is automatically planned from the standby memory to be used as the expanded capacity of the memory to be used subsequently, the current total capacity of the memory to be used is the current total capacity of the memory to be used plus the capacity to be expanded, so that the current updated total capacity of the memory to be used is obtained.
As an optional embodiment, the process of automatically determining the capacity to be expanded of the memory to be used according to the preset expansion policy includes:
predicting the pre-used memory capacity of the switch in a certain period of time in the future according to the historical capacity use condition of the memory to be used;
and taking the capacity of the pre-used memory as the capacity to be expanded of the memory to be used.
Specifically, considering that the traffic flow corresponding to some switches is large and the capacity of the to-be-used memory corresponding to the switches is used more, when the to-be-used memories corresponding to the switches are expanded, the capacity of the memories is expanded as much as possible, so as to avoid frequent expansion of the to-be-used memories. Based on this, according to the historical capacity use condition of the to-be-used memory, the pre-used memory capacity of the switch in a certain period of time in the future, namely the to-be-expanded capacity of the to-be-used memory, can be predicted, specifically, the more capacity use in the past certain period of time exists in the to-be-used memory, the greater the capacity requirement of the switch in the certain period of time in the future is considered, namely, the greater the to-be-expanded capacity of the to-be-used memory is, and therefore the capacity expansion of the to-be-used memory is more reasonably performed.
As an alternative embodiment, the process of predicting the pre-used memory capacity of the switch in a certain period of time in the future according to the historical capacity usage of the memory to be used includes:
a deep learning model for predicting the pre-used memory capacity of the switch in a certain period of time in the future according to the historical capacity use condition of the memory to be used is established and trained in advance;
after the historical capacity use condition of the memory to be used is obtained, the historical capacity use condition of the memory to be used is input into the deep learning model, and the pre-used memory capacity of the switch in a certain period of time in the future is obtained.
Specifically, the method can predict the pre-used memory capacity of the switch within a certain time period in the future by adopting a deep learning algorithm, specifically, a deep learning model which is established in advance and trained and used for predicting the pre-used memory capacity of the switch within the certain time period in the future according to the historical capacity use condition of the memory to be used is established and trained, the historical capacity use condition of the memory to be used is used as the input of the deep learning model, and the output of the deep learning model is the pre-used memory capacity of the switch within the certain time period in the future.
It can be understood that, when the historical capacity usage of the to-be-used memory changes, the predicted pre-used memory capacity of the switch in a certain period of time in the future also changes, so that the dynamic adjustment of the to-be-expanded capacity of the to-be-used memory is realized.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a memory capacity expansion system of a switch according to an embodiment of the present invention.
The memory capacity expansion system of the switch comprises:
the memory configuration module 1 is used for configuring a memory to be used and a standby memory for the switch in advance;
the capacity obtaining module 2 is used for obtaining the capacity use condition of the memory to be used;
the capacity expansion judging module 3 is used for automatically judging whether the memory to be used needs capacity expansion according to the capacity use condition; if yes, issuing a capacity expansion instruction;
and the memory capacity expansion module 4 is used for automatically determining the capacity to be expanded of the memory to be used according to a preset capacity expansion strategy after receiving a capacity expansion instruction, and automatically planning the memory with the same size as the capacity to be expanded from the standby memory to be used as the expansion capacity of the memory to be used.
As an optional embodiment, the capacity obtaining module 2 is specifically configured to:
after the memory to be used is started, starting the cyclic detection of the capacity of the memory to be used to obtain the capacity use condition of the memory to be used;
dynamically adjusting the cycle detection time of the capacity of the memory to be used according to the capacity use change condition of the memory to be used so as to detect the capacity of the memory to be used according to the cycle detection time after the latest adjustment; wherein, the faster the capacity of the memory to be used is used, the shorter the cycle detection time.
As an optional embodiment, the memory capacity expansion module 4 is specifically configured to:
predicting the pre-used memory capacity of the switch in a certain period of time in the future according to the historical capacity use condition of the memory to be used;
the capacity of the pre-used memory is used as the capacity to be expanded of the memory to be used, and the memory with the same size as the capacity to be expanded is automatically planned from the standby memory to be used as the expanded capacity of the memory to be used.
For introduction of the memory capacity expansion system provided in the present application, reference is made to the above-mentioned embodiment of the memory capacity expansion method, and details of the present application are not repeated herein.
The present application further provides a memory capacity expansion device of a switch, including:
a memory for storing a computer program;
and the processor is used for realizing the steps of the memory capacity expansion method of any switch when executing the computer program.
For introduction of the memory capacity expansion device provided in the present application, reference is made to the above-mentioned embodiment of the memory capacity expansion method, and details of the memory capacity expansion device are not described herein again.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1.一种交换机的内存扩容方法,其特征在于,包括:1. a memory expansion method of a switch, characterized in that, comprising: 预先为交换机配置待使用内存和备用内存;Configure the memory to be used and spare memory for the switch in advance; 获取所述待使用内存的容量使用情况;Obtain the capacity usage of the memory to be used; 根据所述容量使用情况自动判断所述待使用内存是否需要扩容;Automatically determine whether the to-be-used memory needs to be expanded according to the capacity usage; 若是,则根据预设扩容策略自动确定所述待使用内存的待扩充容量,并从所述备用内存中自动规划出与所述待扩充容量大小相同的内存作为所述待使用内存的扩充容量使用。If so, the to-be-expanded capacity of the to-be-used memory is automatically determined according to the preset capacity expansion strategy, and a memory with the same size as the to-be-expanded capacity is automatically planned from the spare memory to be used as the expanded capacity of the to-be-used memory. . 2.如权利要求1所述的交换机的内存扩容方法,其特征在于,获取所述待使用内存的容量使用情况的过程,包括:2. The memory capacity expansion method of the switch according to claim 1, wherein the process of acquiring the capacity usage of the memory to be used comprises: 在所述待使用内存被启用后,启动对所述待使用内存的容量的循环检测,得到所述待使用内存的容量使用情况;After the to-be-used memory is enabled, cyclic detection of the capacity of the to-be-used memory is started to obtain the capacity usage of the to-be-used memory; 根据所述待使用内存的容量使用变化情况,动态调整对所述待使用内存的容量的循环检测时间,以根据最新调整后的循环检测时间检测所述待使用内存的容量;其中,所述待使用内存的容量使用越快,所述循环检测时间越短。Dynamically adjust the cycle detection time for the capacity of the to-be-used memory according to the usage change of the capacity of the to-be-used memory, so as to detect the capacity of the to-be-used memory according to the latest adjusted cycle detection time; The faster the capacity of the used memory is used, the shorter the cycle detection time. 3.如权利要求1所述的交换机的内存扩容方法,其特征在于,获取所述待使用内存的容量使用情况;根据所述容量使用情况自动判断所述待使用内存是否需要扩容的过程,包括:3. The memory capacity expansion method of the switch according to claim 1, wherein the capacity usage of the to-be-used memory is obtained; the process of automatically judging whether the to-be-used memory needs to be expanded according to the capacity usage, comprising: : 获取所述待使用内存的已使用容量;Obtain the used capacity of the memory to be used; 求取所述待使用内存的已使用容量占所述待使用内存当前的总容量的比例;其中,所述待使用内存当前的总容量=所述待使用内存的已使用容量+所述待使用内存当前的剩余可用容量;Obtain the ratio of the used capacity of the to-be-used memory to the current total capacity of the to-be-used memory; wherein, the current total capacity of the to-be-used memory=the used capacity of the to-be-used memory+the to-be-used memory The current remaining available capacity of the memory; 判断所述比例是否超过预设比例阈值;judging whether the ratio exceeds a preset ratio threshold; 若是,则确定所述待使用内存需要扩容;If so, determine that the memory to be used needs to be expanded; 若否,则确定所述待使用内存无需扩容。If not, it is determined that the to-be-used memory does not need to be expanded. 4.如权利要求3所述的交换机的内存扩容方法,其特征在于,所述待使用内存当前的总容量的获取过程,包括:4. The memory capacity expansion method of the switch as claimed in claim 3, wherein the acquisition process of the current total capacity of the memory to be used comprises: 预先根据所述待使用内存的初始配置情况,确定所述待使用内存的初始总容量,并将所述初始总容量作为所述待使用内存当前的总容量;Determine the initial total capacity of the to-be-used memory in advance according to the initial configuration of the to-be-used memory, and use the initial total capacity as the current total capacity of the to-be-used memory; 在从所述备用内存中自动规划出与所述待扩充容量大小相同的内存作为所述待使用内存的扩充容量使用后,将所述待使用内存当前的总容量加上所述待扩充容量,得到所述待使用内存当前更新后的总容量。After the memory with the same size as the to-be-expanded capacity is automatically planned from the spare memory to be used as the expanded capacity of the to-be-used memory, the current total capacity of the to-be-used memory is added to the to-be-expanded capacity, Obtain the current updated total capacity of the to-be-used memory. 5.如权利要求1-4任一项所述的交换机的内存扩容方法,其特征在于,根据预设扩容策略自动确定所述待使用内存的待扩充容量的过程,包括:5. The method for expanding the memory capacity of a switch according to any one of claims 1-4, wherein the process of automatically determining the to-be-expanded capacity of the to-be-used memory according to a preset capacity expansion strategy comprises: 根据所述待使用内存的历史容量使用情况,预测所述交换机在未来一定时间段内的预使用内存容量;predicting the pre-used memory capacity of the switch within a certain period of time in the future according to the historical capacity usage of the to-be-used memory; 将所述预使用内存容量作为所述待使用内存的待扩充容量。The pre-used memory capacity is used as the to-be-expanded capacity of the to-be-used memory. 6.如权利要求5所述的交换机的内存扩容方法,其特征在于,根据所述待使用内存的历史容量使用情况,预测所述交换机在未来一定时间段内的预使用内存容量的过程,包括:6. The memory capacity expansion method of a switch according to claim 5, wherein, according to the historical capacity usage of the to-be-used memory, the process of predicting the pre-used memory capacity of the switch in a certain period of time in the future, comprising: : 预先建立并训练好用于根据所述待使用内存的历史容量使用情况预测出所述交换机在未来一定时间段内的预使用内存容量的深度学习模型;Pre-established and trained a deep learning model for predicting the pre-used memory capacity of the switch within a certain period of time in the future according to the historical capacity usage of the to-be-used memory; 在获取所述待使用内存的历史容量使用情况之后,将所述待使用内存的历史容量使用情况输入至所述深度学习模型,得到所述交换机在未来一定时间段内的预使用内存容量。After acquiring the historical capacity usage of the memory to be used, the historical capacity usage of the to-be-used memory is input into the deep learning model to obtain the pre-used memory capacity of the switch in a certain period of time in the future. 7.一种交换机的内存扩容系统,其特征在于,包括:7. A memory capacity expansion system of a switch, characterized in that, comprising: 内存配置模块,用于预先为交换机配置待使用内存和备用内存;The memory configuration module is used to pre-configure the memory to be used and the spare memory for the switch; 容量获取模块,用于获取所述待使用内存的容量使用情况;a capacity acquisition module, configured to acquire the capacity usage of the memory to be used; 扩容判断模块,用于根据所述容量使用情况自动判断所述待使用内存是否需要扩容;若是,则下发扩容指令;A capacity expansion judgment module, configured to automatically judge whether the to-be-used memory needs to be expanded according to the capacity usage; if so, issue a capacity expansion instruction; 内存扩容模块,用于在接收到所述扩容指令后,根据预设扩容策略自动确定所述待使用内存的待扩充容量,并从所述备用内存中自动规划出与所述待扩充容量大小相同的内存作为所述待使用内存的扩充容量使用。The memory expansion module is used to automatically determine the to-be-expanded capacity of the to-be-used memory according to the preset capacity expansion strategy after receiving the capacity-expansion instruction, and automatically plan the same size as the to-be-expanded capacity from the spare memory The memory is used as the expansion capacity of the memory to be used. 8.如权利要求7所述的交换机的内存扩容系统,其特征在于,所述容量获取模块具体用于:8. The memory capacity expansion system of the switch according to claim 7, wherein the capacity acquisition module is specifically used for: 在所述待使用内存被启用后,启动对所述待使用内存的容量的循环检测,得到所述待使用内存的容量使用情况;After the to-be-used memory is enabled, cyclic detection of the capacity of the to-be-used memory is started to obtain the capacity usage of the to-be-used memory; 根据所述待使用内存的容量使用变化情况,动态调整对所述待使用内存的容量的循环检测时间,以根据最新调整后的循环检测时间检测所述待使用内存的容量;其中,所述待使用内存的容量使用越快,所述循环检测时间越短。Dynamically adjust the cycle detection time for the capacity of the to-be-used memory according to the usage change of the capacity of the to-be-used memory, so as to detect the capacity of the to-be-used memory according to the latest adjusted cycle detection time; The faster the capacity of the used memory is used, the shorter the cycle detection time. 9.如权利要求7-8任一项所述的交换机的内存扩容系统,其特征在于,所述内存扩容模块具体用于:9. The memory capacity expansion system of the switch according to any one of claims 7-8, wherein the memory capacity expansion module is specifically used for: 根据所述待使用内存的历史容量使用情况,预测所述交换机在未来一定时间段内的预使用内存容量;predicting the pre-used memory capacity of the switch within a certain period of time in the future according to the historical capacity usage of the to-be-used memory; 将所述预使用内存容量作为所述待使用内存的待扩充容量,并从所述备用内存中自动规划出与所述待扩充容量大小相同的内存作为所述待使用内存的扩充容量使用。The pre-used memory capacity is used as the to-be-expanded capacity of the to-be-used memory, and a memory of the same size as the to-be-expanded capacity is automatically planned from the spare memory to be used as the expanded capacity of the to-be-used memory. 10.一种交换机的内存扩容装置,其特征在于,包括:10. A memory capacity expansion device of a switch, characterized in that, comprising: 存储器,用于存储计算机程序;memory for storing computer programs; 处理器,用于在执行所述计算机程序时实现如权利要求1-6任一项所述的交换机的内存扩容方法的步骤。The processor is configured to implement the steps of the memory capacity expansion method of the switch according to any one of claims 1-6 when executing the computer program.
CN202011112714.3A 2020-10-16 2020-10-16 A method, system and device for memory expansion of a switch Pending CN112291086A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011112714.3A CN112291086A (en) 2020-10-16 2020-10-16 A method, system and device for memory expansion of a switch

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011112714.3A CN112291086A (en) 2020-10-16 2020-10-16 A method, system and device for memory expansion of a switch

Publications (1)

Publication Number Publication Date
CN112291086A true CN112291086A (en) 2021-01-29

Family

ID=74496385

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011112714.3A Pending CN112291086A (en) 2020-10-16 2020-10-16 A method, system and device for memory expansion of a switch

Country Status (1)

Country Link
CN (1) CN112291086A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112988071A (en) * 2021-03-15 2021-06-18 中国建设银行股份有限公司 Distributed storage capacity expansion method and device, storage medium and equipment
CN114020416A (en) * 2021-11-16 2022-02-08 湖南麒麟信安科技股份有限公司 Large page memory dynamic management method, apparatus and computer equipment
WO2022170769A1 (en) * 2021-02-10 2022-08-18 华为技术有限公司 Communication method, apparatus, and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104182350A (en) * 2013-05-28 2014-12-03 中国银联股份有限公司 Memory management method and device aiming at application containing multiple processes
CN105607868A (en) * 2015-12-14 2016-05-25 华为数字技术(成都)有限公司 Method and apparatus for capacity expansion of storage array
CN109885469A (en) * 2019-02-27 2019-06-14 深信服科技股份有限公司 A kind of expansion method, prediction model creation method, device, equipment and medium
CN111459673A (en) * 2020-03-31 2020-07-28 支付宝(杭州)信息技术有限公司 Secure memory expansion and release method and device and electronic equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104182350A (en) * 2013-05-28 2014-12-03 中国银联股份有限公司 Memory management method and device aiming at application containing multiple processes
CN105607868A (en) * 2015-12-14 2016-05-25 华为数字技术(成都)有限公司 Method and apparatus for capacity expansion of storage array
CN109885469A (en) * 2019-02-27 2019-06-14 深信服科技股份有限公司 A kind of expansion method, prediction model creation method, device, equipment and medium
CN111459673A (en) * 2020-03-31 2020-07-28 支付宝(杭州)信息技术有限公司 Secure memory expansion and release method and device and electronic equipment

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022170769A1 (en) * 2021-02-10 2022-08-18 华为技术有限公司 Communication method, apparatus, and system
CN112988071A (en) * 2021-03-15 2021-06-18 中国建设银行股份有限公司 Distributed storage capacity expansion method and device, storage medium and equipment
CN112988071B (en) * 2021-03-15 2024-05-24 中国建设银行股份有限公司 Distributed storage capacity expansion method, device, storage medium and equipment
CN114020416A (en) * 2021-11-16 2022-02-08 湖南麒麟信安科技股份有限公司 Large page memory dynamic management method, apparatus and computer equipment

Similar Documents

Publication Publication Date Title
CN112291086A (en) A method, system and device for memory expansion of a switch
TWI683306B (en) Control method of multi voice assistant
CN106507445B (en) Wireless fidelity Wi-Fi scanning method and mobile terminal
CN110493091A (en) A kind of control method and device of smart home device
CN104750520B (en) A software installation method and terminal
CN205038456U (en) Control device of household appliance
US20170055208A1 (en) Method and apparatus for reducing power consumption, and mobile terminal
CN111973077A (en) Sweeping method and device of sweeper, sweeper and storage medium
CN113096658A (en) Terminal equipment, awakening method and device thereof and computer readable storage medium
CN111400039A (en) Control method and device of cloud platform, cloud platform system and electronic equipment
CN106055075B (en) A sensor closing method and device
CN114724558A (en) Method and device for voice control of air conditioner, air conditioner, storage medium
CN111813535A (en) Resource configuration determining method and device and electronic equipment
CN114461394A (en) A CPU resource scaling control method, device, device and storage medium
CN113628621A (en) A method, system and device for realizing wake-up of equipment nearby
CN109974229B (en) Method and device for determining air conditioner state, electronic equipment and storage medium
CN115425733B (en) Charging control method and device, solar charging controller and storage medium
CN107682409B (en) Cluster resource pre-stretching method and device
CN110811436B (en) Dust collection method and device, electrical equipment and computer readable storage medium
CN111757444A (en) Base station dormancy method, device, equipment and medium suitable for 5G scene
CN112346372B (en) Voice output control method and device and storage medium
CN104601810A (en) Terminal
CN108984344B (en) Method, device and equipment for dynamically generating snapshot and storage medium
CN110970924A (en) Clean energy consumption method and device for power grid generator set
CN115312049B (en) Instruction response method, storage medium and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20210129

RJ01 Rejection of invention patent application after publication