Cache management method and device and computer readable storage medium

By introducing cache service processes into the compute cluster, dynamically allocating memory space in the shared memory pool, the problem of overprivileged access between user processes is solved and efficient utilization of memory resources is achieved.

CN119718707AActive Publication Date: 2025-03-28HUAWEI TECH CO LTD

Patent Information

Application Number
CN202311286765.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-28
Publication Date
2025-03-28
Estimated Expiration
2043-09-28

AI Technical Summary

Technical Problem

In compute clusters, unauthorized access problems are prone to occur between user processes, because each user process can use the entire shared memory pool as a cache, making it difficult to isolate resources between processes of different users.

Method used

The cache service process dynamically allocates the memory space in the shared memory pool, ensuring that each user process can only access the memory space it allocates, thereby achieving isolation of memory space.

Benefits of technology

It effectively avoids the problem of overprivileged access between processes of different users, and at the same time realizes dynamic allocation of shared memory pools, improving the efficiency of memory resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119718707A_ABST
    Figure CN119718707A_ABST
Patent Text Reader

Abstract

The invention provides a cache management method, which is applied to a computing cluster running a first process of a first user, a second process and a cache service process, and comprises the following steps: the first process obtains a first IO request corresponding to the first process; when a current first memory space (which is a section of space in a shared memory pool of a computing cluster and is shared by the first process and a second process) of the first process does not store data corresponding to the first IO request, the first process sends a first cache application instruction to a cache service process to apply for allocation of a second memory space in the shared memory pool; the second process obtains a second IO request corresponding to the second process; and when the first memory space corresponding to the second process is not enough to store the data corresponding to the second IO request, the second process sends a second cache application instruction to the cache service process to apply for allocation of the second memory space. The method not only can solve the problem of unauthorized access among processes of different users, but also can realize dynamic allocation of the shared memory pool.
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 cache management method, device and computer-readable storage medium. Background Art

[0002] Cache refers to the space in the computer system's memory used to cache disk files. The cache exchanges data with the processor before the disk, so the rate is very fast. The cache setting is one of the important factors for the high performance of all modern computer systems.

