WO2017000673A1 - 一种共享缓存分配方法、装置及计算机存储介质 - Google Patents

一种共享缓存分配方法、装置及计算机存储介质 Download PDF

Info

Publication number
WO2017000673A1
WO2017000673A1 PCT/CN2016/081593 CN2016081593W WO2017000673A1 WO 2017000673 A1 WO2017000673 A1 WO 2017000673A1 CN 2016081593 W CN2016081593 W CN 2016081593W WO 2017000673 A1 WO2017000673 A1 WO 2017000673A1
Authority
WO
WIPO (PCT)
Prior art keywords
space
cache space
queue
dynamic
cache
Prior art date
Application number
PCT/CN2016/081593
Other languages
English (en)
French (fr)
Inventor
王莉
Original Assignee
深圳市中兴微电子技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市中兴微电子技术有限公司 filed Critical 深圳市中兴微电子技术有限公司
Publication of WO2017000673A1 publication Critical patent/WO2017000673A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/52Queue scheduling by attributing bandwidth to queues
    • H04L47/522Dynamic queue service slot or variable bandwidth allocation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/23Bit dropping
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • H04L47/2425Traffic characterised by specific attributes, e.g. priority or QoS for supporting services specification, e.g. SLA
    • H04L47/2433Allocation of priorities to traffic types

