Resource processing method, device, computer equipment and storage medium

By deploying a shared proxy client on computing nodes in cloud computing scenarios and managing resources uniformly, the resource preemption problem caused by object storage and file storage proxy conversion is solved, and efficient resource utilization and user experience improvement is achieved.

CN119356894BActive Publication Date: 2025-03-25CHINA TELECOM CLOUD TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411933227.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-03-25
Estimated Expiration
2044-12-26

AI Technical Summary

Technical Problem

In cloud computing scenarios, proxy conversion of object storage and file storage leads to insufficient resource consumption management of computing nodes, which is prone to resource preemption.

Method used

By deploying a shared proxy client on the compute node, the reserved CPU, memory and cache resources are uniformly managed, and available resources are allocated to each user object to avoid resource preemption.

Benefits of technology

It realizes unified management of computing node resources, avoids resource seizure, and improves resource utilization and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119356894B_ABST
    Figure CN119356894B_ABST
Patent Text Reader

Abstract

The present application relates to a resource processing method, device, computer equipment and storage medium. The method includes: when there is a new user object, determining the resource setting information under different resource types set for the new user object; each resource setting information includes a guaranteed resource amount and a resource amount upper limit; for each resource type, according to the guaranteed resource amount under the targeted resource type, from the guaranteed resource pool under the targeted resource type, allocating available resources under the targeted resource type to the new user object; in response to the proxy conversion operation triggered by the new user object, performing proxy conversion based on the available resources under each resource type allocated to the new user object. The present application can be used to manage resources in a unified manner.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a resource processing method, apparatus, computer equipment and storage medium. Background Art

[0002] Object storage is widely used in cloud computing scenarios due to its low hardware cost, flexible expansion on demand, and unified access interface. In cloud computing scenarios, file storage is a must, which is more in line with the development standards of most programs and in line with user usage habits. In order to combine the advantages of object storage and file storage, file storage can be converted to object storage through proxy conversion. In this way, users can maintain their usage habits of file storage while obtaining the advantages of object storage.

[0003] Since proxy conversion consumes CPU, memory, cache and other resources on the computing node, there is currently no adequate management of resource consumption on the computing node. In particular, when more users are mounted on the same computing node and all users need to perform proxy conversion, resource preemption is likely to occur. Summary of the invention

[0004] Based on this, it is necessary to provide a resource processing method, apparatus, computer equipment, computer-readable storage medium and computer program product that can uniformly manage resources on computing nodes in response to the above technical problems.

[0005] In a first aspect, the present application provides a resource processing method. The method comprises:

[0006] When there is a new user object, determining resource setting information under different resource types set for the new user object; each resource setting information includes a guaranteed resource amount and a resource amount upper limit;

[0007] For each resource type, according to the guaranteed resource amount under the targeted resource type, the available resources under the targeted resource type are allocated to the new user object from the guaranteed resource pool under the targeted resource type; wherein the guaranteed resource pool under the targeted resource type is a resource pool divided from the total resources under the targeted resource type in the computing node and used to guarantee the execution of proxy conversion for each user mounted in the computing node;

[0008] In response to the proxy conversion operation triggered by the new user object, proxy conversion is performed based on available resources under each resource type allocated to the new user object.

[0009] In a second aspect, the present application also provides a resource processing device. The device comprises:

[0010] A resource setting information acquisition module, used to determine resource setting information of different resource types set for a new user object when there is a new user object; each resource setting information includes a guaranteed resource amount and a resource amount upper limit;

[0011] A resource allocation module, for allocating available resources of the targeted resource type to the new user object from a guaranteed resource pool of the targeted resource type according to the guaranteed resource amount of the targeted resource type for each resource type; wherein the guaranteed resource pool of the targeted resource type is a resource pool divided from the total resources of the targeted resource type in the computing node and used to guarantee the execution of proxy conversion by each user mounted in the computing node;

[0012] The resource using module is used to respond to the proxy conversion operation triggered by the new user object and perform proxy conversion based on the available resources under each resource type allocated to the new user object.

[0013] In a third aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, any resource processing method in the embodiments of the present application is implemented.

[0014] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements any resource processing method in the embodiments of the present application when executed by a processor.

[0015] In a fifth aspect, the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, any resource processing method in the embodiments of the present application is implemented.

[0016] The above-mentioned resource processing method, apparatus, computer equipment, storage medium and computer program product deploy a shared proxy client on a computing node, and can allocate available resources to each user object through the shared proxy client according to the resource setting information set for each user object. Then, when each user object performs proxy conversion, it can perform proxy conversion based on its own available resources, and resource preemption will not occur. This is a new resource management method. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 An application environment diagram of a resource processing method in an embodiment;

[0018] Figure 2 A schematic diagram of a process flow of a resource processing method in an embodiment;

[0019] Figure 3 It is a schematic diagram of the overall flow of a write operation in one embodiment;

[0020] Figure 4 It is a schematic diagram of the overall flow of a read operation in one embodiment;

[0021] Figure 5 A schematic diagram of the overall process of adjusting available resources in one embodiment;

[0022] Figure 6 It is a schematic diagram of the overall process of resource processing in one embodiment;

[0023] Figure 7 A schematic diagram of the overall process of resource recycling in one embodiment;

[0024] Figure 8 is a structural block diagram of a resource processing device in one embodiment;

[0025] Fig. 9 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0026] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0027] The resource processing method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the computing nodes 102 communicate with each other through the network. The data storage system can store the data that the computing node 102 needs to process. The data storage system can be integrated on the computing node 102, or it can be placed on the cloud or other servers. Among them, the computing node 102 can be a terminal or a server. The terminal can be but not limited to various desktop computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server can be implemented as an independent server or a server cluster consisting of multiple servers.

[0028] In one embodiment, Figure 2 As shown, a resource processing method is provided, which is applied to Figure 1 The following steps are taken as an example to illustrate the computing node in the example:

[0029] Step 202: when there is a new user object, determine resource setting information of different resource types set for the new user object; each resource setting information includes a guaranteed resource amount and a resource amount upper limit.