[0003] like Figure 1 As shown, the computing cluster runs cache service processes and user processes (such as Figure 1 The computing cluster includes a shared memory pool, from which all user processes running on the computing cluster can apply for memory space as a cache.

[0004] Currently, the specific implementation process of a user process applying for memory space from a shared memory pool as a cache is usually as follows: the user process sends a cache application instruction to the cache service process, and after receiving the cache application instruction, the cache service process allocates the entire shared memory pool to the user process for use as a cache according to the cache application instruction. In other words, each user process can use the entire shared memory pool as a cache, which can easily lead to unauthorized access problems between processes of different users. Summary of the invention

[0005] The present application provides a cache management method, device and computer-readable storage medium, which can solve the problem of unauthorized access between processes of different users and realize dynamic allocation of shared memory pool in computing cluster.

[0006] In a first aspect, a cache management method is provided, which can be applied to a computing cluster including at least one computing device, the computing cluster running a first process and a second process of a first user and a cache service process, the computing cluster including a shared memory pool, the method comprising: a first process obtains a first input output (IO) request corresponding to the first process; when a current first memory space of the first process is insufficient to store data corresponding to the first IO request, the first process sends a first cache application instruction to the cache service process, the first memory space is a section of space in the shared memory pool, and is shared by the first process and the second process; the cache service process allocates a second memory space in the shared memory pool to the first process according to the first cache application instruction; the second process obtains a second IO request corresponding to the second process; when the first memory space corresponding to the second process is insufficient to store data corresponding to the second IO request, the second process sends a second cache application instruction to the cache service process; the cache service process allocates the second memory space to the second process according to the second cache application instruction.

[0007] In the above scheme, since the first memory space in the shared memory pool is only shared by the first process of the first user and the second process of the first user, and is not shared by processes of other users, the first process of the first user and the second process of the first user have the authority to access the data in the first memory space, while processes of other users do not have the authority to access the data in the first memory space, thereby preventing the data in the first memory space from being accessed without authorization. Similarly, since the second memory space in the shared memory pool is only shared by the first process of the first user and the second process of the first user, and is not shared by processes of other users, the first process of the first user and the second process of the first user have the authority to access the data in the second memory space, while processes of other users do not have the authority to access the data in the second memory space, thereby preventing the data in the second memory space from being accessed without authorization.

[0008] In addition, in the above scheme, since the cache service process allocates the second memory space to the first process according to the first cache application instruction sent by the first process when the current first memory space of the first process is not enough to store the data corresponding to the first IO request, and allocates the second memory space to the second process according to the second cache application instruction sent by the second process when the first memory space corresponding to the second process is not enough to store the data corresponding to the second IO request, dynamic allocation of the shared memory pool is realized. It can be understood that when the shared memory pool can be dynamically allocated, waste of memory pool resources can be avoided and efficient use of memory pool resources can be achieved.

[0009] In a possible implementation, the cache service process allocates the second memory space in the shared memory pool to the first process according to the first cache application instruction, including: when the cache service process determines that the frequency of the cache application instruction received from the process of the first user is higher than the frequency threshold, the cache service process allocates multiple second memory spaces in the shared memory pool to the first process according to the first cache application instruction. In this way, the number of times the process of the first user applies for memory space can be reduced.

[0010] In a possible implementation, the cache service process allocates the second memory space in the shared memory pool to the first process according to the first cache application instruction, including: the cache service process allocates the second memory space in the shared memory pool to the first process according to the first capacity carried in the first cache application instruction, and the capacity of the second memory space is the first capacity. In this way, the memory space in the shared memory pool can be allocated on demand according to the needs of the user process.

[0011] In order to improve the flexibility of the solution, in a possible implementation, the capacity of the second memory space is a fixed capacity.

[0012] In a possible implementation manner, the first memory space is shared by the first process, the second process and the cache service process.

[0013] By implementing the above implementation method, the cache service process can assist the first process / second process in performing IO operations through the first memory space, that is, the cache service process reads the IO data corresponding to the first process / second process from the disk to the first memory space, or the cache service process writes the IO data corresponding to the first process / second process from the first memory space to the disk for persistent storage, thereby improving the IO performance of the user process.

[0014] In a possible implementation, the method further includes: after the cache service process stores the data in the first memory space fully, the data in the first memory space is stored in the disk of the computing cluster; and the cache service process releases the first memory space shared by the first process, the second process and the cache service process. In this way, the memory space in the shared memory pool can be efficiently utilized in a circular manner.

[0015] In a possible implementation, the cache service process releases the first memory space shared by the first process, the second process, and the cache service process, including: when the cache service process determines that the usage heat of the memory space in the namespace of the first user is lower than the heat threshold, the cache service process releases the first memory space shared by the first process, the second process, and the cache service process, wherein the namespace of the first user includes the memory space allocated to the first process and the memory space allocated to the second process in the shared memory pool.

[0016] It can be understood that the usage heat of the memory space in the namespace of the first user is higher than or equal to the heat threshold, which means that the usage heat of the memory space in the namespace of the first user is relatively high. In this case, the cache service process does not release the first memory space shared by the first process, the second process and the cache service process, which can reduce the frequency of the first user's process applying for memory space.

[0017] In a possible implementation, the cache service process releases the first memory space shared by the first process, the second process and the cache service process, including: the cache service process generates marking information, the marking information indicates that the first memory space is unavailable; the cache service process sends marking information to the first process, the marking information is used by the first process to release the first memory space corresponding to the first process; the cache service process sends marking information to the second process, the marking information is used by the second process to release the first memory space corresponding to the second process; the cache service process releases the first memory space corresponding to the cache service process.

[0018] In a possible implementation, the first process, the second process, and the cache service process run on the same computing device or different computing devices in the computing cluster.

[0019] In a second aspect, a cache management apparatus is provided, which is applied to a computing cluster including at least one computing device, wherein the computing cluster runs a first process and a second process of a first user and a cache service process, and the computing cluster includes a shared memory pool, and the apparatus includes:

[0020] An acquisition module, configured to acquire, through the first process, a first IO request corresponding to the first process;

[0021] a sending module, configured to send a first cache application instruction to the cache service process through the first process when the current first memory space of the first process is insufficient to store data corresponding to the first IO request, wherein the first memory space is a section of space in the shared memory pool and is shared by the first process and the second process;

[0022] a memory allocation module, configured to allocate a second memory space in the shared memory pool to the first process through the cache service process according to the first cache application instruction;

[0023] The acquisition module is further used to acquire, through the second process, a second IO request corresponding to the second process;

[0024] The sending module is further configured to send a second cache application instruction to the cache service process through the second process when the first memory space corresponding to the second process is insufficient to store data corresponding to the second IO request;

[0025] The memory allocation module is further configured to allocate the second memory space to the second process through the cache service process according to the second cache application instruction.

[0026] In a possible implementation, the memory allocation module is specifically used to:

[0027] When the cache service process determines that the frequency of the cache application instructions received from the first user's process is higher than a frequency threshold, multiple second memory spaces in the shared memory pool are allocated to the first process according to the first cache application instructions.

[0028] In a possible implementation, the memory allocation module is specifically used to:

[0029] The cache service process allocates a second memory space in the shared memory pool to the first process according to the first capacity carried in the first cache application instruction, and the capacity of the second memory space is the first capacity.

[0030] In a possible implementation manner, the capacity of the second memory space is fixed.

[0031] In a possible implementation manner, the first memory space is shared by the first process, the second process, and the cache service process.

[0032] In a possible implementation, the device further includes: a memory release module;

[0033] The memory release module is used to:

[0034] After the first memory space is full of data, the cache service process stores the data in the first memory space in a disk of the computing cluster;

[0035] The first memory space shared by the first process, the second process and the cache service process is released through the cache service process.

[0036] In a possible implementation, the memory release module is specifically used to:

[0037] When the cache service process determines that the usage heat of the memory space in the namespace of the first user is lower than a heat threshold, the first memory space shared by the first process, the second process and the cache service process is released, wherein the namespace of the first user includes the memory space allocated to the first process and the memory space allocated to the second process in the shared memory pool.

[0038] In a possible implementation, the memory release module is specifically used to:

[0039] Generate marking information by the cache service process, where the marking information indicates that the first memory space is unavailable;

[0040] Sending the marking information to the first process through the cache service process, where the marking information is used by the first process to release the first memory space corresponding to the first process;

[0041] Sending the marking information to the second process through the cache service process, where the marking information is used by the second process to release the first memory space corresponding to the second process;

[0042] The first memory space corresponding to the cache service process is released through the cache service process.

[0043] In a possible implementation, the first process, the second process, and the cache service process run on the same computing device or different computing devices in the computing cluster.

[0044] For the cache management device provided in the second aspect and the relevant beneficial effects and descriptions of any implementation of the second aspect, please refer to the relevant beneficial effects and descriptions of the aforementioned first aspect and any implementation of the first aspect, and will not be repeated here.

[0045] In a third aspect, a computing cluster is provided, the computing cluster comprising at least one computing device, each of the at least one computing device comprising a processor and a memory; the processor of the at least one computing device is used to execute instructions stored in the memory of the at least one computing device, so that the computing cluster implements the method provided in the first aspect or any possible implementation of the first aspect.

[0046] According to a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores instructions for implementing the method provided in the first aspect or any possible implementation of the first aspect.

[0047] According to a fifth aspect, a computer program product is provided, comprising a computer program. When the computer program is read and executed by a computing device, the computing device executes the method provided in the first aspect or any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 It is a schematic diagram of the structure of a computing cluster provided in an embodiment of the present application;

[0049] Figure 2 It is an interactive schematic diagram of a cache management method provided in an embodiment of the present application;

[0050] Figure 3 It is a schematic diagram of implementing memory space isolation in a shared resource pool provided by an embodiment of the present application;

[0051] Figure 4 This is a schematic diagram of a cache service process marking a cache block as unavailable provided by an embodiment of the present application;

[0052] Figure 5 This is a schematic diagram of a local-first and remote-later cache application provided in an embodiment of the present application;

[0053] Figure 6 It is a structural diagram of a cache management device provided in an embodiment of the present application;

[0054] Figure 7 is a schematic diagram of the structure of a computing device provided in an embodiment of the present application;

[0055] Figure 8 It is a schematic diagram of the structure of a computing cluster provided in an embodiment of the present application. DETAILED DESCRIPTION

[0056] The technical solution provided by this application will be described below in conjunction with the accompanying drawings.

[0057] First, the application scenario of this application is introduced.

[0058] See also Figure 1 , Figure 1 is a schematic diagram of a computing cluster structure provided in an embodiment of the present application, such as Figure 1 As shown, the user space of the computing cluster runs a cache service process and multiple user processes. Figure 1 In the embodiment, the processes of the multiple users are taken as the process of the first user and the process of the second user as an example, wherein the process of the first user includes the first process of the first user and the second process of the first user.

[0059] The computing cluster may include at least one computing device, and the at least one computing device may be a personal computer, a laptop, a physical server, or a cloud server. When the computing cluster includes multiple computing devices, the multiple computing devices may be connected via a communication network of any communication mechanism / communication standard. The communication network may be a wide area network, a local area network, a point-to-point connection, or any combination thereof.

[0060] When the computing cluster includes multiple computing devices, the above-mentioned cache service process, the process of the first user and the process of the second user can be run on the same computing device or different computing devices in the computing cluster. For example, the multiple computing devices include computing device A and computing device B, the cache service process, the first process of the first user and the second process of the first user are run on computing device A, and the process of the second user is run on computing device B.

[0061] like Figure 1 As shown, the kernel space of the computing cluster is provided with a shared memory pool, from which all user processes running on the computing cluster can apply for memory space as cache. When the computing cluster includes a single computing device, the shared memory pool can be part or all of the memory of the single computing device. When the computing cluster includes multiple computing devices, the shared memory pool can be a global memory composed of part or all of the memory in the multiple computing devices.

[0062] Currently, the specific implementation process of a user process applying for memory space from a shared memory pool as a cache is usually as follows: the user process sends a cache application instruction to the cache service process, and after receiving the cache application instruction, the cache service process allocates the entire shared memory pool to the user process for use as a cache according to the cache application instruction. In other words, each user process can use the entire shared memory pool as a cache.

[0063] With the help of the above-mentioned shared memory pool, when the user process needs to perform input and output (IO) operations, it only needs to access the shared memory pool to read and write IO data. The process of reading the IO data required by the user process from the shared memory pool to the shared memory pool, and the process of writing the IO data written by the user process in the shared memory pool to the disk are all implemented by the cache service process. The user process does not need to access the disk to read and write data, thereby improving the IO performance of the user process.

[0064] It should be understood that Figure 1 The computing cluster shown is only an example. In a specific implementation, the computing cluster may also run other user processes in addition to the first process of the first user, the second process of the first user, and the process of the second user. The computing cluster may also include other or more component modules, which is not specifically limited in this application.

[0065] exist Figure 1 In the computing cluster shown, since the cache service process allocates the entire shared memory pool to processes of different users, when the process of the first user puts its IO data into the shared memory pool, the process of the second user can also access the shared memory pool, thereby obtaining the IO data of the process of the first user, which easily leads to unauthorized access problems.

[0066] In response to the above problems, the present application provides a cache management method and a cache management device, which can not only ensure that processes of different users have no permission to access IO data of processes of other users in the shared memory pool when using the shared memory pool, but also realize dynamic allocation of the shared memory pool and efficient utilization of the shared memory pool.

[0067] Combine the following Figure 1 The computing cluster shown and Figure 2 The flowchart shown in the figure introduces the cache management method provided by this application. Figure 2 , Figure 2 This is a flow chart of a cache management method provided by an embodiment of the present application, which specifically includes the following steps:

[0068] S201: The cache service process allocates a first memory space in a shared memory pool to a first process and a second process for sharing by the first process and the second process.

[0069] S202: The first process obtains a first IO request corresponding to the first process.

[0070] S203: When the current first memory space of the first process is insufficient to store data corresponding to the first IO request, the first process sends a first cache application instruction to the cache service process.

[0071] S204: After receiving the first cache application instruction sent by the first process, the cache service process allocates a second memory space in the shared memory pool to the first process according to the first cache application instruction.

[0072] S205: The second process obtains a second IO request corresponding to the second process.

[0073] S206: When the first memory space corresponding to the second process is insufficient to store data corresponding to the second IO request, the second process sends a second cache application instruction to the cache service process.

[0074] S207: After receiving the second cache application instruction sent by the second process, the cache service process allocates the second memory space to the second process according to the second cache application instruction.

[0075] The following first introduces concepts such as IO requests (such as the first IO request and the second IO request), data corresponding to the IO requests, and the cache service process allocating memory space in the shared memory pool to the user process involved in the embodiments of the present application.

[0076] In an embodiment of the present application, an IO request is used to instruct a user process to perform an IO operation. Specifically, it can be a read / write data request (which can be simply referred to as a read / write request) of a user process to a disk of a computing cluster, which is used to read IO data from the disk into a memory space allocated to the user process (i.e., a cache of the user process), or to write IO data into a memory space allocated to the user process, and subsequently write the IO data from the memory space allocated to the user process to the disk for persistent storage.

[0077] When the IO request is a read request, the data corresponding to the IO request is the data that the user process needs to read from the disk. When the IO request is a write request, the data corresponding to the IO request is the data that the user process needs to write to the disk. In the following embodiments, the data corresponding to the IO request is collectively referred to as IO data.

[0078] In the embodiment of the present application, it involves that a cache service process allocates a first memory space in a shared memory pool to a first process, a cache service process allocates a first memory space in a shared memory pool to a second process, a cache service process allocates a second memory space in a shared memory pool to a first process, and a cache service process allocates a second memory space in a shared memory pool to a second process. Taking the cache service process allocating the first memory space in a shared memory pool to the first process as an example, the cache service process can send the address of the first memory space to the first process, and the address of the first memory space is used by the first process to establish a mapping relationship between the virtual address space of the first process and the first memory space. After the mapping relationship is established, the first process can read and write the first memory space according to the mapping relationship. Processes that are not allocated the first memory space cannot perform IO operations through the first memory space.

[0079] Optionally, the cache service process may also establish a mapping relationship between the virtual address space of the cache service process and the first memory space. After the mapping relationship is established, a first memory space shared by the cache service process and the first process is formed. The cache service process may assist the first process in performing IO operations through the first memory space, that is, the cache service process reads the IO data corresponding to the first process from the disk to the first memory space, or the cache service process writes the IO data corresponding to the first process from the first memory space to the disk for persistent storage.

[0080] In the embodiments of the present application, it involves the first process and the second process sharing the first memory space, and the first process and the second process sharing the second memory space, and also involves the first process, the second process and the cache service process sharing the first memory space and other multiple processes sharing the same memory space. Taking the first process and the second process sharing the first memory space as an example, the first process and the second process sharing the first memory space means that the first process and the second process are both allocated the first memory space as a cache, that is, the first process and the second process have established their own mapping relationship between the virtual address space and the first memory space, so the first process and the second process can both perform IO operations through the first memory space. Processes that do not share the first memory space cannot perform IO operations through the first memory space.

[0081] In the embodiment of the present application, if the first user's processes other than the first process and the second process want to share the first memory space, it is necessary to send a cache application instruction to the cache service process. The cache service process determines that the process is also the process of the first user, and then allocates the first memory space to the process according to the cache application instruction, so that the process also shares the first memory space. When the processes of other users other than the first user's process, such as the process of the second user, send a cache application instruction to the cache service process, the cache service process determines that the process is not the process of the first user, and then allocates other memory spaces in the shared memory pool other than the first memory space to the process of the second user according to the cache application instruction.

[0082] It can be seen that through the above process, the memory space in the shared memory pool allocated to the processes of different users can be isolated, thereby avoiding the problem of unauthorized access between the processes of different users.

[0083] In a possible embodiment, if the cache service process creates a namespace (namespace) for the first user before sending the address of the first memory space to the first process, where the namespace is a resource isolation scheme, which is user-level resource isolation, the cache service process creates different namespaces for different users. When allocating memory space in the shared memory pool to each user's process, the cache service process will first add the memory space allocated for the user's process to the user's namespace. Each user's process can access the memory space in each user's own namespace, but cannot access the memory space in other users' namespaces. The cache service process adds the memory space allocated for the user's process to the user's namespace, which can be understood as making the memory space allocated for the user's process a member of the user's namespace. Figure 3As shown, the first memory space and the second memory space allocated to the first process of the first user are both members of the first user's namespace, and the third memory space and the fourth memory space allocated to the process of the second user are both members of the second user's namespace, thereby achieving isolation of memory space resources in the shared memory pool corresponding to different users.

[0084] Based on the above, the following Figure 2 Each step shown is described in detail.

[0085] In S201, for the specific implementation process of the cache service process allocating the first memory space in the shared memory pool for sharing by the first process and the second process, please refer to the above related description, which will not be elaborated here for the sake of brevity.

[0086] Regarding the first IO request and the second IO request in S202 and S205, and regarding the data corresponding to the first IO request and the data corresponding to the second IO request in S203 and S206, please refer to the above related description, which will not be elaborated here for the sake of brevity.

[0087] In S207, after receiving the second cache application instruction sent by the second process, the cache service process can first determine whether there is memory space in the memory space allocated by the first process that is not allocated to the second process. If it is determined that there is memory space in the memory space allocated by the first process that is not allocated to the second process, the memory space not allocated to the second process is allocated to the second process. If the first memory space allocated to the first process has been allocated to the second process, and the second memory space allocated to the first process has not been allocated to the second process, the second memory space is allocated to the second process. Otherwise, a section of the remaining memory space in the shared memory pool is allocated to the second process according to the second cache application instruction.

[0088] In S204, the cache service process allocates the second memory space in the shared memory pool to the first process, and in S207, the cache service process allocates the second memory space to the second process. For the specific implementation process, please refer to the relevant description above. For the sake of brevity of the specification, it will not be elaborated here.

[0089] It should be noted that the above-mentioned first memory space can be a memory space with continuous addresses in the shared memory pool, or a memory space with discontinuous addresses. The above-mentioned second memory space can be a memory space with continuous addresses in the shared memory pool, or a memory space with discontinuous addresses. This application does not make any specific limitations on this.

[0090] In a specific embodiment of the present application, the cache service process allocates the memory space (such as the second memory space) in the shared memory pool to the user process according to the cache application instruction (such as the first cache application instruction) sent by the user process (such as the first process). The size can be the following two:

[0091] ①The size of the memory space allocated by the cache service process each time is fixed.

[0092] ② The cache service process allocates according to user needs, that is, the cache application instruction sent by the user process carries the capacity of the memory space to be applied for. The cache service process allocates memory space in the shared pool to the user process according to the capacity of the memory space to be applied for carried by the cache application instruction. The capacity of the allocated memory space is the same as the capacity of the memory space to be applied for carried by the cache application instruction.

[0093] It should be understood that the above-mentioned method ① and method ② are merely examples and should not be regarded as limitations on the implementation method of the cache service process dividing the memory space according to the first cache application instruction.

[0094] In a possible embodiment, when the cache service process receives the first cache application instruction sent by the first process, it can count the frequency of the cache application instructions received from the first user's process (referring to all the processes of the first user), and determine whether the frequency is higher than the frequency threshold. When it is determined that the frequency is higher than the frequency threshold, multiple second memory spaces in the shared memory pool are allocated to the first process according to the first cache application instruction. When it is determined that the frequency is lower than or equal to the frequency threshold, one second memory space in the shared memory pool is allocated to the first process according to the first cache application instruction. In this way, the number of times the first user's process applies for memory space can be reduced.

[0095] In a specific embodiment of the present application, the cache service process can also store the data in the first memory space / second memory space to the disk of the computing cluster for persistent storage after the first memory space / second memory space is full of data. Then, the cache service process releases (reclaims) the first memory space / second memory space shared by the first process and the second process and / or the cache service process, thereby achieving cyclic and efficient utilization of the memory space in the shared memory pool.

[0096] Taking the example of a cache service process releasing a first memory space shared by a first process, a second process, and the cache service process, in a possible embodiment, after the cache service process stores the data in the first memory space to the disk of the computing cluster, the cache service process immediately releases the first memory space shared by a process, a second process, and the cache service process.

[0097] In another possible embodiment, if the cache service process is to achieve isolation of memory space resources in a shared memory pool that can be used by processes of different users by creating user-level namespaces for different users, then the cache service process can determine whether the usage heat of the memory space in the namespace of the first user is lower than the heat threshold after storing the data in the first memory space in the disk of the computing cluster. When it is determined that the usage heat is lower than the heat threshold, the first memory space shared by the first process, the second process and the cache service process is released. Otherwise, the first memory space shared by the first process, the second process and the cache service process is not released. The usage heat of the memory space in the namespace of the first user can be reflected by the usage frequency or the turnover rate.

[0098] It can be understood that the usage heat of the memory space in the namespace of the first user is higher than or equal to the heat threshold, which means that the usage heat of the memory space in the namespace of the first user is relatively high. In this case, the cache service process does not release the first memory space shared by the first process, the second process and the cache service process, which can reduce the frequency of the first user's process applying for memory space.

[0099] Furthermore, the specific process of the cache service process releasing the first memory space shared by a process, a second process, and the cache service process can be: the cache service process generates marking information, the marking information indicates that the first memory space is unavailable, and then the cache service process sends marking information to the first process, the marking information is used by the first process to release the first memory space corresponding to the first process, and sends marking information to the second process, the marking information is used by the second process to release the first memory space corresponding to the second process, and then the cache service process itself releases the first memory space corresponding to the cache service process. The above-mentioned first process / second process / cache service process releases the first memory space corresponding to itself, which means that the first process / second process / cache service process releases the mapping relationship between its own virtual address space and the first memory space.

[0100] Furthermore, taking the example of the cache service process sending marking information to the first process, the cache service process may send the marking information to the first process in the following manner 1 or manner 2.

[0101] Mode 1: The cache service process receives a request for obtaining the marking information corresponding to the first memory space periodically sent by the first process, and returns the marking information to the first process according to the obtaining request.

[0102] Specifically, the cache service process may query whether there is marking information corresponding to the first memory space according to the acquisition request, and when it is determined that there is marking information corresponding to the first memory space, return the marking information corresponding to the first memory space to the first process.

[0103] Optionally, after generating the marking information, the cache service process may also directly send the marking information to the first process.

[0104] Method 2: The cache service process adds tag information to the first memory space, and the first process can obtain the tag information when accessing the first memory space. Figure 4 As shown, in Figure 4 Taking the first memory space as memory space 2 as an example, the cache service process adds marking information in memory space 2.

[0105] In a specific implementation, if there is a process in the first user's process (taking the first process as an example) that has not released the first memory space corresponding to the first process, and the cache service process has released the first memory space corresponding to the cache service process first, if the first process accesses the first memory space corresponding to the first process again, the IO data corresponding to the first process cannot be persistently stored to the disk, and even causes the first process to crash. In order to avoid the above situation, the cache service process can release the first memory space corresponding to the cache service process after determining that all user processes (i.e. the first process and the second process) that share the first memory space have released their corresponding first memory spaces.

[0106] In a possible embodiment, if the cache service process sends marking information to the first process and the second process that share the first memory space through the above-mentioned method 1, the cache service process can start timing from the moment when it last received the acquisition request from the first user's process, and when the timing reaches the first duration, it is determined that the first process and the second process both release their corresponding first memory spaces. It can be understood that when the timing from the moment when the cache service process last received the acquisition request from the first user's process reaches the first duration, it means that the first process and the second process have not sent acquisition requests to the cache service process for a long time, which usually means that the first process and the second process have both released their first memory spaces.

[0107] The above-mentioned first duration can be customized according to the actual scenario. For example, the cache service process can set a cycle. When the cache service process has waited for a certain number of cycles after the last time it received the acquisition request from the first user's process, it is determined that the first process and the second process both release their corresponding first memory space.

[0108] Optionally, after releasing the first memory space corresponding to itself, the first process / the second process may send a notification to the cache service process to notify that the first memory space corresponding to the first process / the second process has been released.

[0109] In a specific implementation, if the cache service process is to achieve isolation of memory space resources in a shared memory pool that can be used by processes of different users by creating user-level namespaces for different users, taking the first process releasing the first memory space corresponding to the first process as an example, the first process can clear the first memory space in the namespace of the first user in the first process, and release the mapping relationship between the virtual address space in the first process and the first memory space. The process of the second process releasing the first memory space corresponding to the second process and the process of the cache service process releasing the first memory space corresponding to the cache service process are similar to the first process releasing the first memory space corresponding to the first process, and will not be elaborated here.

[0110] When multiple processes share the same memory space, taking the first process and the second process sharing the first memory space as an example, in order to ensure safe access to the first memory space and avoid resource contention and data inconsistency problems, a synchronization mechanism (such as locking) can be used to protect the first memory space to ensure that only one process can access the first memory space at a time.

[0111] When a computing cluster includes multiple computing devices and a shared memory pool of the computing cluster is composed of memories in multiple computing devices, after a cache service process receives a first cache application instruction from a first process, the cache service process can search for free memory space in the shared memory pool and allocate it to the first process based on the principle of local first and remote later.

[0112] The principle of local first and remote later, for example, Figure 5 As shown, assuming that the first process is performed by computing device A, the computing cluster also includes computing device B, and the shared memory pool is composed of the memory of computing device A and the memory of computing device B, then computing device A is a local device for the first process, and computing device B is a remote device for the first process. When the memory service process allocates the first memory space to the first process, it first determines whether there is free memory space in the memory of computing device A that can be allocated. If so, it allocates directly from the memory of computing device A. If not, it accesses computing device B to determine whether there is free memory space in the memory of computing device B that can be allocated.

[0113] In a possible embodiment, the computing cluster may be a high performance computing (HPC) cluster. HPC refers to a system that uses multiple processors of the same computing device or a computing system and environment of multiple computing devices in a cluster to perform complex computing processing.

[0114] It should be noted that, in the above embodiment, the description is made by taking the example that the process of the first user includes two processes, the first process and the second process. In a specific implementation, the process of the first user may include more processes. When the process of the first user includes more processes, the way in which the more processes use the shared memory pool is similar to the way in which the first process and the second process use the shared memory pool. For the sake of brevity of the specification, it will not be elaborated here.

[0115] It can be seen from the above embodiments that in the cache management method provided by the present application, since the first memory space in the shared memory pool is only shared by the first process of the first user and the second process of the first user, and is not shared by the processes of other users, the first process of the first user and the second process of the first user have the right to access the data in the first memory space, while the processes of other users do not have the right to access the data in the first memory space, thereby preventing the data in the first memory space from being accessed unauthorizedly. Similarly, since the second memory space in the shared memory pool is only shared by the first process of the first user and the second process of the first user, and is not shared by the processes of other users, the first process of the first user and the second process of the first user have the right to access the data in the second memory space, while the processes of other users do not have the right to access the data in the second memory space, thereby preventing the data in the second memory space from being accessed unauthorizedly.

[0116] In addition, in the above scheme, since the cache service process allocates the second memory space to the first process according to the first cache application instruction sent by the first process when the current first memory space of the first process is not enough to store the data corresponding to the first IO request, and allocates the second memory space to the second process according to the second cache application instruction sent by the second process when the first memory space corresponding to the second process is not enough to store the data corresponding to the second IO request, dynamic allocation of the shared memory pool is realized. It can be understood that when the shared memory pool can be dynamically allocated, waste of memory pool resources can be avoided and efficient use of memory pool resources can be achieved.

[0117] It should be understood that the above Figure 2 The size of the serial numbers of the steps in the illustrated embodiment does not imply the order of execution. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.

[0118] Next, the cache management device provided by the present application is introduced. It should be understood that the unit modules inside the cache management device can also be divided into multiple types. Each module can be a software module or a hardware module, or partly a software module and partly a hardware module. The present application does not limit it. When the cache management device includes multiple unit modules, each module in the multiple unit modules can be deployed on the same computing device (such as a server) or on different computing devices. The present application does not make specific limitations.

[0119] See also Figure 6 , Figure 6 is a schematic diagram of a cache management device 600 provided in an embodiment of the present application. The device 600 can be applied to Figure 1 The computing cluster shown includes at least one computing device, such as Figure 6 As shown, the device 600 includes: an acquisition module 610, a sending module 620 and a memory allocation module 630.

[0120] The following is an exemplary introduction to the functions of each module of the cache management device 600. It should be understood that the functions of each module described below are only functions that the cache management device 600 may have in some embodiments of the present application, and the present application does not limit the functions of each module.

[0121] An acquisition module 610 is configured to acquire, through the first process, a first IO request corresponding to the first process;

[0122] The sending module 620 is used to send a first cache application instruction to the cache service process through the first process when the current first memory space of the first process is insufficient to store data corresponding to the first IO request, wherein the first memory space is a section of space in the shared memory pool and is shared by the first process and the second process;

[0123] The memory allocation module 630 is used to allocate the second memory space in the shared memory pool to the first process according to the first cache application instruction through the cache service process;

[0124] The acquisition module 610 is further configured to acquire, through the second process, a second IO request corresponding to the second process;

[0125] The sending module 620 is further configured to send a second cache application instruction to the cache service process through the second process when the first memory space corresponding to the second process is insufficient to store data corresponding to the second IO request;

[0126] The memory allocation module 630 is further configured to allocate the second memory space to the second process according to the second cache application instruction through the cache service process.

[0127] In some possible embodiments, the memory allocation module 630 is specifically used to:

[0128] When the cache service process determines that the frequency of the cache application instructions received from the process of the first user is higher than the frequency threshold, multiple second memory spaces in the shared memory pool are allocated to the first process according to the first cache application instruction.

[0129] In some possible embodiments, the memory allocation module 630 is specifically used to:

[0130] The cache service process allocates a second memory space in the shared memory pool to the first process according to the first capacity carried in the first cache application instruction, and the capacity of the second memory space is the first capacity.

[0131] In some possible embodiments, the capacity of the second memory space is fixed.

[0132] In some possible embodiments, the first memory space is shared by the first process, the second process, and the cache service process.

[0133] In some possible embodiments, Figure 6 As shown, the apparatus 600 further includes: a memory release module 640;

[0134] The memory release module 640 is used to:

[0135] After the first memory space is full of data, the data in the first memory space is stored in the disk of the computing cluster through the cache service process;

[0136] The first memory space shared by the first process, the second process and the cache service process is released through the cache service process.

[0137] In some possible embodiments, the memory release module 640 is specifically used to release the first memory space shared by the first process, the second process and the cache service process when the usage heat of the memory space in the namespace of the first user is lower than the heat threshold through the cache service process, wherein the namespace of the first user includes the memory space allocated to the first process and the memory space allocated to the second process in the shared memory pool.

[0138] In some possible embodiments, the memory release module 640 is specifically used to:

[0139] Generate marking information through a cache service process, where the marking information indicates that the first memory space is unavailable;

[0140] Sending marking information to the first process through the cache service process, where the marking information is used by the first process to release a first memory space corresponding to the first process;

[0141] Sending marking information to the second process through the cache service process, where the marking information is used by the second process to release the first memory space corresponding to the second process;

[0142] The first memory space corresponding to the cache service process is released through the cache service process.

[0143] In some possible embodiments, the first process, the second process, and the cache service process run on the same computing device or different computing devices in the computing cluster.

[0144] Specifically, the specific implementation of the cache management device 600 to perform various operations can refer to the above Figure 2 The cache management method provided by the present application is shown and will not be described here in detail for the sake of brevity of the specification.

[0145] In a specific implementation, the acquisition module 610, the sending module 620, the memory allocation module 630 and the memory release module 640 can all be implemented by software, or can be implemented by hardware. Exemplarily, the implementation of the sending module 620 is introduced below by taking the sending module 620 as an example. Similarly, the implementation of the acquisition module 610, the memory allocation module 630 and the memory release module 640 can refer to the implementation of the sending module 620.

[0146] As an example of a software functional unit, the sending module 620 may include code running on a computing instance. Among them, the computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Further, the above-mentioned computing instance may be one or more. For example, the sending module 620 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed in the same region (region) or in different regions. Furthermore, the multiple hosts / virtual machines / containers used to run the code may be distributed in the same availability zone (AZ) or in different AZs, each AZ including a data center or multiple data centers with close geographical locations. Among them, usually a region may include multiple AZs.

[0147] Similarly, multiple hosts / virtual machines / containers used to run the code can be distributed in the same virtual private cloud (VPC) or in multiple VPCs. Usually, a VPC is set up in a region. For cross-region communication between two VPCs in the same region and between VPCs in different regions, a communication gateway needs to be set up in each VPC to achieve interconnection between VPCs through the communication gateway.

[0148] As an example of a hardware functional unit, the sending module 620 may include at least one computing device, such as a server, etc. Alternatively, the sending module 620 may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof.

[0149] When the sending module 620 includes multiple computing devices, the multiple computing devices included can be distributed in the same region or in different regions. The multiple computing devices included in the sending module 620 can be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in the sending module 620 can be distributed in the same VPC or in multiple VPCs. The multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.

[0150] It should be noted that, in other embodiments, the sending module 620 may be used to execute Figure 2 The acquisition module 610 can be used to execute any step performed by the first process, the second process and the cache service process in the cache management processing method shown in FIG. Figure 2 The memory allocation module 630 can be used to perform any step performed by the first process, the second process and the cache service process in the cache management processing method shown in FIG. Figure 2 The memory release module 640 can be used to execute any step performed by the first process, the second process and the cache service process in the cache management processing method shown in FIG. Figure 2 Any steps performed by the first process, the second process and the cache service process in the cache management processing method shown,

[0151] The steps implemented by the acquisition module 610, the sending module 620, the memory allocation module 630 and the memory release module 640 can be specified as needed, and the steps implemented by the acquisition module 610, the sending module 620, the memory allocation module 630 and the memory release module 640 can be specified as needed. Figure 2 The different steps in the cache management processing method shown implement the cache management processing method.

[0152] The present application also provides a computing device that can be deployed Figure 6 The cache management device 600 is shown. Figure 7 ,like Figure 7 As shown, the computing device 700 includes: a processor 710 , a memory 720 and a communication interface 730 , wherein the processor 710 , the memory 720 and the communication interface 730 may be interconnected via a bus 740 .

[0153] The processor 710 can read the program code (including instructions) stored in the memory 720, and execute the program code stored in the memory 720, so that the computing device 700 executes Figure 2 The cache management method provided by the present application as shown may enable the computing device 700 to deploy a cache management apparatus 600 .

[0154] The processor 710 may have a variety of specific implementation forms, such as a central processing unit (CPU), or a combination of a CPU and a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. The processor 710 executes various types of digital storage instructions, such as software or firmware programs stored in the memory 720, which enables the computing device 700 to provide a variety of services.

[0155] The memory 720 is used to store program codes and is controlled and executed by the processor 710. The program code may include one or more software modules, which may be Figure 6 The software modules provided in the illustrated embodiment include the code of the acquisition module 610 , the code of the sending module 620 , the code of the memory allocation module 630 , and the code of the memory release module 640 .

[0156] The memory 720 may include a volatile memory, such as a random access memory (RAM); the memory 720 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD); the memory 720 may also include a combination of the above types.