Definitions

  • the present invention relates to the field of QoS (Quality of Service), and in particular, to a shared cache allocation method, apparatus, and computer storage medium.
  • QoS Quality of Service
  • the random early discarding technique is one of the network congestion control methods, and its purpose is to perform early discarding before the data overflows the buffer space, thereby avoiding buffer overflow and causing a large number of consecutive packet drops.
  • the principle of random early discarding is to predict the congestion of the buffer space in advance by calculating the cache occupancy of the queue.
  • the shared cache management uses a multiplication algorithm to dynamically estimate the shared space (the number of queue activations is multiplied by the cache occupancy of the current queue) to obtain an estimated value, and then compares the estimated value with the discarding threshold (including a low threshold and a high threshold); If the value is less than the low threshold, no discarding operation is performed; if the estimated value is between the low threshold and the high threshold, the newly added data packet is randomly discarded according to the preset discard probability table. When the estimated value is higher than the high threshold, the newly added data packet is completely discarded.
  • the prior art is a fair sharing technology, and users who enter the shared fair enjoy the cache, which inevitably causes some users to use up the cache, while other users have the waste of remaining cache. Moreover, the prior art does not consider the differential treatment of priority users, and does not guarantee the high priority users' services.
  • a priority-based shared cache management method is proposed, that is, the shared cache is divided into different buffer areas according to priorities, and each priority buffer area can store all queues under the priority level.
  • High-priority queues can occupy all priority caches below their priority.
  • This method implements priority-based quality of service, but the drawback is that the cache utilization is too low. If the high-priority queue network has a small load, the low-priority load will greatly waste the cache.
  • the embodiments of the present invention are intended to provide a shared cache allocation method, apparatus, and computer storage medium, which are intended to solve the problem of low cache utilization in the prior art.
  • An embodiment of the present invention provides a shared cache allocation method, where the method includes:
  • the pre-configured shared cache space is a static cache space and a dynamic cache space
  • the queue When a queue is added, and the storage space of the static cache space satisfies the first preset condition, the queue is controlled to initiate a dynamic cache space request;
  • the cache space in the dynamic cache space is allocated to the queue according to the pre-configured adjustment coefficient of the queue.
  • the storage space of the static cache space meets a first preset condition, including:
  • the estimated value of the storage space of the static cache space is equal to the product of the number of active queues in the static cache space and the queue cache depth.
  • the determining that the dynamic cache space request of the queue meets a second preset condition includes:
  • the space application satisfies the second preset condition.
  • the pre-configured adjustment coefficient according to the queue allocates a cache space in the dynamic cache space to the queue, including:
  • the method further includes:
  • the cache space in the dynamic cache space allocated for the queue is occupied by the queue, the cache space in the static cache space is newly allocated for the new enqueue.
  • the embodiment of the present invention further provides a shared cache allocation device, where the device includes: a configuration unit, a first processing unit, and a second processing unit;
  • the configuration unit is configured to pre-configure the shared cache space as a static cache space and a dynamic cache space;
  • the first processing unit is configured to control the queue to initiate a dynamic cache space request when a queue is added, and the storage space of the static cache space meets a first preset condition;
  • the second processing unit is configured to determine that the dynamic cache space request of the queue initiated by the first processing unit meets a second preset condition, and allocate the The cache space in the dynamic cache space.
  • the first processing unit is configured to compare whether an estimated value of the storage space of the static cache space is greater than or equal to a first threshold, and obtain a comparison result; when the comparison result is the static cache space When the estimated value of the storage space is greater than or equal to the first threshold, determining that the storage space of the static cache space satisfies a first preset condition; wherein an estimated value of the storage space of the static cache space is equal to activation in the static cache space Number of queues and queues The product of the depth.
  • the second processing unit is configured to determine whether the priority of the queue meets a preset priority threshold, and whether the remaining storage space of the dynamic cache space is greater than a second threshold, and obtain a determination result;
  • the second threshold is a minimum allocation step size of the dynamic cache space; when the judgment result is that the priority of the queue meets a preset priority threshold, and the remaining storage space of the dynamic cache space is greater than
  • the threshold is two, it is determined that the dynamic cache space request of the queue satisfies the second preset condition.
  • the second processing unit is configured to allocate, according to the adjustment coefficient ⁇ and a minimum allocation step size ⁇ h of a storage space of the dynamic cache space, a cache in the dynamic cache space for the queue.
  • the space ⁇ L; the adjustment coefficient ⁇ is a non-negative integer; ⁇ h is a positive integer; wherein ⁇ L ⁇ h.
  • the second processing unit is further configured to trigger the first processing unit to be new after the cache space in the dynamic cache space allocated by the queue is occupied by the queue. Enqueue allocates cache space in the static cache space.
  • the embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the shared cache allocation method according to the embodiment of the invention.
  • the pre-configured shared cache space is a static cache space and a dynamic cache space; when a queue is added, the storage space of the static cache space is satisfied.
  • the queue is controlled to initiate a dynamic cache space request; and when the dynamic cache space request of the queue is determined to meet the second preset condition, the queue is allocated according to the pre-configured adjustment coefficient of the queue.
  • the cache space in the dynamic cache space is configured as a priority-based dynamic cache adjustment area, and the dynamic cache space can perform priority-based dynamic cache allocation and release in a network congestion scenario.
  • the application and release of the dynamic cache space are implemented for services with different cache requirements, which increases the utilization of the shared cache space and enhances the adaptability of the system to dynamic changes of the network.
  • the dynamic cache space can be prioritized.
  • the dynamic allocation of the level enables the shared cache space to better serve the high-priority service, which greatly improves the service quality of the network.
  • the dynamic cache space in the embodiment of the present invention only involves part of the space of the shared cache space. The complexity of the design is reduced, and at the same time, the buffer waste is caused by prioritizing all caches in the prior art.
  • FIG. 1 is a schematic flowchart of a shared cache allocation method according to Embodiment 1 of the present invention.
  • FIG. 2 is a schematic diagram of an application of a shared cache space according to an embodiment of the present invention.
  • FIG. 3 is a schematic diagram of an application scenario of a dynamic cache space according to an embodiment of the present invention.
  • FIG. 4 is a schematic flowchart of a shared cache allocation method according to Embodiment 2 of the present invention.
  • FIG. 5 is a schematic structural diagram of a structure of a shared cache allocation apparatus according to Embodiment 3 of the present invention.
  • FIG. 6 is a schematic diagram of another composition structure of a shared cache allocation apparatus according to Embodiment 3 of the present invention.
  • the embodiment of the invention provides a shared cache allocation method.
  • 1 is a schematic flowchart of a shared cache allocation method according to Embodiment 1 of the present invention; as shown in FIG. 1, the method includes:
  • Step 101 Pre-configure the shared cache space as a static cache space and a dynamic cache space.
  • the shared cache allocation method provided in this embodiment is applied to various network communication devices.
  • the pre-configured shared cache space is a static cache space and a dynamic cache space
  • the network communication device pre-configures the shared cache space as a static cache space and a dynamic cache space.
  • FIG. 2 is a schematic diagram of an application of a shared cache space according to an embodiment of the present invention.
  • the network communication device divides the shared cache space into a static cache space and a dynamic cache space in advance.
  • the storage space in the static cache space is preferentially allocated, that is, when a queue is added, the storage space in the static cache space is preferentially allocated to the queue.
  • the manner of allocating the storage space in the static cache space is based on the allocation manner of the shared cache in the prior art, and details are not described herein again.
  • Step 102 When a queue is added, and the storage space of the static cache space meets the first preset condition, the queue is controlled to initiate a dynamic cache space request.
  • the storage space of the static cache space satisfies a first preset condition, including:
  • the estimated value of the storage space of the static cache space is equal to the product of the number of active queues in the static cache space and the queue cache depth.
  • the network communication device pre-configures the following parameters:
  • the capacity of the static cache space and the capacity of the dynamic cache space (the sum of the capacity of the static cache space and the capacity of the dynamic cache space is the total capacity of the shared cache space);
  • the discard threshold of the static cache space (including the high threshold and the low threshold) and the discard probability table;
  • the static cache space follows a part of the random early discarding principle, that is, the multiplication algorithm is used to dynamically estimate the shared space (the number of queue activations is multiplied by the cache occupancy of the current queue) to obtain an estimated value, and then use the estimated value and
  • the discarding threshold (including the low threshold and the high threshold) is compared and judged; if the estimated value is less than the low threshold, no discard operation is performed; if the estimated value is between the low threshold and the high threshold, the preset discard probability is applied to the newly added packet. Table for random discarding operating. When the estimated value is higher than the high threshold, the newly added data packet is completely discarded. In this step, the first threshold is the high threshold.
  • the random early discarding principle is improved in this embodiment, that is, when the estimated value of the storage space of the static cache space is greater than or equal to a high threshold (ie, a first threshold), the storage space of the static cache space is determined.
  • the first preset condition is met, thereby triggering a dynamic cache space request.
  • a configuration table is pre-stored in the network communication device or the static cache space, and a discarding threshold (including a high threshold and a low threshold) and a discard probability table can be obtained from the configuration table.
  • the cache depth obtained by the last update of the queue is obtained according to the current storage condition of the static cache space, and the cache depth of the current queue is calculated to be equal to the cache depth obtained by the last update and the number of cache requests required by the current new queue.
  • counting the number of active queues in the static cache space calculating an estimated value of the storage space of the static cache space based on the number of the activated queues and the shared cache depth; the estimated value is equal to the number of active queues and the queue The product of the cache depth.
  • comparing the estimated value with the discarding threshold including a high threshold and a low threshold
  • the discarding threshold including a high threshold and a low threshold
  • no discarding operation is performed
  • the comparison result is When the estimated value is between the low threshold and the high threshold, performing a random discard operation on the newly added data packet according to a preset discard probability table
  • the estimated value is greater than or equal to the high threshold, triggering the The queue initiates a dynamic cache space request.
  • Step 103 When it is determined that the dynamic cache space request of the queue meets the second preset condition, allocate the cache space in the dynamic cache space to the queue according to the pre-configured adjustment coefficient of the queue.
  • the determining that the dynamic cache space request of the queue meets a second preset condition includes:
  • the second The threshold is a minimum allocation step size of the dynamic cache space
  • the dynamic cache space may be pre-configured with a priority threshold, that is, when the priority of the queue applied in the dynamic cache space does not reach the priority
  • the storage space of the dynamic cache space may be allocated to the queue when the priority threshold is corresponding.
  • the priority threshold of queue 1 when the priority threshold of queue 1 is 16, it indicates that the queue 1 can apply for 16 dynamic cache spaces; when the current priority of the queue 1 reaches 16, that is, the queue 1 has reached the priority threshold, indicating The queue 1 can not apply for the resource of the dynamic cache space.
  • the current priority of the queue 1 10
  • the priority of the queue does not reach the priority threshold
  • the resource of the dynamic cache space can be continuously applied.
  • the priority of the queue does not reach the corresponding priority threshold
  • the minimum allocation step size ( ⁇ h) of the space of course, the second threshold value may also be other values pre-configured, which is not specifically limited in this embodiment.
  • the buffering space in the dynamic cache space is allocated to the queue according to the pre-configured adjustment coefficient of the queue, including:
  • ⁇ L ⁇ ⁇ ⁇ h.
  • the application premise of this embodiment is that the buffer is allocated to the queue in the dynamic cache space. ( ⁇ L) is not greater than the remaining storage space of the dynamic cache space, that is, when the dynamic cache space has a cache resource greater than or equal to the ⁇ L, the cache space ( ⁇ L) is allocated for the queue.
  • the application join dynamics pre-configures an adjustment coefficient ( ⁇ ) for each queue.
  • the size of the adjustment coefficient ⁇ is positively related to the priority of the queue, that is, when the priority of the queue is high.
  • the corresponding adjustment coefficient ( ⁇ ) of the queue is also large; when the priority of the queue is low, the priority of the corresponding queue is also small.
  • the adjustment coefficient ( ⁇ ) of the queue is configured to be 2; when the priority of the queue is 1, the adjustment coefficient ⁇ of the queue is configured to be 1.
  • 3 is a schematic diagram of an application scenario of a dynamic cache space according to an embodiment of the present invention; as shown in FIG.
  • calculating, for the queue, a buffer space ⁇ L ⁇ h in the dynamic cache space, and calculating a remaining storage space R(t) of the dynamic cache space, when the remaining storage space of the dynamic cache space When R(t) is larger than the buffer space ( ⁇ L), the storage space of the cache space ⁇ L is allocated to the queue at one time.
  • the method further includes:
  • the cache space in the dynamic cache space allocated for the queue is occupied by the queue, the cache space in the static cache space is re-allocated for the queue.
  • the network communication device allocates different tags for queues stored in the static cache space and the dynamic cache space, for example, assigning tags to queues stored in the static cache space. 0, assigning a flag 1 to a queue stored in the dynamic cache space.
  • the storage space of the static cache space is allocated by default, that is, the queue is assigned a mark 0; when the queue applies to join the dynamic cache space and applies After success, the queue is assigned a tag of 1.
  • the tag allocated for the queue needs to be transmitted to the downstream module as part of the queue content for resource recycling processing; when the resource is recycled, it is determined according to the tag of the queue whether to recover the resource of the static cache space or the resource of the dynamic cache space.
  • the queue In the process of occupying the cache space in the dynamic cache space, the queue only performs a cache release operation in the original static cache space until the dynamic cache space allocated for the queue is full, and then re-news Enqueue allocates cache space in the static cache space.
  • the pre-configured dynamic cache space is used as a prioritized dynamic cache adjustment area, and the dynamic cache space can perform priority-based dynamic cache allocation and release in a network congestion scenario;
  • the application and release of dynamic cache space can be implemented for services with different cache requirements according to the real-time situation of the network, which increases the utilization of the shared cache space and enhances the adaptability of the system to dynamic changes of the network;
  • the priority is dynamically allocated, so that the shared cache space can better serve the high-priority service, and the service quality of the network is greatly improved.
  • the dynamic cache space in the embodiment of the present invention only involves part of the space of the shared cache space. The design complexity is reduced, and at the same time, the cache waste is reduced in the prior art by setting all the caches according to the priority setting.
  • the embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the shared cache allocation method according to the embodiment of the invention.
  • the embodiment of the invention further provides a shared cache allocation method.
  • 4 is a schematic flowchart of a shared cache allocation method according to Embodiment 2 of the present invention; as shown in FIG. 4, the method includes:
  • Step 201 Configure a static cache space and a dynamic cache space.
  • the priority interval of the dynamic cache space is set to 16, that is, the high priority can occupy up to 32 cache spaces in the dynamic cache space, and the low priority can occupy up to 16 cache spaces in the dynamic cache space.
  • Step 202 Acquire a parameter configuration according to the newly added queue representation.
  • the parameter configuration may be obtained from a preset configuration table according to the newly added queue number, where the parameter configuration includes: a discard threshold of the static cache space (including a high threshold and a low threshold), and a discard probability table, and The cache depth obtained from the last update. Assuming that the high threshold is set to 30, the two queues share the 30 spaces fairly, and each queue is divided into 15 cache spaces.
  • Step 203 Acquire a cache mark.
  • step 204 to step 209 are performed; when the mark is 1, step 207 is directly executed.
  • the cache flag is obtained based on the queue number, and when the flag is 0, it indicates that the storage space of the static cache space is allocated for the queue, and then steps 204 to 209 are performed. When the flag is 1, it indicates that the queue is directly allocated the storage space of the dynamic cache space.
  • Step 204 Calculate an estimated value of the storage space of the static cache area, compare the estimated value with a preset discarding threshold, and obtain a discarding condition; wherein the discarding threshold includes a high threshold and a low Threshold.
  • the number of active queues is 2.
  • Step 205 Determine whether the estimated value is higher than the high threshold. When the result of the determination is yes, perform step 206 to step 208; when the result of the determination is no, perform step 209.
  • step 206 is performed to initiate a dynamic cache space request.
  • step 206 is executed to initiate a dynamic cache space request.
  • step 209 is performed: outputting according to the current discarding situation.
  • Step 206 Initiate a dynamic cache space request; after the application is successful, perform steps 207 to 208; and when the application fails, perform step 209. If the estimated value is greater than or equal to the high threshold (30) after the application fails, it is determined that the current discard condition is completely discarded.
  • the application is determined to be successful;
  • the priority of the queue 0 and the queue 1 both reach the preset priority threshold, and/or, after the remaining storage space of the dynamic cache space is less than or equal to the preset threshold, the application fails.
  • the preset threshold may be a minimum allocation step size ⁇ h of the dynamic cache space.
  • Step 207 Acquire an adjustment coefficient, and determine, according to the adjustment coefficient, a storage space in the allocated dynamic cache space of the queue 0 and the queue 1.
  • Step 208 The current queue is forwarded normally, and the queue 1 is configured with a flag indicating that the dynamic cache space is occupied.
  • the queue in the process that the queue occupies the cache space in the dynamic cache space, the queue only performs a cache release operation in the original static cache space until the dynamic cache space allocated for the queue.
  • the storage area is occupied by the queue; that is, before the four cache spaces allocated to the queue 0 are not full, the queue 0 is marked with the mark 0 when the resources in the static cache space are recovered. Static space recycling.
  • the queue 0 may also be reclaimed in the dynamic cache space, that is, the queue 0 uses the tag 1 to perform dynamic space recovery when the resources in the dynamic cache space are recovered; After the queue 0 is successfully assigned the enqueue of the static cache space, the flag 1 of the queue 0 is changed to the flag 0, and the queue 0 is controlled to be forwarded to the static cache space, and the random cache space is re-randomized.
  • the early discarding rule is to re-execute the process from step 204 to step 209 in this embodiment.
  • the remaining storage space R(t) of the dynamic cache space is calculated, and the remaining storage space R(t) is allocated each time a storage space is allocated. Subtract one; the remaining storage space R(t) is incremented by one each time a storage space is reclaimed.
  • the pre-configured dynamic cache space is used as the dynamic buffer adjustment area for prioritization, and the dynamic cache space can be performed in a network congestion scenario.
  • Priority-based dynamic cache allocation and release on the one hand, the application and release of dynamic cache space can be implemented for services with different cache requirements according to the real-time situation of the network, which increases the utilization of the shared cache space and enhances the dynamic change of the system to the network.
  • the dynamic cache space can be dynamically allocated according to the priority, so that the shared cache space can better serve the high-priority service, and the service quality of the network is greatly improved.
  • the dynamic cache space only involves part of the space of the shared cache space, which reduces the complexity of the design, and reduces the waste of the cache caused by prioritizing all the caches in the prior art.
  • the embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the shared cache allocation method according to the embodiment of the invention.
  • FIG. 5 is a schematic structural diagram of a composition of a shared cache allocation apparatus according to Embodiment 3 of the present invention. As shown in FIG. 5, the apparatus includes: a configuration unit 31, a first processing unit 32, and a second processing unit 33;
  • the configuration unit 31 is configured to pre-configure the shared cache space as a static cache space and a dynamic cache space;
  • the first processing unit 32 is configured to control the queue to initiate a dynamic cache space request when a queue is added, and the storage space of the static cache space meets a first preset condition;
  • the second processing unit 33 is configured to determine that the dynamic cache space request of the queue initiated by the first processing unit 32 meets the second preset condition, and the queue is allocated according to the pre-configured adjustment coefficient of the queue.
  • the cache space in the dynamic cache space is configured to determine that the dynamic cache space request of the queue initiated by the first processing unit 32 meets the second preset condition, and the queue is allocated according to the pre-configured adjustment coefficient of the queue.
  • the first processing unit 32 is configured to compare whether an estimated value of the storage space of the static cache space is greater than or equal to a first threshold, and obtain a comparison result; when the comparison result is the static cache space When the estimated value of the storage space is greater than or equal to the first threshold, Determining that the storage space of the static cache space satisfies a first preset condition; wherein an estimated value of the storage space of the static cache space is equal to a product of an active queue number and a queue cache depth in the static cache space.
  • the second processing unit 33 is configured to determine whether the priority of the queue meets a preset priority threshold, and whether the remaining storage space of the dynamic cache space is greater than a second threshold, and obtain a determination result.
  • the second threshold is a minimum allocation step size of the dynamic cache space; when the determination result is that the priority of the queue meets a preset priority threshold, and the remaining storage space of the dynamic cache space is greater than
  • the second threshold determines that the dynamic cache space request of the queue satisfies the second preset condition.
  • the second processing unit 33 is configured to obtain the dynamic cache space for the queue according to the adjustment coefficient ⁇ and a minimum allocation step size ( ⁇ h) of a storage space of the dynamic cache space.
  • Cache space ( ⁇ L); the adjustment coefficient ⁇ is a non-negative integer; ⁇ h is a positive integer; wherein ⁇ L ⁇ h.
  • the configuration unit 31 pre-configures the following parameters in the configuration table:
  • the capacity of the static cache space and the capacity of the dynamic cache space (the sum of the capacity of the static cache space and the capacity of the dynamic cache space is the total capacity of the shared cache space);
  • the discard threshold of the static cache space (including the high threshold and the low threshold) and the discard probability table;
  • the first processing unit 32 compares the estimated value of the storage space of the static cache space with the high threshold (ie, the first threshold); when the estimated value of the storage space of the static cache space is greater than or equal to When the threshold is high (ie, the first threshold), it is determined that the storage space of the static cache space satisfies the first preset condition, thereby triggering the dynamic cache space request.
  • the threshold ie, the first threshold
  • a configuration table is pre-stored in the configuration unit 31, and a discarding threshold (including a high threshold and a low threshold) and a drop probability can be obtained from the configuration table.
  • the first processing unit 32 obtains the cache depth obtained by the last update of the queue according to the current storage condition of the static cache space, and calculates the cache depth of the current queue equal to the cache depth obtained by the last update and the current new queue requirement.
  • the number of cache requests Further, counting the number of active queues in the static cache space; calculating an estimated value of the storage space of the static cache space based on the number of the activated queues and the shared cache depth; the estimated value is equal to the number of active queues and the queue The product of the cache depth.
  • comparing the estimated value with the discarding threshold including a high threshold and a low threshold
  • the discarding threshold including a high threshold and a low threshold
  • no discarding operation is performed
  • the comparison result is When the estimated value is between the low threshold and the high threshold, performing a random discard operation on the newly added data packet according to a preset discard probability table
  • the estimated value is greater than or equal to the high threshold, triggering the The queue initiates a dynamic cache space request.
  • the second processing unit 33 first determines whether the storage space of the current dynamic cache space is still capable of storing the newly added queue. And whether the queue meets the application condition of the dynamic cache space; wherein different services can be obtained in order to reflect different priorities, and preferably, as an implementation manner, the dynamic cache space may be pre-configured with a priority threshold, that is, when The storage space of the dynamic cache space may be allocated to the queue when the priority of the queue in the dynamic cache space does not reach its corresponding priority threshold.
  • the second threshold may be the dynamic cache.
  • the minimum allocation step size ⁇ h of the space may also be other values pre-configured, which is not specifically limited in this embodiment.
  • the application join dynamics pre-configures the adjustment coefficient ⁇ for each queue.
  • the size of the adjustment coefficient ⁇ is positively related to the priority of the queue, that is, when the priority of the queue is high, The corresponding adjustment coefficient ⁇ of the queue is also large; when the priority of the queue When low, the corresponding queue has a lower priority.
  • the adjustment coefficient ⁇ of the queue is configured to be 2; when the priority of the queue is 1, the adjustment coefficient ⁇ of the queue is configured to be 1. As shown in FIG.
  • each cell represents the minimum allocation step size ⁇ h of the storage space of the dynamic cache space, and the bottom four cells represent 4 ⁇ h, which can be understood as the adjustment coefficient ⁇ of the second queue is equal to 4.
  • the buffer space ⁇ L2 4 ⁇ h allocated for the second queue.
  • the two small cells of the penultimate layer represent 2 ⁇ h.
  • the size of the adjustment coefficient ⁇ may also be pre-configured according to the service requirement of the queue. It can be understood that the size of the adjustment coefficient ⁇ can be pre-configured according to the type of service, or can be manually configured.
  • the remaining storage space R(t) of the dynamic cache space is larger than the cache space ⁇ L, the storage space of the cache space ⁇ L is allocated to the queue at one time.
  • the second processing unit 33 is further configured to trigger the first processing unit 32 to restart after the cache space in the dynamic cache space allocated to the queue is occupied by the queue.
  • the new enqueue allocates cache space in the static cache space.
  • the configuration unit 31 allocates different tags for the queues stored in the static cache space and the dynamic cache space, for example, assigning tags to queues stored in the static cache space. 0, assigning a flag 1 to a queue stored in the dynamic cache space.
  • the storage space of the static cache space is allocated by default, that is, the queue is assigned a mark 0; when the queue is applied to join the move After the state cache space and the application is successful, the queue is assigned a flag of 1.
  • the queue In the process of occupying the cache space in the dynamic cache space, the queue only performs a cache release operation in the original static cache space until the cache space in the dynamic cache space allocated for the queue is After the queue is full, the queue is assigned a flag of 0, and the control allocates a buffer space in the static cache space for the queue.
  • the configuration unit 31, the first processing unit 32, and the second processing unit 33 in the shared cache allocation device may be used by a central processing unit (CPU) in the device in an actual application.
  • CPU central processing unit
  • DSP Digital Signal Processor
  • FPGA Field-Programmable Gate Array
  • FIG. 6 is a schematic diagram of another component structure of the shared cache allocation apparatus according to the third embodiment of the present invention; the configuration unit 31 and the first in the shared cache allocation apparatus in this embodiment.
  • the processing unit 32 and the second processing unit 33 can be implemented by using the module shown in FIG. 6, which specifically includes:
  • the configuration unit 31 can be implemented by the queue threshold configuration module 41 and the dynamic cache configuration module 42, that is, configuration parameters; the queue threshold configuration module 41 can be configured to store the capacity of the static cache space and the capacity of the dynamic cache space (the static The sum of the capacity of the cache space and the capacity of the dynamic cache space is the total capacity of the shared cache space, the discard threshold of the static cache space (including the high threshold and the low threshold), and the discard probability table; the dynamic cache configuration module 42 may Priority threshold configured to store dynamic cache space, minimum allocation step size ( ⁇ h) for dynamic cache space And adjustment factor ( ⁇ ) and so on.
  • the first processing unit 32 can be implemented by the queue cache calculation module 43, the comparison module 44, and the dynamic cache application module 45; the queue cache calculation module 43 can be configured to calculate an estimated value of the storage space of the static cache space, specifically For the calculation method, refer to the descriptions in the first embodiment to the third embodiment, and details are not described herein again.
  • the comparing module 44 is configured to compare the estimated value with a discarding threshold configured in the queue threshold configuration module 41, perform a preset discarding operation based on the comparison result, and is higher in the estimated value than the discarding threshold
  • the threshold of the dynamic cache area is initiated by the dynamic cache requesting module 45.
  • the second processing unit 33 can be implemented by the dynamic space calculation module 46, and the dynamic space calculation module 46 is configured to determine whether the application sent by the dynamic cache application module 45 satisfies the trigger condition, and after the trigger condition is met, according to the queue
  • the adjustment coefficient is used to allocate the cache space in the dynamic cache space to the queue.
  • the disclosed apparatus and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner such as: multiple units or components may be combined, or Can be integrated into another system, or some features can be ignored or not executed.
  • the coupling, or direct coupling, or communication connection of the components shown or discussed may be indirect coupling or communication connection through some interfaces, devices or units, and may be electrical, mechanical or other forms. of.
  • the units described above as separate components may or may not be physically separated, and the components displayed as the unit may or may not be physical units, that is, may be located in one place or distributed to multiple network units; Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated in one processing order.
  • each unit may be separately used as a unit, or two or more units may be integrated into one unit; the integrated unit may be implemented in the form of hardware or a hardware plus software functional unit. Formal realization.
  • the foregoing program may be stored in a computer readable storage medium, and the program is executed when executed.
  • the foregoing storage device includes the following steps: the foregoing storage medium includes: a mobile storage device, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
  • ROM read-only memory
  • RAM random access memory
  • magnetic disk or an optical disk.
  • optical disk A medium that can store program code.
  • the above-described integrated unit of the present invention may be stored in a computer readable storage medium if it is implemented in the form of a software function module and sold or used as a standalone product.
  • the technical solution of the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product stored in a storage medium, including a plurality of instructions.
  • a computer device (which may be a personal computer, server, or network device, etc.) is caused to perform all or part of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes various media that can store program codes, such as a mobile storage device, a ROM, a RAM, a magnetic disk, or an optical disk.
  • the pre-configured dynamic cache space is used as the dynamic buffer adjustment area for prioritization, and the dynamic cache space can perform dynamic cache allocation and release based on priority in the network congestion scenario; Business for different caching needs
  • the application and release of the dynamic cache space increases the utilization of the shared cache space and enhances the adaptability of the system to dynamic changes of the network.
  • the dynamic cache space can be dynamically allocated according to the priority, so that the shared cache space can be The service quality of the network is greatly improved, and the quality of the network is greatly improved.
  • the dynamic cache space in the embodiment of the present invention only covers part of the space of the shared cache space, which reduces the complexity of the design and reduces Smaller in the prior art, all caches are prioritized to cause cache waste.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

本发明实施例公开了一种共享缓存分配方法、装置及计算机存储介质。所述方法包括:预先配置共享缓存空间为静态缓存空间和动态缓存空间;当有队列加入,且所述静态缓存空间的存储空间满足第一预设条件时,控制所述队列发起动态缓存空间申请;判定所述队列的动态缓存空间申请满足第二预设条件时,依据所述队列预先配置的调整系数为所述队列分配所述动态缓存空间中的缓存空间。

Description

一种共享缓存分配方法、装置及计算机存储介质 技术领域
本发明涉及服务质量(QoS,Quality of service)领域,具体涉及一种共享缓存分配方法、装置及计算机存储介质。
背景技术
在现有的大流量多用户数据网络中,必须要用到网络拥塞控制技术。随机早期丢弃技术是其中一种网络拥塞控制方法,其目的是在数据溢出缓存空间之前进行早期丢弃,从而避免缓存溢出导致大量连续丢包。
随机早期丢弃的原理是通过计算队列占用缓存情况来提前预判缓存空间的拥塞。目前共享缓存管理采用乘法算法进行共享空间动态估算(队列激活数乘以当前队列的缓存占用数)获得估计值,再用估计值和丢弃阈值(包括低阈值和高阈值)进行比较判断;如果估计值小于低阈值,不进行任何丢弃操作;如果估计值在低阈值和高阈值之间,对新加入的数据包按预设丢弃概率表进行随机丢弃操作。当估计值高于高阈值时,则对新加入的数据包完全丢弃。现有技术是公平共享技术,进入共享的用户公平享有缓存,那么必然造成了某些用户用完缓存,而另一些用户还有剩余缓存的浪费现象。而且现有技术没有考虑对优先级用户的区别对待,对高优先级用户的业务没有做到良好的保证。
现有技术中提出一种基于优先级的共享缓存管理办法,即共享缓存按照优先级划分成不同的缓存区,每个优先级缓存区可存储该优先级下所有队列。高优先级的队列可占用其所属的优先级及其以下的所有优先级缓存区。这种方法实现了基于优先级的服务质量,但缺陷是缓存利用率太低,若高优先级队列网络负载小,低优先级负载大时就极大的浪费了缓存。
发明内容
本发明实施例期望提供一种共享缓存分配方法、装置及计算机存储介质,旨在解决现有技术中缓存利用率太低的问题。
为达到上述目的,本发明实施例的技术方案是这样实现的:
本发明实施例提供了一种共享缓存分配方法,所述方法包括:
预先配置共享缓存空间为静态缓存空间和动态缓存空间;
当有队列加入,且所述静态缓存空间的存储空间满足第一预设条件时,控制所述队列发起动态缓存空间申请;
判定所述队列的动态缓存空间申请满足第二预设条件时,依据所述队列预先配置的调整系数为所述队列分配所述动态缓存空间中的缓存空间。
作为一种实施方式,所述静态缓存空间的存储空间满足第一预设条件,包括:
比较所述静态缓存空间的存储空间的估计值是否大于等于第一阈值,获得比较结果;
当所述比较结果为所述静态缓存空间的存储空间的估计值大于等于第一阈值时,确定所述静态缓存空间的存储空间满足第一预设条件;
其中,所述静态缓存空间的存储空间的估计值等于所述静态缓存空间中的激活队列数与队列缓存深度的乘积。
作为一种实施方式,所述判定所述队列的动态缓存空间申请满足第二预设条件,包括:
判断所述队列的优先级是否满足预设优先级门限,并且所述动态缓存空间的剩余存储空间是否大于第二阈值,获得判断结果;其中,所述第二阈值为所述动态缓存空间的最小分配步长;
当所述判断结果为所述队列的优先级满足预设优先级门限,并且所述动态缓存空间的剩余存储空间大于第二阈值时,确定所述队列的动态缓存 空间申请满足第二预设条件。
作为一种实施方式,所述依据所述队列预先配置的调整系数为所述队列分配所述动态缓存空间中的缓存空间,包括:
依据所述调整系数α以及所述动态缓存空间的存储空间的最小分配步长Δh获得为所述队列分配所述动态缓存空间中的缓存空间ΔL;所述调整系数α为非负整数;Δh为正整数;
其中,ΔL=α×Δh。
作为一种实施方式,所述为所述队列分配所述动态缓存空间中的缓存空间之后,所述方法还包括:
为所述队列分配的所述动态缓存空间中的缓存空间被所述队列占满后,重新为新的入队分配静态缓存空间中的缓存空间。
本发明实施例还提供了一种共享缓存分配装置,所述装置包括:配置单元、第一处理单元和第二处理单元;其中,
所述配置单元,配置为预先配置共享缓存空间为静态缓存空间和动态缓存空间;
所述第一处理单元,配置为当有队列加入,且所述静态缓存空间的存储空间满足第一预设条件时,控制所述队列发起动态缓存空间申请;
所述第二处理单元,配置为判定所述第一处理单元发起的所述队列的动态缓存空间申请满足第二预设条件时,依据所述队列预先配置的调整系数为所述队列分配所述动态缓存空间中的缓存空间。
作为一种实施方式,所述第一处理单元,配置为比较所述静态缓存空间的存储空间的估计值是否大于等于第一阈值,获得比较结果;当所述比较结果为所述静态缓存空间的存储空间的估计值大于等于第一阈值时,确定所述静态缓存空间的存储空间满足第一预设条件;其中,所述静态缓存空间的存储空间的估计值等于所述静态缓存空间中的激活队列数与队列缓 存深度的乘积。
作为一种实施方式,所述第二处理单元,配置为判断所述队列的优先级是否满足预设优先级门限,并且所述动态缓存空间的剩余存储空间是否大于第二阈值,获得判断结果;其中,所述第二阈值为所述动态缓存空间的最小分配步长;当所述判断结果为所述队列的优先级满足预设优先级门限,并且所述动态缓存空间的剩余存储空间大于第二阈值时,确定所述队列的动态缓存空间申请满足第二预设条件。
作为一种实施方式,所述第二处理单元,配置为依据所述调整系数α以及所述动态缓存空间的存储空间的最小分配步长Δh获得为所述队列分配所述动态缓存空间中的缓存空间ΔL;所述调整系数α为非负整数;Δh为正整数;其中,ΔL=α×Δh。
作为一种实施方式,所述第二处理单元,还配置为为所述队列分配的所述动态缓存空间中的缓存空间被所述队列占满后,触发所述第一处理单元重新为新的入队分配静态缓存空间中的缓存空间。
本发明实施例还提供了一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行本发明实施例所述的共享缓存分配方法。
本发明实施例提供的一种共享缓存分配方法、装置及计算机存储介质,通过预先配置共享缓存空间为静态缓存空间和动态缓存空间;当有队列加入时,且所述静态缓存空间的存储空间满足第一预设条件时,控制所述队列发起动态缓存空间申请;确定所述队列的动态缓存空间申请满足第二预设条件时,依据所述队列预先配置的调整系数为所述队列分配所述动态缓存空间中的缓存空间。如此,采用本发明实施例的技术方案,通过预先配置的动态缓存空间作为区分优先级的动态缓存调整区,所述动态缓存空间可在网络拥塞场景时进行基于优先级的动态缓存分配和释放;一方面可以 根据网络实时情况为不同缓存需求的业务实现动态缓存空间的申请和释放,增加了对共享缓存空间的利用率,增强了系统对网络动态变化的适应性;另一方面对动态缓存空间可按照优先级进行动态分配,使得共享缓存空间能够更好地为高优先级业务服务,大大提升了网络的服务质量;最后,本发明实施例中所述动态缓存空间只涉及全部共享缓存空间的部分空间,减小了设计的复杂性,同时减小了现有技术中将全部缓存按优先级设置导致缓存浪费。
附图说明
图1为本发明实施例一的共享缓存分配方法的流程示意图;
图2为本发明实施例的共享缓存空间的应用示意图;
图3为本发明实施例的动态缓存空间的应用场景示意图;
图4为本发明实施例二的共享缓存分配方法的流程示意图;
图5为本发明实施例三的共享缓存分配装置的一种组成结构示意图;
图6为本发明实施例三的共享缓存分配装置的另一种组成结构示意图。
具体实施方式
下面结合附图及具体实施例对本发明作进一步详细的说明。
实施例一
本发明实施例提供了一种共享缓存分配方法。图1为本发明实施例一的共享缓存分配方法的流程示意图;如图1所示,所述方法包括:
步骤101:预先配置共享缓存空间为静态缓存空间和动态缓存空间。
本实施例提供的共享缓存分配方法应用于各种网络通信设备中。则本步骤中,所述预先配置共享缓存空间为静态缓存空间和动态缓存空间,为:网络通信设备预先配置共享缓存空间为静态缓存空间和动态缓存空间。
具体的,图2为本发明实施例的共享缓存空间的应用示意图;如图2 所示,所述网络通信设备预先将共享缓存空间划分为静态缓存空间和动态缓存空间。其中,优先分配静态缓存空间中的存储空间,也即当有队列加入时,优先分配所述静态缓存空间中的存储空间给队列。
具体的,所述静态缓存空间中的存储空间的分配方式依据现有技术中共享缓存的分配方式,这里不再赘述。
步骤102:当有队列加入,且所述静态缓存空间的存储空间满足第一预设条件时,控制所述队列发起动态缓存空间申请。
这里,所述静态缓存空间的存储空间满足第一预设条件,包括:
比较所述静态缓存空间的存储空间的估计值是否大于等于第一阈值,获得比较结果;当所述比较结果为所述静态缓存空间的存储空间的估计值大于等于第一阈值时,确定所述静态缓存空间的存储空间满足第一预设条件;
其中,所述静态缓存空间的存储空间的估计值等于所述静态缓存空间中的激活队列数与队列缓存深度的乘积。
本实施例中,所述网络通信设备预先配置以下参数:
1、静态缓存空间的容量和动态缓存空间的容量(所述静态缓存空间的容量和所述动态缓存空间的容量的总和为共享缓存空间的总容量);
2、静态缓存空间的丢弃阈值(包括高阈值和低阈值)和丢弃概率表;
3、动态缓存空间的优先级门限;
4、动态缓存空间的最小分配步长(Δh)和调整系数(α)。
本实施例中,所述静态缓存空间遵循部分的随机早期丢弃原则,即:采用乘法算法进行共享空间动态估算(队列激活数乘以当前队列的缓存占用数)获得估计值,再用估计值和丢弃阈值(包括低阈值和高阈值)进行比较判断;如果估计值小于低阈值,不进行任何丢弃操作;如果估计值在低阈值和高阈值之间,对新加入的数据包按预设丢弃概率表进行随机丢弃 操作。当估计值高于高阈值时,则对新加入的数据包完全丢弃。本步骤中,所述第一阈值即为所述高阈值。可以理解为本实施例对所述随机早期丢弃原则进行改进,即当所述静态缓存空间的存储空间的估计值大于等于高阈值(即第一阈值)时,确定所述静态缓存空间的存储空间满足第一预设条件,从而触发动态缓存空间申请。
具体的,当有新队列加入时,所述网络通信设备或所述静态缓存空间中预先存储有配置表,从所述配置表中能够获得丢弃阈值(包括高阈值和低阈值)以及丢弃概率表;依据所述静态缓存空间当前的存储情况获得队列上一次更新得到的缓存深度,计算当前队列的缓存深度等于所述上一次更新得到的缓存深度与当前新队列需要的缓存申请数。进一步地,统计所述静态缓存空间中的激活队列数;基于所述激活队列数以及所述共享缓存深度计算所述静态缓存空间的存储空间的估计值;所述估计值等于激活队列数与队列缓存深度的乘积。进一步地,用所述估计值与所述丢弃阈值(包括高阈值和低阈值)进行比较,当比较结果为所述估计值小于所述低阈值时,不进行任何丢弃操作;当比较结果为所述估计值在所述低阈值和所述高阈值之间时,对新加入的数据包按预设丢弃概率表进行随机丢弃操作;当所述估计值大于等于所述高阈值时,触发所述队列发起动态缓存空间申请。
步骤103:判定所述队列的动态缓存空间申请满足第二预设条件时,依据所述队列预先配置的调整系数为所述队列分配所述动态缓存空间中的缓存空间。
这里,所述确定所述队列的动态缓存空间申请满足第二预设条件,包括:
判断所述队列的优先级是否满足预设优先级门限,并且所述动态缓存空间的剩余存储空间是否大于第二阈值,获得判断结果;其中,所述第二 阈值为所述动态缓存空间的最小分配步长;
当所述判断结果为所述队列的优先级满足预设优先级门限,并且所述动态缓存空间的剩余存储空间大于第二阈值时,确定所述队列的动态缓存空间申请满足第二预设条件。
具体的,当控制所述队列发起动态缓存空间申请时,首先判断当前所述动态缓存空间的存储空间是否还能够存储新加入的队列以及所述队列是否满足动态缓存空间的申请条件;其中,为了体现不同的优先级可以获得不同的服务,优选地,作为一种实施方式,所述动态缓存空间可预先配置优先级门限,即当申请在所述动态缓存空间中的队列的优先级未达到其对应的优先级门限时,才可为所述队列分配所述动态缓存空间的存储空间。例如,队列1的优先级门限时16,表征所述队列1能够申请16个动态缓存空间;当所述队列1当前的优先级达到16,即所述队列1当前已达到优先级门限时,表明所述队列1已无法申请动态缓存空间的资源;当所述队列1当前的优先级为10时,即所述队列1当前未达到优先级门限,则可以继续申请动态缓存空间的资源。另一方面,当所述队列的优先级未达到其对应的优先级门限时,进一步判断所述动态缓存空间中的剩余存储空间是否大于第二阈值,所述第二阈值可以为所述动态缓存空间的最小分配步长(Δh),当然,所述第二阈值也可以是预先配置的其他数值,本实施例中不作具体限定。
本实施例中,所述依据所述队列预先配置的调整系数为所述队列分配所述动态缓存空间中的缓存空间,包括:
依据所述调整系数α以及所述动态缓存空间的存储空间的最小分配步长(Δh)获得为所述队列分配所述动态缓存空间中的缓存空间(ΔL);所述调整系数(α)为非负整数;Δh为正整数;其中,ΔL=α×Δh。本实施例的应用前提是,所述为所述队列分配所述动态缓存空间中的缓存空间 (ΔL)不大于所述动态缓存空间的剩余存储空间,也即当所述动态缓存空间还有大于等于所述ΔL的缓存资源时,为所述队列分配所述缓存空间(ΔL)。
具体的,申请加入动态预先为每个队列配置调整系数(α),作为一种实施方式,所述调整系数α的大小与所述队列的优先级正相关,即当所述队列的优先级高时,相应的所述队列的调整系数(α)也大;当所述队列的优先级低时,相应的所述队列的优先级也小。例如,当所述队列的优先级为2时,所述队列的调整系数(α)配置为2;当所述队列的优先级为1时,所述队列的调整系数α配置为1。图3为本发明实施例的动态缓存空间的应用场景示意图;如图3所示,假设本示意中有两个队列,分别为第一队列和第二队列,其中,所述第一队列的优先级较低,假设所述第一队列的调整系数(α)等于2;所述第二队列的优先级较高,假设所述第二队列的调整系数(α)等于4;假定所述动态缓存空间的存储空间的最小分配步长(Δh)等于1。则图3中,每个小格表征所述动态缓存空间的存储空间的最小分配步长(Δh),则最底层的四个小格表征4×Δh,可以理解为,第二队列的调整系数(α)等于4,则为所述第二队列分配的缓存空间ΔL2=4×Δh。倒数第二层的两个小格表征2×Δh,可以理解为,第一队列的调整系数(α)等于2,则为所述第二队列分配的缓存空间(ΔL1)=2×Δh。作为另一种实施方式,所述调整系数(α)的大小也可以根据所述队列的业务需求预先配置。可以理解为,所述调整系数(α)的大小可以依据业务类型预先配置,也可有人工自行配置。
进一步地,计算为所述队列分配所述动态缓存空间中的缓存空间ΔL=α×Δh,以及计算所述动态缓存空间的剩余存储空间R(t),当所述动态缓存空间的剩余存储空间R(t)大于所述缓存空间(ΔL)时,则为所述队列一次性分配所述缓存空间ΔL大小的存储空间。
作为另一实施方式,所述为所述队列分配所述动态缓存空间中的缓存空间之后,所述方法还包括:
为所述队列分配的所述动态缓存空间中的缓存空间被所述队列占满后,重新为所述队列分配静态缓存空间中的缓存空间。
在本实施例中,具体的,所述网络通信设备为存储在所述静态缓存空间和所述动态缓存空间中的队列分配不同的标记,例如,为存储在所述静态缓存空间的队列分配标记0,为存储在所述动态缓存空间的队列分配标记1。当所述队列加入至所述共享缓存空间时,默认为所述队列分配所述静态缓存空间的存储空间,即为所述队列分配标记0;当所述队列申请加入所述动态缓存空间且申请成功后,为所述队列分配标记1。进一步地,为队列分配的标记需要作为队列内容的一部分传递给下游模块,用于资源回收处理;资源回收时是根据队列的标记,确定是回收静态缓存空间的资源还是回收动态缓存空间的资源。在所述队列占用所述动态缓存空间中的缓存空间过程中,所述队列在原所述静态缓存空间只进行缓存释放操作,直至为所述队列分配的动态缓存空间占满后,重新为新的入队分配静态缓存空间中的缓存空间。
采用本发明实施例的技术方案,通过预先配置的动态缓存空间作为区分优先级的动态缓存调整区,所述动态缓存空间可在网络拥塞场景时进行基于优先级的动态缓存分配和释放;一方面可以根据网络实时情况为不同缓存需求的业务实现动态缓存空间的申请和释放,增加了对共享缓存空间的利用率,增强了系统对网络动态变化的适应性;另一方面对动态缓存空间可按照优先级进行动态分配,使得共享缓存空间能够更好地为高优先级业务服务,大大提升了网络的服务质量;最后,本发明实施例中所述动态缓存空间只涉及全部共享缓存空间的部分空间,减小了设计的复杂性,同时减小了现有技术中将全部缓存按优先级设置导致缓存浪费。
本发明实施例还提供了一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行本发明实施例所述的共享缓存分配方法。
实施例二
本发明实施例还提供了一种共享缓存分配方法。图4为本发明实施例二的共享缓存分配方法的流程示意图;如图4所示,所述方法包括:
步骤201:配置静态缓存空间和动态缓存空间。
本实施例中,假设为一组(两个)队列(分别为队列0和队列1,其中所述队列0的优先级高于队列1的优先级)进行共享缓存空间的分配。
这里,假设共享缓存空间总容量为64,配置静态缓存空间容量为32,动态缓存空间容量为32。配置动态缓存空间的优先级区间为16,即高优先级最多可占用所述动态缓存空间中的32个缓存空间,低优先级最多可占用所述动态缓存空间中的16个缓存空间。
步骤202:根据新加入的队列表征获取参数配置。
具体的,可根据新加入的队列号从预先设置的配置表中获取到所述参数配置,所述参数配置包括:静态缓存空间的丢弃阈值(包括高阈值和低阈值)和丢弃概率表、以及上一次更新得到的缓存深度。假设所述高阈值设为30,则两个队列公平共享这30个空间,每个队列分到15个缓存空间。
步骤203:获取缓存标记,当标记为0时,执行步骤204至步骤209;当标记为1时,直接执行步骤207。
这里,基于队列号获取缓存标记,当标记为0时表示为所述队列分配静态缓存空间的存储空间,则执行步骤204至步骤209。当标记为1时,表示为所述队列直接分配动态缓存空间的存储空间。
步骤204:计算所述静态缓存区域的存储空间的估计值,比较所述估计值和预设丢弃阈值,获得丢弃情况;其中,所述丢弃阈值包括高阈值和低 阈值。
这里,假设当前所述两个队列均已入队,则激活队列数为2。且所述队列0上一次更新得到的缓存深度为15,则计算当前所述队列0的缓存深度为15+1=16。则所述静态缓存区域的存储空间的估计值=2×16=32,所述估计值大于等于所述高阈值(30)。
步骤205:判断所述估计值是否高于所述高阈值,当判断的结果为是时,执行步骤206至步骤208;当判断的结果为否时,执行步骤209。
这里,当所述队列0的估计值高于所述高阈值后,执行步骤206,发起动态缓存空间申请。同理,所述队列1的估计值高于所述高阈值后,执行步骤206,发起动态缓存空间申请。
当所述估计值未达到所述高阈值时,执行步骤209:按当前丢弃情况输出。
步骤206:发起动态缓存空间申请;当申请成功后,执行步骤207至步骤208;当申请失败后,执行步骤209。其中,当申请失败后,由于步骤204中计算得出所述估计值大于等于所述高阈值(30),则确定当前丢弃情况为完全丢弃。
这里,确定所述队列0和所述队列1的优先级均达未达到对应的预设优先级门限,且所述动态缓存空间的剩余存储空间大于预设阈值后,确定申请成功;反之,确定所述队列0和所述队列1的优先级均达到预设优先级门限,和/或,所述动态缓存空间的剩余存储空间小于等于预设阈值后,则申请失败。其中,所述预设阈值可以是所述动态缓存空间的最小分配步长Δh。
步骤207:获取调整系数,基于所述调整系数确定为所述队列0和队列1的分配的动态缓存空间中的存储空间。
这里,基于队列号从预先配置的配置表中获得调整系数α。假设队列0 的调整系数α1=2,所述队列1的调整系数α2=1,所述动态缓存空间的最小分配步长为Δh=2。则为所述队列0分配的动态缓存空间的缓存空间ΔL1=α1×Δh=2×2=4;为所述队列1分配的动态缓存空间的缓存空间ΔL2=α2×Δh=1×2=2。当前所述动态缓存空间的剩余存储空间R(t)为32,所述剩余存储空间R(t)大于为所述队列0分配的动态缓存空间的缓存空间ΔL1,因此为所述队列0一次动态分配4个缓存空间;相应的,所述剩余存储空间R(t)大于为所述队列1分配的动态缓存空间的缓存空间ΔL2,因此为所述队列1一次动态分配2个缓存空间。
步骤208:当前队列被正常转发,为队列配置标记1,表示占用动态缓存空间。
本实施例中,在所述队列占用所述动态缓存空间中的缓存空间过程中,所述队列在原所述静态缓存空间只进行缓存释放操作,直至为所述队列分配的所述动态缓存空间中的存储区域被所述队列占满;也即为所述队列0分配的4个缓存空间未被占满之前,所述队列0在所述静态缓存空间中的资源回收时用所述标记0进行静态空间回收。另一方面,所述队列0在所述动态缓存空间中也可能进行回收处理,即所述队列0在所述动态缓存空间中的资源回收时用所述标记1进行动态空间回收;当为所述队列0成功分配了静态缓存空间的入队后,即将所述队列0的标记1改为标记0,并控制所述队列0转发至所述静态缓存空间,重新进行所述静态缓存空间的随机早期丢弃规则,即重新执行本实施例中步骤204至步骤209的过程。
进一步地,本实施例中,在所述动态缓存空间分配过程中,计算所述动态缓存空间的剩余存储空间R(t),每分配出一个存储空间时,所述剩余存储空间R(t)减一;每回收一个存储空间时,所述剩余存储空间R(t)加一。
采用本发明实施例的技术方案,通过预先配置的动态缓存空间作为区分优先级的动态缓存调整区,所述动态缓存空间可在网络拥塞场景时进行 基于优先级的动态缓存分配和释放;一方面可以根据网络实时情况为不同缓存需求的业务实现动态缓存空间的申请和释放,增加了对共享缓存空间的利用率,增强了系统对网络动态变化的适应性;另一方面对动态缓存空间可按照优先级进行动态分配,使得共享缓存空间能够更好地为高优先级业务服务,大大提升了网络的服务质量;最后,本发明实施例中所述动态缓存空间只涉及全部共享缓存空间的部分空间,减小了设计的复杂性,同时减小了现有技术中将全部缓存按优先级设置导致缓存浪费。
本发明实施例还提供了一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行本发明实施例所述的共享缓存分配方法。
实施例三
本发明实施例还提供了一种共享缓存分配装置,所述共享缓存分配装置可应用于各种网络通信设备中。图5为本发明实施例三的共享缓存分配装置的一种组成结构示意图,如图5所示,所述装置包括:配置单元31、第一处理单元32和第二处理单元33;其中,
所述配置单元31,配置为预先配置共享缓存空间为静态缓存空间和动态缓存空间;
所述第一处理单元32,配置为当有队列加入,且所述静态缓存空间的存储空间满足第一预设条件时,控制所述队列发起动态缓存空间申请;
所述第二处理单元33,配置为判定所述第一处理单元32发起的所述队列的动态缓存空间申请满足第二预设条件时,依据所述队列预先配置的调整系数为所述队列分配所述动态缓存空间中的缓存空间。
作为一种实施方式,所述第一处理单元32,配置为比较所述静态缓存空间的存储空间的估计值是否大于等于第一阈值,获得比较结果;当所述比较结果为所述静态缓存空间的存储空间的估计值大于等于第一阈值时, 确定所述静态缓存空间的存储空间满足第一预设条件;其中,所述静态缓存空间的存储空间的估计值等于所述静态缓存空间中的激活队列数与队列缓存深度的乘积。
作为一种实施方式,所述第二处理单元33,配置为判断所述队列的优先级是否满足预设优先级门限,并且所述动态缓存空间的剩余存储空间是否大于第二阈值,获得判断结果;其中,所述第二阈值为所述动态缓存空间的最小分配步长;当所述判断结果为所述队列的优先级满足预设优先级门限,并且所述动态缓存空间的剩余存储空间大于第二阈值时,确定所述队列的动态缓存空间申请满足第二预设条件。
作为一种实施方式,所述第二处理单元33,配置为依据所述调整系数α以及所述动态缓存空间的存储空间的最小分配步长(Δh)获得为所述队列分配所述动态缓存空间中的缓存空间(ΔL);所述调整系数α为非负整数;Δh为正整数;其中,ΔL=α×Δh。
本实施例中,所述配置单元31预先配置以下参数在配置表中:
1、静态缓存空间的容量和动态缓存空间的容量(所述静态缓存空间的容量和所述动态缓存空间的容量的总和为共享缓存空间的总容量);
2、静态缓存空间的丢弃阈值(包括高阈值和低阈值)和丢弃概率表;
3、动态缓存空间的优先级门限;
4、动态缓存空间的最小分配步长(Δh)和调整系数(α)。
本实施例中,所述第一处理单元32比较所述静态缓存空间的存储空间的估计值和所述高阈值(即第一阈值);当所述静态缓存空间的存储空间的估计值大于等于高阈值(即第一阈值)时,确定所述静态缓存空间的存储空间满足第一预设条件,从而触发动态缓存空间申请。
进一步地,当有新队列加入时,所述配置单元31中预先存储有配置表,从所述配置表中能够获得丢弃阈值(包括高阈值和低阈值)以及丢弃概率 表;所述第一处理单元32依据所述静态缓存空间当前的存储情况获得队列上一次更新得到的缓存深度,计算当前队列的缓存深度等于所述上一次更新得到的缓存深度与当前新队列需要的缓存申请数。进一步地,统计所述静态缓存空间中的激活队列数;基于所述激活队列数以及所述共享缓存深度计算所述静态缓存空间的存储空间的估计值;所述估计值等于激活队列数与队列缓存深度的乘积。进一步地,用所述估计值与所述丢弃阈值(包括高阈值和低阈值)进行比较,当比较结果为所述估计值小于所述低阈值时,不进行任何丢弃操作;当比较结果为所述估计值在所述低阈值和所述高阈值之间时,对新加入的数据包按预设丢弃概率表进行随机丢弃操作;当所述估计值大于等于所述高阈值时,触发所述队列发起动态缓存空间申请。
本实施例中,当所述第一处理单元32控制所述队列发起动态缓存空间申请后,所述第二处理单元33首先判断当前所述动态缓存空间的存储空间是否还能够存储新加入的队列以及所述队列是否满足动态缓存空间的申请条件;其中,为了体现不同的优先级可以获得不同的服务,优选地,作为一种实施方式,所述动态缓存空间可预先配置优先级门限,即当申请在所述动态缓存空间中的队列的优先级未达到其对应的优先级门限时,才可为所述队列分配所述动态缓存空间的存储空间。另一方面,当所述队列的优先级未达到其对应的优先级门限时,进一步判断所述动态缓存空间中的剩余存储空间是否大于第二阈值,所述第二阈值可以为所述动态缓存空间的最小分配步长Δh,当然,所述第二阈值也可以是预先配置的其他数值,本实施例中不作具体限定。
具体的,申请加入动态预先为每个队列配置调整系数α,作为一种实施方式,所述调整系数α的大小与所述队列的优先级正相关,即当所述队列的优先级高时,相应的所述队列的调整系数α也大;当所述队列的优先级 低时,相应的所述队列的优先级也小。例如,当所述队列的优先级为2时,所述队列的调整系数α配置为2;当所述队列的优先级为1时,所述队列的调整系数α配置为1。如图3所示,假设本示意中有两个队列,分别为第一队列和第二队列,其中,所述第一队列的优先级较低,假设所述第一队列的调整系数α等于2;所述第二队列的优先级较高,假设所述第二队列的调整系数α等于4;假定所述动态缓存空间的存储空间的最小分配步长Δh等于1。则图3中,每个小格表征所述动态缓存空间的存储空间的最小分配步长Δh,则最底层的四个小格表征4×Δh,可以理解为,第二队列的调整系数α等于4,则为所述第二队列分配的缓存空间ΔL2=4×Δh。倒数第二层的两个小格表征2×Δh,可以理解为,第一队列的调整系数α等于2,则为所述第二队列分配的缓存空间ΔL1=2×Δh。作为另一种实施方式,所述调整系数α的大小也可以根据所述队列的业务需求预先配置。可以理解为,所述调整系数α的大小可以依据业务类型预先配置,也可有人工自行配置。
作为一种实施方式,所述第二处理单元33计算为所述队列分配所述动态缓存空间中的缓存空间ΔL=α×Δh,以及计算所述动态缓存空间的剩余存储空间R(t),当所述动态缓存空间的剩余存储空间R(t)大于所述缓存空间ΔL时,则为所述队列一次性分配所述缓存空间ΔL大小的存储空间。
作为另一实施方式,所述第二处理单元33,还配置为为所述队列分配的所述动态缓存空间中的缓存空间被所述队列占满后,触发所述第一处理单元32重新为新的入队分配静态缓存空间中的缓存空间。
在本实施例中,具体的,所述配置单元31为存储在所述静态缓存空间和所述动态缓存空间中的队列分配不同的标记,例如,为存储在所述静态缓存空间的队列分配标记0,为存储在所述动态缓存空间的队列分配标记1。当所述队列加入至所述共享缓存空间时,默认为所述队列分配所述静态缓存空间的存储空间,即为所述队列分配标记0;当所述队列申请加入所述动 态缓存空间且申请成功后,为所述队列分配标记1。在所述队列占用所述动态缓存空间中的缓存空间过程中,所述队列在原所述静态缓存空间只进行缓存释放操作,直至为所述队列分配的所述动态缓存空间中的缓存空间被所述队列占满后,即为所述队列分配标记0,控制为所述队列重新分配静态缓存空间中的缓存空间。
本领域技术人员应当理解,本发明实施例的共享缓存分配装置中各处理单元的功能,可参照前述共享缓存分配方法的相关描述而理解,本发明实施例的共享缓存分配装置中各处理单元,可通过实现本发明实施例所述的功能的模拟电路而实现,也可以通过执行本发明实施例所述的功能的软件在智能终端上的运行而实现。
本实施例中,所述共享缓存分配装置中的配置单元31、第一处理单元32和第二处理单元33在实际应用中,均可由所述装置中的中央处理器(CPU,Central Processing Unit)、数字信号处理器(DSP,Digital Signal Processor)或可编程门阵列(FPGA,Field-Programmable Gate Array)实现。
基于图5所示的共享缓存分配装置,图6为本发明实施例三的共享缓存分配装置的另一种组成结构示意图;本实施例中所述共享缓存分配装置中的配置单元31、第一处理单元32和第二处理单元33可通过图6中所示的模块实现,具体包括:
所述配置单元31可通过队列阈值配置模块41和动态缓存配置模块42实现,即配置参数;所述队列阈值配置模块41可配置为存储静态缓存空间的容量和动态缓存空间的容量(所述静态缓存空间的容量和所述动态缓存空间的容量的总和为共享缓存空间的总容量)、静态缓存空间的丢弃阈值(包括高阈值和低阈值)和丢弃概率表;所述动态缓存配置模块42可配置为存储动态缓存空间的优先级门限、动态缓存空间的最小分配步长(Δh) 和调整系数(α)等等。
所述第一处理单元32可通过队列缓存计算模块43、比较模块44和动态缓存申请模块45实现;所述队列缓存计算模块43可配置为计算所述静态缓存空间的存储空间的估计值,具体的计算方法可参照实施例一至实施例三中所述,这里不再赘述。所述比较模块44配置为比较所述估计值和所述队列阈值配置模块41中配置的丢弃阈值,基于比较结果执行预设丢弃操作,并在所述估计值高于所述丢弃阈值中的高阈值时,通过所述动态缓存申请模块45发起所述动态缓存区域的申请。
所述第二处理单元33可通过动态空间计算模块46实现,所述动态空间计算模块46配置为判断所述动态缓存申请模块45发出的申请是否满足触发条件,并在满足触发条件后,依据队列的调整系数为所述队列分配所述动态缓存空间中的缓存空间,具体的分配方法可参照实施例一至实施例三所述,这里不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的设备和方法,可以通过其它的方式实现。以上所描述的设备实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,如:多个单元或组件可以结合,或可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的各组成部分相互之间的耦合、或直接耦合、或通信连接可以是通过一些接口,设备或单元的间接耦合或通信连接,可以是电性的、机械的或其它形式的。
上述作为分离部件说明的单元可以是、或也可以不是物理上分开的,作为单元显示的部件可以是、或也可以不是物理单元,即可以位于一个地方,也可以分布到多个网络单元上;可以根据实际的需要选择其中的部分或全部单元来实现本实施例方案的目的。
另外,在本发明各实施例中的各功能单元可以全部集成在一个处理单 元中,也可以是各单元分别单独作为一个单元,也可以两个或两个以上单元集成在一个单元中;上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:移动存储设备、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
或者,本发明上述集成的单元如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明实施例的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机、服务器、或者网络设备等)执行本发明各个实施例所述方法的全部或部分。而前述的存储介质包括:移动存储设备、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。
工业实用性
本发明实施例通过预先配置的动态缓存空间作为区分优先级的动态缓存调整区,所述动态缓存空间可在网络拥塞场景时进行基于优先级的动态缓存分配和释放;一方面可以根据网络实时情况为不同缓存需求的业务实 现动态缓存空间的申请和释放,增加了对共享缓存空间的利用率,增强了系统对网络动态变化的适应性;另一方面对动态缓存空间可按照优先级进行动态分配,使得共享缓存空间能够更好地为高优先级业务服务,大大提升了网络的服务质量;最后,本发明实施例中所述动态缓存空间只涉及全部共享缓存空间的部分空间,减小了设计的复杂性,同时减小了现有技术中将全部缓存按优先级设置导致缓存浪费。