[0030] Specifically, the resource type may be a memory type, a cache type, etc. The resource setting information includes a guaranteed resource amount and a resource amount upper limit. The guaranteed resource amount refers to the resources used to guarantee the execution of the proxy conversion, and the resource amount upper limit refers to the maximum resource amount that the user object can obtain. For example, when there is a new user on the computing node, it can be checked in the user manager whether the user is mounted for the first time based on the user object storage bucket and bucket access authorization information; if the user is mounted for the first time, the new user object of the user is determined, and the user information of the user object of the letter is recorded in the user manager. The user information includes the user file mount directory, storage bucket information, bucket access authorization information, user metadata storage path, data access authorization information, storage size, and operation speed limit quota information. The user information also includes resource setting information under different resource types set for the new user object, wherein each resource setting information includes a guaranteed resource amount and a resource amount upper limit. Exemplarily, the user information also includes a guaranteed memory value and a memory value upper limit, a guaranteed cache value, and a cache value upper limit. It is easy to understand that the guaranteed memory value is the guaranteed resource amount under the memory resource type, the memory value upper limit is the resource amount upper limit under the memory resource type, the guaranteed cache value is the guaranteed resource amount under the cache resource type, and the cache value upper limit is the resource amount upper limit under the cache resource type.

[0031] Step 204, for each resource type, according to the guaranteed resource amount under the targeted resource type, allocate available resources under the targeted resource type to the new user object from the guaranteed resource pool under the targeted resource type; wherein the guaranteed resource pool under the targeted resource type is a resource pool divided from the total resources under the targeted resource type in the computing node, which is used to guarantee the execution of proxy conversion for each user mounted in the computing node.

[0032] Specifically, for each resource type, a guaranteed resource pool under the targeted resource type can be divided from the total resources under the targeted resource type. For example, for memory, a portion of the total memory in the computing node can be divided as a guaranteed resource pool under the memory resource type, for example, 3G memory can be reserved from the computing node as a guaranteed resource pool under the memory resource type; for cache, a portion of the cache can be divided from the total cache of the computing node as a guaranteed resource pool under the cache resource type, for example, 30G cache can be reserved from the computing node as a guaranteed resource pool under the cache resource type. Subsequently, various guaranteed resources can be allocated from each guaranteed resource pool to each user object mounted on the computing node.

[0033] When there is a new user object and the resource setting information under different resource types set for the new user object is determined, for each resource type, the shared proxy conversion client in the computing node can allocate resources of the guaranteed resource amount under the targeted resource type from the guaranteed resource pool under the targeted resource type to the new user object, and use the allocated resources as available resources. For example, for memory, when the resource setting information under the memory resource type includes {guaranteed resource amount: 1G}, for cache, when the resource setting information under the cache resource type includes {guaranteed resource amount: 20G}, 1G of memory can be allocated to the new user object from the guaranteed resource pool under the memory resource type as an available resource under the memory resource type, and 20G of cache can be allocated to the new user object from the guaranteed resource pool under the cache resource type as an available resource under the cache resource type.

[0034] For the convenience of description, the following refers to the guaranteed resource pool under the memory resource type as the memory guaranteed resource pool; the guaranteed resource pool under the cache resource type as the cache guaranteed resource pool; the shared resource pool under the memory resource type as the memory shared resource pool, and the shared resource pool under the cache resource type as the cache shared resource pool; the available resources under the memory resource type as the memory available resources; the available resources under the cache resource type as the cache available resources; the guaranteed resource amount in the resource setting information under the memory resource type as the memory guaranteed resource amount; the guaranteed resource amount in the resource setting information under the cache resource type as the cache guaranteed resource amount; the upper limit of the resource amount in the resource setting information under the memory resource type as the memory resource amount upper limit; the upper limit of the resource amount in the resource setting information under the cache resource type as the cache resource amount upper limit.

[0035] Step 206: In response to the proxy conversion operation triggered by the new user object, proxy conversion is performed based on available resources under each resource type allocated to the new user object.

[0036] Specifically, when a new user object triggers a proxy conversion operation, for example, when the new user object writes data to a file directory, or when the new user object reads data from a file directory, the computing node performs a proxy conversion based on the available resources under each resource type allocated to the new user object. For example, the computing node can write data to the file directory, or read data from the file directory based on the available memory resources and cache resources of the new user object.

[0037] In the above resource processing method, a shared proxy client is deployed on a computing node, and available resources can be allocated to each user object through the shared proxy client according to the resource setting information set for each user object. Then, when each user object performs proxy conversion, it can perform proxy conversion based on its own available resources, and resource preemption will not occur. This is a new resource management method.

[0038] In one of the embodiments, available resources under the targeted resource type are allocated to the new user object from the guaranteed resource pool under the targeted resource type, including: determining the guaranteed resource pool under the targeted resource type; when the remaining amount of resources in the guaranteed resource pool under the targeted resource type is greater than or equal to the guaranteed amount of resources in the resource setting information under the targeted resource type, allocating resources of the guaranteed amount of resources in the resource setting information under the targeted resource type from the guaranteed resource pool under the targeted resource type to the new user object, and using the allocated resources as the available resources under the targeted resource type for the new user object.

[0039] Specifically, when it is necessary to allocate available memory resources for a new user object, the shared proxy client can determine the memory guarantee resource pool and determine whether the amount of remaining resources in the memory guarantee resource pool is greater than or equal to the amount of memory guarantee resources in the resource setting information. The remaining resources in the memory guarantee resource pool refer to the resources that are not allocated to the user object. If it is greater than or equal to, the resources of the memory guarantee resource amount in the memory guarantee resource pool are allocated to the new user object, and the allocated resources are used as the available memory resources of the new user object. If it is less than, all the remaining resources in the guaranteed memory pool are allocated to the new user object, and the allocated resources are also used as the available memory resources of the new user object.

[0040] Accordingly, when it is necessary to allocate cache available resources for a new user object, the shared proxy client can determine the cache guarantee resource pool and determine whether the amount of remaining resources in the cache guarantee resource pool is greater than or equal to the amount of cache guarantee resources in the resource setting information. The remaining resources in the cache guarantee resource pool refer to the resources that are not allocated to the user object. If it is greater than or equal to, the resources of the cache guarantee amount in the cache guarantee resource pool are allocated to the new user object, and the allocated resources are used as the cache available resources of the new user object. If it is less than, all the remaining resources in the guarantee cache pool are allocated to the new user object, and the allocated resources are also used as the cache available resources of the new user object.