[0157] The communication interface 730 may be a wired interface (e.g., an Ethernet interface, a fiber optic interface, or other types of interfaces (e.g., an infiniBand interface)) or a wireless interface (e.g., a cellular network interface or a wireless local area network interface) for communicating with other computing devices or apparatuses. The communication interface 730 may use a protocol family above the transmission control protocol / internet protocol (TCP / IP), such as a remote function call (RFC) protocol, a simple object access protocol (SOAP) protocol, a simple network management protocol (SNMP) protocol, a common object request broker architecture (CORBA) protocol, and a distributed protocol, etc.

[0158] Bus 740 may be a peripheral component interconnect express (PCIe) bus, an extended industry standard architecture (EISA) bus, a unified bus (Ubus or UB), a compute express link (CXL), a cache coherent interconnect for accelerators (CCIX), etc. Bus 740 may be divided into an address bus, a data bus, a control bus, etc. In addition to a data bus, bus 740 may also include a power bus, a control bus, and a status signal bus, etc. However, for the sake of clarity, various buses are labeled as bus 740 in the figure. For ease of representation, Figure 7 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0159] The computing device 700 may be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device 700 may also be a terminal device such as a desktop computer or a laptop computer.

[0160] The computing device 700 is used to execute Figure 2 The cache management method provided by the present application is shown in detail in the above method embodiment, and will not be repeated here.