Claims (11)

  1. 一种共享缓存分配方法,所述方法包括:
    预先配置共享缓存空间为静态缓存空间和动态缓存空间;
    当有队列加入,且所述静态缓存空间的存储空间满足第一预设条件时,控制所述队列发起动态缓存空间申请;
    判定所述队列的动态缓存空间申请满足第二预设条件时,依据所述队列预先配置的调整系数为所述队列分配所述动态缓存空间中的缓存空间。
  2. 根据权利要求1所述的方法,其中,所述静态缓存空间的存储空间满足第一预设条件,包括:
    比较所述静态缓存空间的存储空间的估计值是否大于等于第一阈值,获得比较结果;
    当所述比较结果为所述静态缓存空间的存储空间的估计值大于等于第一阈值时,确定所述静态缓存空间的存储空间满足第一预设条件;
    其中,所述静态缓存空间的存储空间的估计值等于所述静态缓存空间中的激活队列数与队列缓存深度的乘积。
  3. 根据权利要求1所述的方法,其中,所述判定所述队列的动态缓存空间申请满足第二预设条件,包括:
    判断所述队列的优先级是否满足预设优先级门限,并且所述动态缓存空间的剩余存储空间是否大于第二阈值,获得判断结果;其中,所述第二阈值为所述动态缓存空间的最小分配步长;
    当所述判断结果为所述队列的优先级满足预设优先级门限,并且所述动态缓存空间的剩余存储空间大于第二阈值时,确定所述队列的动态缓存空间申请满足第二预设条件。
  4. 根据权利要求1所述的方法,其中,所述依据所述队列预先配置的调整系数为所述队列分配所述动态缓存空间中的缓存空间,包括:
    依据所述调整系数α以及所述动态缓存空间的存储空间的最小分配步长Δh获得为所述队列分配所述动态缓存空间中的缓存空间ΔL;所述调整系数α为非负整数;Δh为正整数;
    其中,ΔL=α×Δh。
  5. 根据权利要求1所述的方法,其中,所述为所述队列分配所述动态缓存空间中的缓存空间之后,所述方法还包括:
    为所述队列分配的所述动态缓存空间中的缓存空间被所述队列占满后,重新为新的入队分配静态缓存空间中的缓存空间。
  6. 一种共享缓存分配装置,所述装置包括:配置单元、第一处理单元和第二处理单元;其中,
    所述配置单元,配置为预先配置共享缓存空间为静态缓存空间和动态缓存空间;
    所述第一处理单元,配置为当有队列加入,且所述静态缓存空间的存储空间满足第一预设条件时,控制所述队列发起动态缓存空间申请;
    所述第二处理单元,配置为判定所述第一处理单元发起的所述队列的动态缓存空间申请满足第二预设条件时,依据所述队列预先配置的调整系数为所述队列分配所述动态缓存空间中的缓存空间。
  7. 根据权利要求6所述的装置,其中,所述第一处理单元,配置为比较所述静态缓存空间的存储空间的估计值是否大于等于第一阈值,获得比较结果;当所述比较结果为所述静态缓存空间的存储空间的估计值大于等于第一阈值时,确定所述静态缓存空间的存储空间满足第一预设条件;其中,所述静态缓存空间的存储空间的估计值等于所述静态缓存空间中的激活队列数与队列缓存深度的乘积。
  8. 根据权利要求6所述的装置,其中,所述第二处理单元,配置为判断所述队列的优先级是否满足预设优先级门限,并且所述动态缓存空间的 剩余存储空间是否大于第二阈值,获得判断结果;其中,所述第二阈值为所述动态缓存空间的最小分配步长;当所述判断结果为所述队列的优先级满足预设优先级门限,并且所述动态缓存空间的剩余存储空间大于第二阈值时,确定所述队列的动态缓存空间申请满足第二预设条件。
  9. 根据权利要求6所述的装置,其中,所述第二处理单元,配置为依据所述调整系数α以及所述动态缓存空间的存储空间的最小分配步长Δh获得为所述队列分配所述动态缓存空间中的缓存空间ΔL;所述调整系数α为非负整数;Δh为正整数;其中,ΔL=α×Δh。
  10. 根据权利要求6所述的装置,其中,所述第二处理单元,还配置为为所述队列分配的所述动态缓存空间中的缓存空间被所述队列占满后,触发所述第一处理单元重新为新的入队分配静态缓存空间中的缓存空间。
  11. 一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行权利要求1至5任一项所述的共享缓存分配方法。