[0041] If the guaranteed memory pool does not have any remaining resources, the server waits for the shared memory pool to allocate available memory for the new user object. Correspondingly, if the guaranteed buffer pool does not have any remaining resources, the server waits for the shared buffer pool to allocate available buffer for the new user object.

[0042] In this embodiment, by setting up a security resource pool, user quota management can be implemented based on the security resource pool. And by pre-dividing the security resource pool, users can preferentially perform proxy conversion based on resources in the security resource pool, thus avoiding resource preemption with other tasks in the computing node.

[0043] In one of the embodiments, the available resources under each resource type include available memory resources and available cache resources; proxy conversion is performed based on the available resources under each resource type allocated to the new user object, including: when the proxy conversion includes a write operation, when there is idle write memory that meets the resource amount required for the write operation in the available memory resources allocated to the new user object, the data required for the write operation is written block by block into the memory blocks in the idle write memory, and the identifiers of the memory blocks are stored in the write queue, and a write processing task is generated to schedule the write processing task to the idle CPU in the CPU guarantee resource pool, and the identifiers of the memory blocks are extracted from the write queue in turn based on the idle CPUs, and the data in the memory blocks corresponding to the extracted memory block identifiers are written into the idle write cache in the cache available resources, and the memory blocks corresponding to the extracted memory block identifiers are released; the data written into the idle write cache is written into the remote storage in turn.

[0044] Specifically, when the proxy conversion includes a write operation, the computing node determines whether there is free write memory in the available memory resources allocated to the new user object that meets the resource amount required for the write operation. If so, the data required for the write operation is written block by block into the memory blocks in the free write memory, and the identifiers of the memory blocks with written data are stored in the write queue.

[0045] The computing node generates a write processing task and schedules the write processing task to an idle CPU in the CPU guarantee resource pool. Based on the CPU to which it is scheduled, it extracts the identifier of the memory block from the write queue in turn, writes the data in the memory block corresponding to the extracted memory block identifier into the idle write cache in the cache available resources allocated by the new user object, and releases the memory block corresponding to the extracted memory block identifier. The computing node sends the data written into the idle write cache to the remote end in turn to be stored in the remote object storage.

[0046] In one of the embodiments, the above method also includes: determining the amount of total memory for write operations divided from the available memory resources allocated for the new user object; when it is determined that there is free write memory in the total memory for write operations based on the amount of total memory for write operations and the amount of used memory in the total memory for write operations, comparing the amount of free write memory with the amount of data required for the write operation; when the amount of free write memory is greater than or equal to the amount of data required for the write operation, determining that there is free write memory in the available memory resources that meets the amount of resources required for the write operation.

[0047] Specifically, compare whether the amount of used memory in the total memory for write operations is less than the amount of memory in the total memory for write operations. If so, there is free write memory in the total memory for write operations. If so, there is no free write memory. Then compare whether the amount of free write memory is greater than or equal to the size of the user's written data. If so, it can be determined that there is a free write memory source in the available memory resources allocated to the new user object that meets the amount of resources required for the write operation. Otherwise, there is not enough free write memory. Among them, the initial total memory resources for write operations can be 20% of the available memory resources. Subsequently, the total memory resources for write operations will be adjusted synchronously after the resource manager adjusts the available memory resources periodically.

[0048] In one embodiment, reference Figure 3 When there is enough free write memory, the write processing task is scheduled by the system to the reserved idle CPU, and a piece of data in the memory queue is taken out, written into the cache, and the memory block is released at the same time; at the same time, the cache is checked to see if there is any data that has not been written to the remote object storage. If there is and there is no write operation to the remote object storage being executed, a piece of data is taken out and written into the object storage. The write processing task is continuously cycled until all the memory block data in the memory queue are written into the cache, and all the data in the cache block are written into the remote object storage. Figure 3 A schematic diagram of the overall flow of a write operation in an embodiment is shown.

[0049] In one embodiment, when there is no free write memory in the available memory resources that satisfies the required amount of resources for the write operation, the system enters a waiting state until there is free write memory that satisfies the required amount of resources for the write operation. When there is no free write memory in the available memory resources that satisfies the required amount of resources for the write operation, the memory usage rate exceeds the memory recycling threshold, which triggers the subsequent allocation of the remaining memory from the memory shared resource pool to the new user object, or, when there is no remaining memory in the memory shared resource pool, a portion of the memory is allocated from the target object that meets the resource allocation conditions to the new user object.

[0050] In one embodiment, before writing the data in the memory block into the cache, it can also be determined whether there is free write cache in the total write operation cache resources allocated to the new user object that is larger than the amount of data required for the write operation. If there is enough free write cache, the data in the memory block is written into the free write cache. The initial total write operation cache resources can be 20% of the available cache resources. Subsequently, the total write operation cache resources will be adjusted synchronously after the resource manager adjusts the available cache resources periodically.

[0051] In one of the embodiments, the available resources under each resource type include available memory resources and available cache resources; proxy conversion is performed based on the available resources under each resource type allocated to the new user object, including: when the proxy conversion includes a read operation, if there is idle read memory in the available memory resources allocated to the new user object that satisfies the amount of resources required for the read operation, a read processing task is generated; the read processing task is scheduled to an idle CPU in a CPU guarantee resource pool, and based on the idle CPU, data required to be read by the read processing task is searched from the available cache resources allocated to the new user object, and the found data is stored in the idle read memory in the available memory resources.

[0052] Specifically, when the proxy conversion includes a read operation, the computing node determines whether there is free read memory in the available memory resources allocated to the new user object that meets the resource amount required for the read operation. If so, a read processing task is generated and scheduled to the idle CPU in the CPU guarantee resource pool. Based on the idle CPU, the data required to be read by the read processing task is searched from the cache available resources, and the found data is stored in the free read memory in the available memory resources.

[0053] In one embodiment, reference Figure 4 , Figure 4 The overall flow diagram of a read operation in an embodiment is shown. When a new user object reads data from a mounted file directory, the read processor checks whether there is enough free read memory to complete the reading of the user data. If not, it waits for other tasks to release memory. If yes, it calculates the length of the pre-read data based on the amount of data read by the user. Pre-read data refers to the data that the predicted user object may also read. Start the read processing task, and wait for the user's required data and the pre-read data to be retrieved. Among them, judging whether there is enough free read memory includes: comparing whether the amount of used memory in the total memory resources of the read operation is less than the amount of memory of the total memory of the read operation, if less, there is free read memory, and if equal, there is no free read memory. Comparing whether the amount of free read memory is greater than or equal to the size of the user read data, if so, there is free read memory in the available memory resources allocated to the new user object that meets the amount of resources required for the read operation, if not, there is no free read memory in the available memory resources allocated to the new user object that meets the amount of resources required for the read operation.