[0161] It should be understood that the computing device 700 is only an example provided in the embodiment of the present application, and the computing device 700 may have more Figure 7 The components shown may be more or less than the components, may be combined with two or more components, or may be implemented with a different configuration of components.

[0162] The present application also provides a computing cluster, which can be deployed Figure 6 The cache management device 600 shown in the figure, the operations and / or functions of each module in the computing cluster are respectively to implement Figure 2 The corresponding steps in the cache management method shown.

[0163] See also Figure 8 ,like Figure 8 As shown, the computing cluster 800 includes at least one computing device 700. The memory 720 in one or more computing devices 700 in the computing cluster 800 may store the same Figure 2 Instructions of the cache management method shown.

[0164] In some possible implementations, the memory 720 of one or more computing devices 700 in the computing cluster 800 may also store a memory for executing Figure 2 In other words, the combination of one or more computing devices 700 can jointly execute instructions for executing Figure 2 Instructions of the cache management method shown.

[0165] It should be noted that the memory 720 in different computing devices 700 in the computing cluster 800 may store different instructions, which are respectively used to execute part of the functions of the cache management device 600. That is, the instructions stored in the memory 720 in different computing devices 700 may implement the functions of one or more modules among the acquisition module 610, the sending module 620, the memory allocation module 630 and the memory release module 640.