PCT/CN2016/081593 2015-06-29 2016-05-10 一种共享缓存分配方法、装置及计算机存储介质 WO2017000673A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510368551.8 2015-06-29
CN201510368551.8A CN106330770A (zh) 2015-06-29 2015-06-29 一种共享缓存分配方法及装置

Publications (1)

Publication Number Publication Date
WO2017000673A1 true WO2017000673A1 (zh) 2017-01-05

Family

ID=57607696

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/081593 WO2017000673A1 (zh) 2015-06-29 2016-05-10 一种共享缓存分配方法、装置及计算机存储介质

Country Status (2)

Country Link
CN (1) CN106330770A (zh)
WO (1) WO2017000673A1 (zh)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110688226A (zh) * 2019-09-27 2020-01-14 苏州浪潮智能科技有限公司 一种缓存回收方法、装置、设备及可读存储介质
CN111314240A (zh) * 2018-12-12 2020-06-19 深圳市中兴微电子技术有限公司 拥塞控制方法及装置、网络设备及存储介质
CN111400206A (zh) * 2020-03-13 2020-07-10 西安电子科技大学 基于动态虚拟门限的缓存管理方法
CN111858508A (zh) * 2020-06-17 2020-10-30 远光软件股份有限公司 一种日志系统的调控方法、装置、存储介质及电子设备
CN112395245A (zh) * 2019-08-16 2021-02-23 上海寒武纪信息科技有限公司 处理器的访问装置、方法及计算机设备
CN112446473A (zh) * 2019-08-31 2021-03-05 上海寒武纪信息科技有限公司 数据处理装置和方法
CN112446501A (zh) * 2020-10-30 2021-03-05 北京邮电大学 真实网络环境中缓存分配模型的获取方法、装置及系统
CN112783803A (zh) * 2021-01-27 2021-05-11 于慧 一种计算机cpu-gpu共享缓存控制方法及系统
CN113590031A (zh) * 2021-06-30 2021-11-02 郑州云海信息技术有限公司 一种缓存管理方法、装置、设备以及计算机可读存储介质
WO2023065915A1 (zh) * 2021-10-22 2023-04-27 华为技术有限公司 存储方法、装置、设备及存储介质
CN117201403A (zh) * 2023-09-15 2023-12-08 南京华芯科晟技术有限公司 缓存控制方法、装置和设备

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109428827B (zh) * 2017-08-21 2022-05-13 深圳市中兴微电子技术有限公司 一种流量自适应的缓存分配装置及方法、onu设备
CN109428829B (zh) * 2017-08-24 2023-04-07 中兴通讯股份有限公司 多队列缓存管理方法、装置及存储介质
CN109495401B (zh) * 2018-12-13 2022-06-24 迈普通信技术股份有限公司 缓存的管理方法及装置
CN112000294A (zh) * 2020-08-26 2020-11-27 北京浪潮数据技术有限公司 一种io队列深度调节方法、装置及相关组件
CN113507423A (zh) * 2021-04-25 2021-10-15 清华大学 流量感知的交换机共享缓存调度方法及装置
CN115878334B (zh) * 2023-03-08 2023-05-12 深圳云豹智能有限公司 一种数据缓存处理方法及其系统、存储介质、电子设备

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5838994A (en) * 1996-01-11 1998-11-17 Cisco Technology, Inc. Method and apparatus for the dynamic allocation of buffers in a digital communications network
US6892284B2 (en) * 2002-09-11 2005-05-10 Intel Corporation Dynamic memory allocation for assigning partitions to a logical port from two groups of un-assigned partitions based on two threshold values
CN1798094A (zh) * 2004-12-23 2006-07-05 华为技术有限公司 一种使用缓存区的方法
CN102185725A (zh) * 2011-05-31 2011-09-14 北京星网锐捷网络技术有限公司 一种缓存的管理方法、装置和网络交换设备
CN102223300A (zh) * 2011-06-09 2011-10-19 武汉烽火网络有限责任公司 一种网络设备中多媒体数据的传输控制方法
CN102299839A (zh) * 2010-06-24 2011-12-28 创锐讯通讯技术(上海)有限公司 Eoc网络中用户端设备的mac芯片及其实现方法
CN104052683A (zh) * 2013-03-14 2014-09-17 雷凌科技股份有限公司 处理分组交换的网络处理器及方法、网络交换系统

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100489814C (zh) * 2007-08-01 2009-05-20 杭州华三通信技术有限公司 一种共享缓存系统及实现方法
CN101605100B (zh) * 2009-07-15 2012-04-25 华为技术有限公司 队列存储空间的管理方法和设备
CN104426790B (zh) * 2013-08-26 2019-02-26 中兴通讯股份有限公司 对多队列的缓存空间进行分配控制的方法及装置

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5838994A (en) * 1996-01-11 1998-11-17 Cisco Technology, Inc. Method and apparatus for the dynamic allocation of buffers in a digital communications network
US6892284B2 (en) * 2002-09-11 2005-05-10 Intel Corporation Dynamic memory allocation for assigning partitions to a logical port from two groups of un-assigned partitions based on two threshold values
CN1798094A (zh) * 2004-12-23 2006-07-05 华为技术有限公司 一种使用缓存区的方法
CN102299839A (zh) * 2010-06-24 2011-12-28 创锐讯通讯技术(上海)有限公司 Eoc网络中用户端设备的mac芯片及其实现方法
CN102185725A (zh) * 2011-05-31 2011-09-14 北京星网锐捷网络技术有限公司 一种缓存的管理方法、装置和网络交换设备
CN102223300A (zh) * 2011-06-09 2011-10-19 武汉烽火网络有限责任公司 一种网络设备中多媒体数据的传输控制方法
CN104052683A (zh) * 2013-03-14 2014-09-17 雷凌科技股份有限公司 处理分组交换的网络处理器及方法、网络交换系统

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111314240A (zh) * 2018-12-12 2020-06-19 深圳市中兴微电子技术有限公司 拥塞控制方法及装置、网络设备及存储介质
CN112395245A (zh) * 2019-08-16 2021-02-23 上海寒武纪信息科技有限公司 处理器的访问装置、方法及计算机设备
CN112446473A (zh) * 2019-08-31 2021-03-05 上海寒武纪信息科技有限公司 数据处理装置和方法
CN110688226A (zh) * 2019-09-27 2020-01-14 苏州浪潮智能科技有限公司 一种缓存回收方法、装置、设备及可读存储介质
CN110688226B (zh) * 2019-09-27 2023-01-10 苏州浪潮智能科技有限公司 一种缓存回收方法、装置、设备及可读存储介质
CN111400206B (zh) * 2020-03-13 2023-03-24 西安电子科技大学 基于动态虚拟门限的缓存管理方法
CN111400206A (zh) * 2020-03-13 2020-07-10 西安电子科技大学 基于动态虚拟门限的缓存管理方法
CN111858508A (zh) * 2020-06-17 2020-10-30 远光软件股份有限公司 一种日志系统的调控方法、装置、存储介质及电子设备
CN111858508B (zh) * 2020-06-17 2023-01-31 远光软件股份有限公司 一种日志系统的调控方法、装置、存储介质及电子设备
CN112446501A (zh) * 2020-10-30 2021-03-05 北京邮电大学 真实网络环境中缓存分配模型的获取方法、装置及系统
CN112446501B (zh) * 2020-10-30 2023-04-21 北京邮电大学 真实网络环境中缓存分配模型的获取方法、装置及系统
CN112783803A (zh) * 2021-01-27 2021-05-11 于慧 一种计算机cpu-gpu共享缓存控制方法及系统
CN112783803B (zh) * 2021-01-27 2022-11-18 湖南中科长星科技有限公司 一种计算机cpu-gpu共享缓存控制方法及系统
CN113590031A (zh) * 2021-06-30 2021-11-02 郑州云海信息技术有限公司 一种缓存管理方法、装置、设备以及计算机可读存储介质
CN113590031B (zh) * 2021-06-30 2023-09-12 郑州云海信息技术有限公司 一种缓存管理方法、装置、设备以及计算机可读存储介质
WO2023065915A1 (zh) * 2021-10-22 2023-04-27 华为技术有限公司 存储方法、装置、设备及存储介质
CN117201403A (zh) * 2023-09-15 2023-12-08 南京华芯科晟技术有限公司 缓存控制方法、装置和设备
CN117201403B (zh) * 2023-09-15 2024-03-22 南京华芯科晟技术有限公司 缓存控制方法、装置和设备