[0054] Furthermore, the amount of free read memory is compared to see whether it is greater than or equal to the user read data plus the pre-read data size. If not, the pre-read data length is reduced. If yes, the pre-read data length does not need to be adjusted. The initial total memory for write operations is 80% of the available memory resources. Subsequently, the total memory resources for write operations will be adjusted synchronously after the resource manager adjusts the available memory resources periodically.

[0055] Furthermore, when there is enough free read memory in the available memory resources allocated for the new user object, the read processing task is scheduled by the system to the reserved idle CPU. The read processing task first searches the available cache resources allocated for the new user object to see if the data already exists in the cache. If it does, the data is read directly from the cache. If the data is missing, it is read from the remote object in blocks, and after reading, it is placed in the memory block in the total write operation memory allocated for the new user object. In addition, a copy can be stored in the cache at the same time. When it is checked that the data required by the user has been retrieved, the data is returned to the new user object and the read is completed. There is no need to wait for the pre-read data to be retrieved. The read processing task will automatically complete the reading of the remaining pre-read data.

[0056] In the above embodiment, for each resource, total read operation resources and total write operation resources are divided from the available resources, and read operations and write operations can be completed based on the total read operation resources and the total write operation resources respectively, so that resource preemption will not occur when the read operation and the write operation are executed simultaneously.

[0057] In one of the embodiments, the above method also includes: classifying users having first resource setting information under the targeted resource type into a high-level user group; the first resource setting information is resource setting information having a guaranteed resource amount and a resource amount upper limit that are the same; classifying users having second resource setting information under the targeted resource type into a second-highest user group; the second resource setting information is resource setting information having a guaranteed resource amount less than a resource amount upper limit that are the same; classifying users having third resource setting information under the targeted resource type into a low-level user group; the third resource setting information is resource setting information that only includes a guaranteed resource amount.

[0058] Specifically, all user objects mounted on the computing node can be grouped. Since each user object has resource setting information, the user objects can be grouped according to the resource setting information. For each resource type, user objects with the first resource setting information under the targeted resource type can be divided into a high-level user group, users with the second resource setting information under the targeted resource type can be divided into a second-highest user group, and users with the third resource setting information under the targeted resource type can be divided into a low-level user group. Among them, the first resource setting information is the resource setting information in which the guaranteed resource amount and the upper limit of the resource amount are the same; the second resource setting information is the resource setting information in which the guaranteed resource amount is less than the upper limit of the resource amount; and the third resource setting information is the resource setting information that only includes the guaranteed resource amount.

[0059] For example, for the memory resource type, when the memory guarantee resource set for user object A is 1G and the memory resource upper limit is 1G, user object A is classified into the advanced user group; when the memory guarantee resource set for user object B is 1G and the memory resource upper limit is 2G, the user object is classified into the second highest user group; when only the memory guarantee resource is set for user object C, but no memory resource upper limit is set, user object C is classified into the low-level user group. The advanced user group, the second highest user group and the low-level user group constitute the user group set corresponding to the memory resource type. The cache resource type is also processed in the above manner to obtain the user group set corresponding to the cache resource type.

[0060] In this embodiment, by grouping user objects, the priority of each group of user objects can be set, so that the available resources owned by the user objects can be increased or decreased according to the priority, so as to preferentially allocate some of the free resources owned by user objects with more available resources to user objects lacking available resources.

[0061] In one of the embodiments, the above method also includes: for each resource type, determining a user group set corresponding to the targeted resource type; each user group in the user group set has a corresponding priority; starting from the second highest priority, in order from high to low priority, monitoring the resource utilization rate of each user object in the corresponding priority user group, and when the resource utilization rate of the currently monitored user object under the targeted resource type is greater than or equal to the recycling threshold, allocating remaining resources from the shared resource pool under the targeted resource type to the currently monitored user object; wherein the shared resource pool under the targeted resource type is a resource pool divided from the total resources under the targeted resource type in the computing node, which is used to supplement the available resources for each user mounted in the computing node.

[0062] Specifically, for each resource type, a user group set corresponding to the resource type can be determined. For example, for a memory resource type, a user group set corresponding to the memory resource type can be determined; for a cache resource type, a user group set corresponding to the cache resource type can be determined. Each user group in the user group set has a corresponding priority.

[0063] Since the user objects in the high-priority user group are guaranteed to have a resource quantity equal to the resource quantity upper limit, the available resources in the user object group have reached the resource quantity upper limit, so there is no need to adjust the available resource quantity for the user objects in the high-priority user group. Further, starting from the second highest priority, the user objects in each user object group are monitored for resource usage in descending order of priority. For example, the resource usage of each user object in the second highest priority user group is monitored in turn. After the user objects in the second highest priority user group are monitored, the resource usage of each user object in the low-priority user group is monitored in turn.

[0064] For the currently monitored user object in the currently monitored user group, determine whether the resource usage rate of the currently monitored user object under the targeted resource type is greater than or equal to the recycling threshold. If it is greater than or equal to the recycling threshold, then preferentially allocate the remaining resources from the shared resource pool under the targeted resource type to the currently monitored user object. The remaining resources of a preset size may be allocated to the currently monitored user object first, for example, the remaining resources of a preset unit size may be allocated, and then determine whether the resource usage rate of the currently monitored user object under the targeted resource type is still greater than or equal to the recycling threshold after the remaining resources are allocated. If it is still greater than or equal to the recycling threshold, then continue to allocate the remaining resources of a preset size from the shared resource pool to the currently monitored user object until the resource usage rate of the currently monitored user object under the targeted resource type is less than the recycling threshold.

[0065] In one of the embodiments, for the currently monitored user group, the user objects in the currently monitored user group may be monitored in descending order of resource usage.