[0166] An embodiment of the present application also provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed, some or all of the steps of the cache management method recorded in the above embodiment can be implemented.

[0167] The embodiment of the present application also provides a computer program product. When the computer program product is read and executed by a computer, it can implement some or all of the steps of the cache management method recorded in the above method embodiment.

[0168] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0169] In the above embodiments, it can be implemented in whole or in part by software, hardware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, a data center, etc. that contains one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium, or a semiconductor medium, etc.

[0170] The above is only a specific implementation of the present application. Those skilled in the art may conceive of changes or substitutions based on the specific implementation provided by the present application, which should all be included in the protection scope of the present application.

Claims

1. A cache management method, characterized in that: Applied to a computing cluster including at least one computing device, the computing cluster runs a first process and a second process of a first user and a cache service process, the computing cluster includes a shared memory pool, and the method includes: The first process obtains a first input / output (IO) request corresponding to the first process; When the current first memory space of the first process is insufficient to store data corresponding to the first IO request, the first process sends a first cache application instruction to the cache service process, where the first memory space is a section of space in the shared memory pool and is shared by the first process and the second process; The cache service process allocates a second memory space in the shared memory pool to the first process according to the first cache application instruction; The second process obtains, by the second process, a second IO request corresponding to the second process; When the first memory space corresponding to the second process is insufficient to store data corresponding to the second IO request, the second process sends a second cache application instruction to the cache service process; The cache service process allocates the second memory space to the second process according to the second cache application instruction.