Also Published As

Publication number Publication date
CN106330770A (zh) 2017-01-11

Similar Documents

Publication Publication Date Title
WO2017000673A1 (zh) 一种共享缓存分配方法、装置及计算机存储介质
US8514707B2 (en) Non-blocking admission control
CN107347039B (zh) 一种共享缓存空间的管理方法及装置
WO2014075555A1 (zh) 一种时隙资源的调度方法及装置
CN112269641B (zh) 一种调度方法、装置、电子设备及存储介质
CN107592284B (zh) 防DoS/DDoS攻击的装置和方法
WO2017000872A1 (zh) 缓存分配方法及装置
US20150103646A1 (en) Allocating network bandwith
WO2013117136A1 (zh) 一种基于容量的多任务调度方法、设备及系统
CN111030945B (zh) 容灾方法、容灾网关、存储介质、装置以及系统
CN110958592B (zh) 一种基于时延感知的雾计算物联网组网方法
US9825879B2 (en) Method and arrangement for admission control based on priority level based differentiation
KR102273414B1 (ko) 적응적 동기화를 위한 데이터 분류
US8032658B2 (en) Computer architecture and process for implementing a virtual vertical perimeter framework for an overloaded CPU having multiple network interfaces
KR102153543B1 (ko) 무선 환경에서 usb 통신을 위한 버퍼 관리 방법 및 장치
US20150055460A1 (en) Method and Radio Network Node for Managing Radio Resources
CN112491566B (zh) 资源管理方法、资源管理系统及计算机可读存储介质
US9413672B2 (en) Flow control for network packets from applications in electronic devices
US11316916B2 (en) Packet processing method, related device, and computer storage medium
CN114640630B (zh) 一种流量管控方法、装置、设备及可读存储介质
CN108076020B (zh) 一种缓存空间的管理方法及装置
CN112684988A (zh) 基于分布式存储的QoS方法及系统
WO2011120465A2 (zh) 消息处理方法和系统
WO2023112091A1 (ja) リソース割当装置及びリソース割当方法
CN116775238A (zh) 资源调度方法及装置、电子设备及存储介质

Legal Events

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

Ref document number: 16817037

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16817037

Country of ref document: EP

Kind code of ref document: A1