[0066] In one of the embodiments, allocating remaining resources from a shared resource pool under the targeted resource type to a currently monitored user object includes: when there are remaining resources in the shared resource pool under the targeted resource type, allocating remaining resources of a preset size from the shared resource pool under the targeted resource type to the currently monitored user object; the above method also includes: when there are no remaining resources in the shared resource pool under the targeted resource type, traversing user groups in order from low to high priority, wherein, for the currently traversed user group, traversing user objects in the currently traversed user group, determining whether the currently traversed user object is a target user that meets resource adjustment conditions; when the currently traversed user object is the target object, allocating idle resources of a preset size of the target user under the targeted resource to the currently monitored user object; stopping the traversal when a stop condition is met; the stop condition includes that the resource usage rate of the currently monitored user object under the targeted resource type is less than the recycling threshold and all user objects in the user group to which the currently monitored user object belongs have been traversed.

[0067] Specifically, when there are no remaining resources in the shared resource pool under the targeted resource type, it is necessary to filter out the target users from the user group set, and divide the resources of a preset size from the available resources under the targeted resource type of the target user to the currently monitored target user. For example, the computing node can traverse the user groups in order from low to high priority, and for the user group currently traversed, the user objects in the user group currently traversed can be traversed, and for the user object currently traversed, it is determined whether the user object currently traversed is the target user that meets the resource adjustment conditions. If it is the target user, the preset size of idle resources of the target user under the targeted resource is allocated to the currently monitored user object. The above process is iteratively executed until the stop condition is met. The stop condition includes that the resource utilization rate of the currently monitored user object under the targeted resource type is less than the recycling threshold and all user objects in the user group where the currently monitored user object is located have been traversed.

[0068] For example, for the memory resource type, when the currently monitored user object B is a user object in the second-highest priority group, if the memory usage rate of user object B is greater than or equal to the memory recovery threshold, first check whether there is remaining memory in the memory shared resource pool. If there is no remaining memory in the memory shared resource pool, then check the low priority group. Since there is no user object in the low priority group, skip the low priority group check, and then look in the second-highest priority group. When user object A in the second-highest priority group meets the resource adjustment condition, the preset size of memory in the available memory resources of user object A is allocated to user object B to increase the amount of available memory resources of user object B. Continue to traverse the user objects in the second-highest priority group until all user objects in the second-highest priority group are traversed, or until the memory usage rate of user object B is less than the memory recovery threshold.

[0069] For another example, when the currently monitored user object C is a user object of the low priority group, if the memory usage of user object C is greater than or equal to the memory recovery threshold, first check whether there is remaining memory in the memory shared resource pool. If there is no remaining memory in the memory shared resource pool, then check the low priority group. When the user object D in the low priority group meets the resource adjustment condition, the preset size of memory in the available memory resources of user object D is allocated to user object C to increase the amount of available memory resources of user object C. Continue to traverse the user objects in the low and high priority groups until all user objects in the low and high priority groups are traversed, or until the memory usage of user object C is less than the memory recovery threshold. It is easy to understand that caching can also be performed in the above manner.

[0070] Among them, user objects that have increased available resources can be excluded from subsequent cycles. Since user objects in a low-priority user group do not have a resource upper limit, user objects in this user group may have more resources than user objects in other user groups. Therefore, the idle resources owned by user objects in the low-priority user group are preferentially allocated to other user objects. In this way, the purpose of evenly allocating available resources owned by each user object can be achieved.

[0071] In one embodiment, reference Figure 5 , Figure 5 The overall process diagram of available resource adjustment in one embodiment is shown. According to the memory setting of the user object, the user object is divided into high priority, second highest priority and low priority. The user objects in the second highest priority user group are monitored in order from high to low in terms of memory usage, and it is determined whether the memory usage of the currently monitored user object exceeds the memory recovery threshold. If it exceeds the memory recovery threshold, the memory available resources of the currently monitored user object are increased. When all the second highest priority user objects are monitored, the user objects in the low priority user group are monitored in order from high to low in terms of memory usage, and it is determined whether the memory usage of the currently monitored user object exceeds the memory recovery threshold. If it exceeds the memory recovery threshold, the memory available resources of the currently monitored user object are increased. When all the second highest priority user objects are monitored, the user objects in the second highest priority user group are monitored in order from high to low in terms of cache usage, and it is determined whether the cache usage of the currently monitored user object exceeds the cache recovery threshold. If it exceeds the cache recovery threshold, the cache available resources of the currently monitored user object are increased. When all user objects with the second highest priority have been monitored, the user objects in the low priority user group are monitored in order of cache usage from high to low, and it is determined whether the cache usage of the currently monitored user object exceeds the cache recycling threshold. If it exceeds the cache recycling threshold, the available cache resources of the currently monitored user object are increased.

[0072] In one of the embodiments, determining whether the user object currently traversed is a target user that meets the resource adjustment conditions includes: when the amount of available resources of the user object currently traversed under the targeted resource type is greater than the amount of guaranteed resources under the targeted resource type set for the user object currently traversed, determining whether the resource usage rate of the user object currently traversed under the targeted resource type is less than a recycling threshold; when the resource usage rate of the user object currently traversed under the targeted resource type is less than the recycling threshold, determining whether the resource usage rate of the user object currently traversed under the targeted resource type is less than the recycling threshold after deducting the idle resources of a preset size under the targeted resource type; when the resource usage rate of the user object currently traversed under the targeted resource type is less than the recycling threshold after deducting the idle resources of a preset size under the targeted resource type, taking the user object currently traversed as the target user object.

[0073] Specifically, for the user object currently traversed, the computing node can determine whether the amount of available resources of the user object currently traversed under the resource type is greater than the guaranteed amount of resources set for the user object currently traversed under the resource type. For example, the computing node determines whether the amount of available memory resources of the user object currently traversed is greater than the guaranteed amount of memory resources set for the user object currently traversed. If greater, it is determined whether the resource usage rate of the user object currently traversed under the resource type is less than the recovery threshold, for example, it is determined whether the memory usage rate of the user object currently traversed is less than the memory recovery threshold. If less, it is determined whether the resource usage rate of the user object currently traversed under the resource type is still less than the recovery threshold after deducting the preset size of idle resources under the resource type, for example, it is determined whether the memory usage rate of the user object currently traversed is still less than the memory recovery threshold after allocating the preset size of memory owned by the user object currently traversed to the currently monitored user object. If less, the user object currently traversed is used as the target user object. It is easy to understand that the idle resources under the memory resource type may include idle write memory and idle read memory; the idle resources under the cache resource type may include idle write cache and idle read cache.