2. The method according to claim 1, characterized in that: The cache service process allocates the second memory space in the shared memory pool to the first process according to the first cache application instruction, including: When the cache service process determines that the frequency of the cache application instructions received from the process of the first user is higher than a frequency threshold, the cache service process allocates a plurality of second memory spaces in the shared memory pool to the first process according to the first cache application instructions.

3. The method according to claim 1 or 2, characterized in that: The cache service process allocates the second memory space in the shared memory pool to the first process according to the first cache application instruction, including: The cache service process allocates a second memory space in the shared memory pool to the first process according to the first capacity carried in the first cache application instruction, and the capacity of the second memory space is the first capacity.

4. The method according to claim 1 or 2, characterized in that: The capacity of the second memory space is fixed.

5. The method according to any one of claims 1 to 4, characterized in that: The first memory space is shared by the first process, the second process and the cache service process.

6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: After the first memory space is full of data, the cache service process stores the data in the first memory space in a disk of the computing cluster; The cache service process releases the first memory space shared by the first process, the second process, and the cache service process.

7. The method according to claim 6, characterized in that The cache service process releases the first memory space shared by the first process, the second process, and the cache service process, including: When the cache service process determines that the usage heat of the memory space in the namespace of the first user is lower than a heat threshold, the cache service process releases the first memory space shared by the first process, the second process and the cache service process, wherein the namespace of the first user includes the memory space allocated to the first process and the memory space allocated to the second process in the shared memory pool.

8. The method according to claim 6 or 7, characterized in that: The cache service process releases the first memory space shared by the first process, the second process, and the cache service process, including: The cache service process generates marking information, where the marking information indicates that the first memory space is unavailable; The cache service process sends the marking information to the first process, where the marking information is used by the first process to release the first memory space corresponding to the first process; The cache service process sends the marking information to the second process, where the marking information is used by the second process to release the first memory space corresponding to the second process; The cache service process releases the first memory space corresponding to the cache service process.

9. The method according to any one of claims 1 to 8, characterized in that: The first process, the second process and the cache service process run on the same computing device or different computing devices in the computing cluster.

10. A cache management device, characterized in that: Applied to a computing cluster including at least one computing device, the computing cluster runs a first process and a second process of a first user and a cache service process, the computing cluster includes a shared memory pool, and the apparatus includes: An acquisition module, configured to acquire, through the first process, a first IO request corresponding to the first process; a sending module, configured to send a first cache application instruction to the cache service process through the first process when the current first memory space of the first process is insufficient to store data corresponding to the first IO request, wherein the first memory space is a section of space in the shared memory pool and is shared by the first process and the second process; a memory allocation module, configured to allocate a second memory space in the shared memory pool to the first process through the cache service process according to the first cache application instruction; The acquisition module is further used to acquire, through the second process, a second IO request corresponding to the second process; The sending module is further configured to send a second cache application instruction to the cache service process through the second process when the first memory space corresponding to the second process is insufficient to store data corresponding to the second IO request; The memory allocation module is further configured to allocate the second memory space to the second process through the cache service process according to the second cache application instruction.