[0074] In one embodiment, reference Figure 6 , Figure 6The overall flow diagram of resource processing in one embodiment is shown. The resource manager on the computing node can allocate resources to user objects from the memory resource pool and the cache resource pool. The memory resource pool includes a memory guarantee resource pool and a memory shared resource pool, and the cache resource pool includes a cache guarantee resource pool and a cache shared resource pool. User objects can perform read and write operations based on the allocated available resources, and when resources are insufficient, they can apply for resources from the memory shared resource pool and the cache shared resource pool, or the resource manager can also allocate part of the available resources owned by other user objects to user objects that lack resources. When a user object ends a read task or a write task and exits, the available resources owned by the user object can be released to the memory resource pool and the cache resource pool.

[0075] In one embodiment, the resource processing method also includes a resource recycling process. Referring to 7, the resource recycling process includes: Step 1: The resource recycler periodically retrieves user information from the user manager. Step 2: For each resource type, the computing node checks whether the available resource amount of the user object is adjusted by the resource manager. For example, for memory, check whether the available resource amount of the memory is adjusted by the resource manager. If adjusted, the new available resource amount is used for recycling calculation. If not adjusted, the original value is used for calculation. The used resource amount of the user object is divided by the available resource amount to obtain the resource utilization rate of the user object, which is compared with the recycling threshold. If the recycling threshold is exceeded, the recycling task is executed. The computing node sorts the pre-read resources from the time not used by the user object from long to short; the longer the time, the first release, and the release is cyclic until the resource utilization rate is lower than the recycling threshold. Then check whether the remaining pre-read resources have not been used for more than a preset time and are also recycled. For example, for memory, the pre-read memory is sorted from long to short according to the time not used by the user object; the longer the time, the first release, and the release is cyclic until the memory resource utilization rate is lower than the recycling threshold. Then check whether the remaining pre-read memory has not been used for more than 1 minute and is also recycled. Figure 7 A schematic diagram of the overall process of resource recycling in an embodiment is shown.

[0076] In one embodiment, the resource processing method also includes a user exit process: the first step: when the user exits, all read resources can be recycled, and the resource recycler releases the total read operation memory resources and total read operation cache resources allocated to the user object, and the total read operation memory resources allocated to the user object are subtracted from the available memory resources of the user object, and the total read operation cache resources allocated to the user object are subtracted from the available cache resources of the user object. Further, the computing node deducts the total read operation memory resources allocated to the user object from the available memory resources, and returns the total read operation memory resources allocated to the user object to the memory guarantee resource pool in priority, until the memory guarantee resources of the user object are all released, and the remaining part of the total read operation memory resources allocated to the user object is returned to the memory shared resource pool; the total read operation cache resources allocated to the user object deducted from the available cache resources, and the total read operation cache resources allocated to the user object are returned to the cache guarantee resource pool in priority, until the cache guarantee resources are all released, and the remaining part of the total read operation cache resources allocated to the user object is returned to the cache shared resource pool.

[0077] Step 2: Release the idle write memory and write cache of the user object. The resource collector only retains the memory blocks and cache blocks that have not been written to the remote object, and reduces the available memory resources to the size of the reserved write memory. The part deducted from the reduced available memory resources is returned to the memory guarantee resource pool first, until the memory guarantee of the user object is fully released, and the remaining part is returned to the shared memory resource pool; further reduce the available cache resources to the size of the reserved write cache, and the part deducted from the reduced available cache resources is returned to the cache guarantee resource pool first, until the cache guarantee resources of the user object are fully released, and the remaining part is returned to the cache shared resource pool. Step 3: The resource collector regularly checks the progress of writing memory blocks and cache blocks to the remote object storage, releases the synchronized memory blocks and cache blocks, and reduces the corresponding available memory resources and cache resources until all memory blocks and cache blocks are released, and the available memory resources and cache resources of the user object are reduced to zero. Step 4: Delete the corresponding user information in the user manager.

[0078] In the above embodiment, a shared proxy conversion client is used in a computing node to replace the proxy conversion client assigned to each user object. The shared proxy conversion client can centrally manage the reserved CPU, memory, and cache resources. In this way, by centrally managing the reserved CPU, memory, and cache resources, the reserved CPU, memory, and cache resources can be better scheduled and controlled to improve resource utilization.

[0079] In addition, through user quota management, priority management, idle time reuse and scheduling technology, we can make full use of reserved resources, improve resource reuse rate, reduce idle resources, and obtain better performance with less resources. When users exit, we can recycle idle resources in time to avoid resource overload in extreme cases.

[0080] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0081] Based on the same inventive concept, the embodiment of the present application also provides a resource processing device for implementing the resource processing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more resource processing device embodiments provided below can refer to the limitations on the resource processing method above, and will not be repeated here.

[0082] In one embodiment, Figure 8 As shown, a resource processing device 800 is provided, including: a resource setting information acquisition module 802, a resource allocation module 804 and a resource use module 806, wherein:

[0083] The resource setting information acquisition module 802 is used to determine the resource setting information of different resource types set for the new user object when there is a new user object; each resource setting information includes a guaranteed resource amount and a resource amount upper limit;

[0084] The resource allocation module 804 is used to allocate available resources of the targeted resource type to the new user object from the guaranteed resource pool of the targeted resource type according to the guaranteed resource amount of the targeted resource type; wherein the guaranteed resource pool of the targeted resource type is a resource pool divided from the total resources of the targeted resource type in the computing node and used to guarantee the execution of proxy conversion for each user mounted in the computing node;

[0085] The resource using module 806 is used to respond to the proxy conversion operation triggered by the new user object and perform proxy conversion based on the available resources under each resource type allocated to the new user object.

[0086] In one of the embodiments, the resource allocation module 804 is also used to determine a guaranteed resource pool under the targeted resource type; when the remaining amount of resources in the guaranteed resource pool under the targeted resource type is greater than or equal to the guaranteed amount of resources in the resource setting information under the targeted resource type, allocate resources of the guaranteed amount of resources in the resource setting information under the targeted resource type from the guaranteed resource pool under the targeted resource type to the new user object; and use the allocated resources as available resources for the new user object under the targeted resource type.