11. The device according to claim 10, characterized in that The memory allocation module is specifically used for: When the cache service process determines that the frequency of the cache application instructions received from the first user's process is higher than a frequency threshold, multiple second memory spaces in the shared memory pool are allocated to the first process according to the first cache application instructions.

12. The device according to claim 10 or 11, characterized in that The memory allocation module is specifically used for: The cache service process allocates a second memory space in the shared memory pool to the first process according to the first capacity carried in the first cache application instruction, and the capacity of the second memory space is the first capacity.

13. The device according to claim 10 or 11, characterized in that The capacity of the second memory space is fixed.

14. The device according to any one of claims 10 to 13, characterized in that The first memory space is shared by the first process, the second process and the cache service process.

15. The device according to any one of claims 10 to 14, characterized in that The device also includes: a memory release module; The memory release module is used to: After the first memory space is full of data, the cache service process stores the data in the first memory space in a disk of the computing cluster; The first memory space shared by the first process, the second process and the cache service process is released through the cache service process.

16. The device according to claim 15, characterized in that The memory release module is specifically used for: When the cache service process determines that the usage heat of the memory space in the namespace of the first user is lower than a heat threshold, the first memory space shared by the first process, the second process and the cache service process is released, wherein the namespace of the first user includes the memory space allocated to the first process and the memory space allocated to the second process in the shared memory pool.

17. The device according to claim 15 or 16, characterized in that The memory release module is specifically used for: Generate marking information by the cache service process, where the marking information indicates that the first memory space is unavailable; Sending the marking information to the first process through the cache service process, where the marking information is used by the first process to release the first memory space corresponding to the first process; Sending the marking information to the second process through the cache service process, where the marking information is used by the second process to release the first memory space corresponding to the second process; The first memory space corresponding to the cache service process is released through the cache service process.

18. The device according to any one of claims 10 to 17, characterized in that The first process, the second process and the cache service process run on the same computing device or different computing devices in the computing cluster.

19. A computing cluster, characterized in that: It includes at least one computing device, each of which includes a processor and a memory; the processor of the at least one computing device is used to execute instructions stored in the memory of the at least one computing device, so that the computing cluster executes the method according to any one of claims 1 to 9.

20. A computer storage medium, characterized in that The computer storage medium stores a computer program for inter-process communication, and when the computer program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Buffer management method and device

    CN103927123A

  • Memory management method and device and server

    CN110858162A

  • Multi-tenant space resource management method, system and device and storage medium

    CN113986528A

  • Communication method in computer system and related product

    CN116257368A

  • Communication method and device

    CN116361026A

Cited By

  • Cache management method and device and computer readable storage medium

    EP4783005A1

  • Cache management method and device and computer readable storage medium

    WO2025066937A1