[0087] In one embodiment, the available resources under each resource type include available memory resources and available cache resources; the resource usage module 806 is also used to, when the proxy conversion to be performed includes a write operation, when there is free write memory that satisfies the resource amount required for the write operation in the available memory resources allocated for the new user object, write the data required for the write operation block by block into the memory blocks in the free write memory, store the identifiers of the memory blocks in the write queue, and generate a write processing task; schedule the write processing task to the idle CPU in the CPU guarantee resource pool, extract the identifiers of the memory blocks from the write queue in turn based on the idle CPUs, write the data in the memory blocks corresponding to the extracted identifiers of the memory blocks into the free write cache in the available cache resources allocated for the new user object, and release the memory blocks corresponding to the identifiers of the extracted memory blocks; write the data written into the free write cache into the remote object storage in turn.

[0088] In one of the embodiments, the resource usage module 806 is also used to determine the amount of total memory for write operations divided from the available memory resources allocated for the new user object; when it is determined that there is free write memory in the total memory for write operations based on the amount of total memory for write operations and the amount of used memory in the total memory for write operations, the amount of free write memory is compared with the amount of data required for the write operation; when the amount of free write memory is greater than or equal to the amount of data required for the write operation, it is determined that there is free write memory in the available memory resources that meets the amount of resources required for the write operation.

[0089] In one of the embodiments, the available resources under each resource type include available memory resources and available cache resources; the resource usage module 806 is also used to generate a read processing task when the proxy conversion to be performed includes a read operation and there is free read memory in the available memory resources allocated for the new user object that satisfies the resource amount required for the read operation; the read processing task is scheduled to an idle CPU in the CPU guarantee resource pool, and based on the idle CPU, the data required to be read by the read processing task is searched from the available cache resources allocated for the new user object, and the found data is stored in the free read memory in the available memory resources.

[0090] In one of the embodiments, the resource allocation module 804 is also used to determine, for each resource type, a set of user groups corresponding to the targeted resource type; each user group in the user group set has a corresponding priority; starting from the second highest priority, in order from high to low priority, resource utilization rate of each user object in the corresponding priority user group is monitored, and when the resource utilization rate of the currently monitored user object under the targeted resource type is greater than or equal to the recycling threshold, the remaining resources are allocated from the shared resource pool under the targeted resource type to the currently monitored user object; wherein, the shared resource pool under the targeted resource type is a resource pool divided from the total resources under the targeted resource type in the computing node, which is used to supplement the available resources for each user mounted in the computing node.

[0091] In one of the embodiments, the resource allocation module 804 is also used to allocate remaining resources of a preset size from the shared resource pool under the targeted resource type to the currently monitored user object when there are remaining resources in the shared resource pool under the targeted resource type; if there are no remaining resources in the shared resource pool under the targeted resource type, traverse the user groups in order of priority from low to high, wherein, for the user group currently traversed, traverse the user objects in the user group currently traversed, and determine whether the user object currently traversed is a target user that meets the resource adjustment conditions; when the user object currently traversed is the target object, allocate idle resources of a preset size of the target user under the targeted resource to the currently monitored user object; stop traversal when a stop condition is met; the stop condition includes that the resource usage rate of the currently monitored user object under the targeted resource type is less than the recycling threshold and all user objects in the user group where the currently monitored user object is located have been traversed.

[0092] In one embodiment, the resource usage module 806 is also used to classify users having first resource setting information under the targeted resource type into a high-level user group; the first resource setting information is resource setting information having the same guaranteed resource amount and resource amount upper limit; users having second resource setting information under the targeted resource type are classified into the second highest user group; the second resource setting information is resource setting information having a guaranteed resource amount less than the resource amount upper limit; users having third resource setting information under the targeted resource type are classified into a low-level user group; the third resource setting information is resource setting information containing only the guaranteed resource amount.

[0093] In one of the embodiments, the resource usage module 806 is also used to determine whether the resource usage rate of the user object currently traversed to under the targeted resource type is less than the recycling threshold when the amount of available resources of the user object currently traversed to under the targeted resource type is greater than the guaranteed amount of resources under the targeted resource type set for the user object currently traversed to; when the resource usage rate of the user object currently traversed to under the targeted resource type is less than the recycling threshold, determine whether the resource usage rate of the user object currently traversed to under the targeted resource type is less than the recycling threshold after deducting the idle resources of a preset size under the targeted resource type; when the resource usage rate of the user object currently traversed to under the targeted resource type is less than the recycling threshold after deducting the idle resources of a preset size under the targeted resource type, the user object currently traversed to is used as the target user object.

[0094] Each module in the resource processing device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0095] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig. 9As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store resource processing data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a resource processing method is implemented.

[0096] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0097] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, it is any one of the resource processing methods in the embodiments of the present application.

[0098] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, any resource processing method in the embodiments of the present application is implemented.

[0099] In one embodiment, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, any resource processing method in the embodiments of the present application is implemented. Step A;

[0100] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0101] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0102] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0103] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A resource processing method, characterized in that: Executed by a computing node, the method includes: When there is a new user object, determining resource setting information under different resource types set for the new user object; each resource setting information includes a guaranteed resource amount and a resource amount upper limit; For each resource type, according to the guaranteed resource amount under the targeted resource type, the available resources under the targeted resource type are allocated to the new user object from the guaranteed resource pool under the targeted resource type; wherein the guaranteed resource pool under the targeted resource type is a resource pool divided from the total resources under the targeted resource type in the computing node and used to guarantee the execution of proxy conversion for each user mounted in the computing node; In response to the proxy conversion operation triggered by the new user object, performing proxy conversion based on available resources under each resource type allocated to the new user object; For each resource type, a user group set corresponding to the resource type is determined; each user group in the user group set has a corresponding priority; Starting from the second highest priority, in descending order of priority, monitor the resource usage of each user object in the corresponding priority user group; when the resource usage of the currently monitored user object under the targeted resource type is greater than or equal to the recycling threshold, allocate the remaining resources from the shared resource pool under the targeted resource type to the currently monitored user object; The shared resource pool under the targeted resource type is a resource pool divided from the total resources under the targeted resource type in the computing node and used to supplement available resources for each user mounted in the computing node.

2. The method according to claim 1, characterized in that The allocating available resources of the targeted resource type to the new user object from the guaranteed resource pool of the targeted resource type includes: Determine the guaranteed resource pool under the targeted resource type; When the remaining amount of resources in the guaranteed resource pool under the targeted resource type is greater than or equal to the guaranteed amount of resources in the resource setting information under the targeted resource type, resources of the guaranteed amount of resources in the resource setting information under the targeted resource type are allocated from the guaranteed resource pool under the targeted resource type to the new user object; The allocated resources are used as available resources of the new user object under the targeted resource type.

3. The method according to claim 1, characterized in that: The available resources under each resource type include available memory resources and available cache resources; The performing proxy conversion based on the available resources under each resource type allocated to the new user object includes: When the proxy conversion to be performed includes a write operation, if there is idle write memory that satisfies the amount of resources required for the write operation in the available memory resources allocated to the new user object, the data required for the write operation are written block by block into the memory blocks in the idle write memory, the identifiers of the memory blocks are stored in a write queue, and a write processing task is generated; The write processing task is scheduled to an idle CPU in a CPU guarantee resource pool, and based on the idle CPU, the identifiers of the memory blocks are extracted from the write queue in sequence, and the data in the memory blocks corresponding to the identifiers of the extracted memory blocks are written into the idle write cache in the cache available resources allocated to the new user object, and the memory blocks corresponding to the identifiers of the extracted memory blocks are released; The data written into the idle write cache is written into the remote object storage in sequence.

4. The method according to claim 3, characterized in that The method further comprises: Determine the amount of memory for total write operations divided from the available memory resources allocated for the new user object; When it is determined that there is free write memory in the total memory for write operations according to the memory amount of the total memory for write operations and the memory amount of used memory in the total memory for write operations, the memory amount of the free write memory is compared with the amount of data required for the write operation; When the memory amount of the idle write memory is greater than or equal to the data amount required for the write operation, it is determined that there is idle write memory in the available memory resources that satisfies the resource amount required for the write operation.

5. The method according to claim 1, characterized in that: The available resources under each resource type include available memory resources and available cache resources; The performing proxy conversion based on the available resources under each resource type allocated to the new user object includes: When the proxy conversion to be performed includes a read operation, generating a read processing task in the case where there is free read memory in the available memory resources allocated to the new user object that satisfies the amount of resources required by the read operation; The read processing task is scheduled to an idle CPU in the CPU guarantee resource pool, and based on the idle CPU, the data required to be read by the read processing task is searched from the cache available resources allocated to the new user object, and the found data is stored in the idle read memory in the memory available resources.

6. The method according to claim 1, characterized in that The allocating remaining resources from the shared resource pool under the targeted resource type to the currently monitored user object includes: When there are remaining resources in the shared resource pool under the targeted resource type, allocating remaining resources of a preset size from the shared resource pool under the targeted resource type to the currently monitored user object; The method further comprises: If there are no remaining resources in the shared resource pool under the targeted resource type, the user groups are traversed in order of priority from low to high, wherein for the currently traversed user group, the user objects in the currently traversed user group are traversed, and it is determined whether the currently traversed user object is a target user that meets the resource adjustment condition; When the currently traversed user object is the target object, allocating the preset size of idle resources of the target user under the targeted resources to the currently monitored user object; The traversal is stopped when the stop condition is met; the stop condition includes that the resource usage rate of the currently monitored user object under the targeted resource type is less than the recycling threshold and all user objects in the user group where the currently monitored user object belongs are traversed.

7. The method according to claim 6, characterized in that The method further comprises: Classify users having first resource setting information under the targeted resource type into an advanced user group; the first resource setting information is resource setting information that guarantees the same resource amount and resource amount upper limit; Classifying users having second resource setting information under the targeted resource type into the second highest user group; the second resource setting information is resource setting information that ensures that the resource amount is less than the upper limit of the resource amount; The users having the third resource setting information under the targeted resource type are classified into a low-level user group; the third resource setting information is resource setting information containing only the guaranteed resource amount.

8. The method according to claim 6, characterized in that The determining whether the currently traversed user object is a target user that meets the resource adjustment condition includes: When the amount of available resources of the currently traversed user object under the targeted resource type is greater than the guaranteed amount of resources under the targeted resource type set for the currently traversed user object, determining whether the resource usage rate of the currently traversed user object under the targeted resource type is less than a recycling threshold; When the resource usage rate of the currently traversed user object under the targeted resource type is less than the recycling threshold, determine whether the resource usage rate of the currently traversed user object under the targeted resource type is less than the recycling threshold after deducting the idle resources of a preset size under the targeted resource type; When the resource usage rate of the currently traversed user object under the targeted resource type is less than the recycling threshold after deducting the preset size of idle resources under the targeted resource type, the currently traversed user object is used as the target user object.

9. A resource processing device, characterized in that: The device comprises: A resource setting information acquisition module, used to determine resource setting information of different resource types set for a new user object when there is a new user object; each resource setting information includes a guaranteed resource amount and a resource amount upper limit; A resource allocation module, for allocating available resources of the targeted resource type to the new user object from a guaranteed resource pool of the targeted resource type according to the guaranteed resource amount of the targeted resource type for each resource type; wherein the guaranteed resource pool of the targeted resource type is a resource pool divided from the total resources of the targeted resource type in the computing node and used to guarantee the execution of proxy conversion by each user mounted in the computing node; a resource using module, configured to respond to the proxy conversion operation triggered by the new user object and perform proxy conversion based on available resources under each resource type allocated to the new user object; The resource allocation module is also used to determine, for each resource type, a set of user groups corresponding to the targeted resource type; each user group in the user group set has a corresponding priority; starting from the second highest priority, in order from high to low priority, resource utilization rate of each user object in the corresponding priority user group is monitored; when the resource utilization rate of the currently monitored user object under the targeted resource type is greater than or equal to the recycling threshold, the remaining resources are allocated from the shared resource pool under the targeted resource type to the currently monitored user object; wherein the shared resource pool under the targeted resource type is a resource pool divided from the total resources under the targeted resource type in the computing node, which is used to supplement the available resources for each user mounted in the computing node.

10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Resource allocation method and device, electronic equipment and readable storage medium

    CN115562855A