The present application claims the priority of the Chinese patent application filed on Jun. 12, 2020 before the CNIPA, China National Intellectual Property Administration with the application number of 202010538125.5 and the title of “NONVOLATILE MEMORY SCHEDULING METHOD, SYSTEM AND DEVICE, FOR SCHEDULING NON-VOLATILE MEMORY, AND READABLE STORAGE MEDIUM”, which is incorporated herein in its entirety by reference.
The present application relates to the field of memory scheduling, in particular to a method, system and device for scheduling a non-volatile memory, and a readable storage medium.
A non-volatile memory is a new type of storage medium that may replace the next generation memory specification DDR4 for use as a system memory, as well as solid state drives or mechanical hard drives for use as a data memory. When used as a data memory, the non-volatile memory has a much greater data transfer bandwidth than a conventional data memory.
In the prior art, a server system configured with non-volatile memory devices is able to retain memory data even in the event of a sudden power failure on a server by taking advantage of the feature of nonvolatility of this new storage medium, thereby improving the recoverability of an application system. However, this technology uses the non-volatile memory devices exclusively for memory and does not consider the possibility of use as a data memory based on the high bandwidth thereof.
The present application aims to provide a method, system and device for scheduling a non-volatile memory, and a readable storage medium, so as to increase the read-write rate of a data memory while improving the utilization rate of non-volatile memory devices based on the features of nonvolatility and high bandwidth of the devices.
In order to solve the above technical problems, the present application provides a method for scheduling a non-volatile memory, including:
In an embodiment of the present application, the determining a first to-be-converted space of the memory space includes:
In an embodiment of the present application, the storing data from a conventional storage device into the high-speed storage space includes:
In an embodiment of the present application, the calculating degrees of activity of data in the conventional storage device includes:
In an embodiment of the present application, the determining a second to-be-converted space of the high-speed storage space includes:
The present application further provides a system for scheduling a non-volatile memory, including:
In an embodiment of the present application, the first conversion module includes:
In an embodiment of the present application, the first conversion module includes:
The present application further provides a device for scheduling a non-volatile memory, including:
The present application further provides a readable storage medium, a computer program is stored on the readable storage medium, and the operations of the method for scheduling the non-volatile memory according to any one of the above embodiments are implemented when the computer program is executed by a processor.
The present application provides a method for scheduling a non-volatile memory. The method includes: acquiring a utilization rate of a current memory space; determining, in the case that the utilization rate is less than a first threshold, a first to-be-converted space of the memory space, converting the first to-be-converted space into a high-speed storage space, and storing data from a conventional storage device into the high-speed storage space; and determining, in the case that the utilization rate is greater than a second threshold, a second to-be-converted space of the high-speed storage space, storing data stored in the second to-be-converted space into the conventional storage device, and converting the second to-be-converted space into the memory space; and the second threshold is greater than the first threshold.
By means of the technical solution according to the present application, by converting the memory space into the high-speed storage space and storing the data from the conventional storage device into the high-speed storage space in the case that the utilization rate of the current memory space is less than the first threshold, the read-write speed of the data memory is increased while the utilization rate of the device is improved; and by storing the data stored in the high-speed storage space into the conventional storage device and then converting the high-speed storage space into the memory space in the case that the utilization rate of the current memory space is greater than the second threshold, server lag caused by high memory occupation is avoided, and the operation speed of a server is ensured. The present application further provides a system and device for scheduling a non-volatile memory, and a readable storage medium, with the above beneficial effects, which will not be repeated herein.
In order to more clearly explain the embodiments of the present application or the technical solutions in the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior technical description. Obviously, the drawings in the following description are only some embodiments of the present application. For ordinary technicians in the field, they may also obtain other embodiments according to these drawings without paying creative labor.
The core of the present application is to provide a method, system and device for scheduling a non-volatile memory, and a readable storage medium, so as to increase the read-write rate of a data memory while improving the utilization rate of non-volatile memory devices based on the features of nonvolatility and high bandwidth of the devices.
In order to make the purposes, technical solutions and advantages of the embodiments of the application clearer, the following will describe the technical solutions in the embodiments of the present application clearly and completely in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of them. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the art without doing creative work belong to the scope of protection in the present application.
Reference is made to
The method specifically includes the following steps:
S101: acquiring a utilization rate of a current memory space.
Aiming at the problem that in the prior art, the non-volatile memory devices are exclusively used for memory, and the possibility of use as a data memory based on the feature of high bandwidth thereof is not considered, the present application provides the method for scheduling the non-volatile memory, so as to increase the read-write rate of the data memory while improving the utilization rate of the non-volatile memory devices based on the features of nonvolatility and high bandwidth of the devices.
In an implementation of the present application, a specific way to acquire the utilization rate of the current memory space may be to determine the utilization rate of the current memory space by calculating a ratio of an occupied memory space to a total memory space.
S102: determining, in the case that the utilization rate is less than a first threshold, a first to-be-converted space of the memory space, convert the first to-be-converted space into a high-speed storage space, and store data from a conventional storage device into the high-speed storage space.
In this step, in the case that the utilization rate is less than the first threshold, it indicates that at this time the utilization rate of the current memory space is low and a free memory space is large. In this case, in order to improve the utilization rate of the device and increasing the read-write speed of the data memory at the same time, the present application converts part of the memory space into the high-speed storage space to store data.
In an implementation of the present application, determining the first to-be-converted space of the memory space may also be specifically implemented by performing steps shown in
Reference is made to
The following steps are specifically included:
S201: calculating a capacity of a used memory space based on the utilization rate.
In an implementation of the present application, the capacity of the used memory space may be obtained specifically by multiplying the utilization rate by a capacity of the total memory space.
S202: calculating, based on the capacity of the used memory space, a capacity of the memory space in the case that the utilization rate is equal to a third threshold, and determining a capacity of the first to-be-converted space as a capacity variation of the memory space.
In an implementation of the present application, the capacity of the memory space in the case that the utilization rate is equal to the third threshold may be specifically obtained by dividing the capacity of the used memory space by the third threshold, and thus the capacity of the first to-be-converted space is a difference between the capacity of the total memory space and the capacity of the memory space in the case that the utilization rate is equal to the third threshold.
S203: determining the first to-be-converted space in a free space of the memory space based on the capacity of the first to-be-converted space.
The third threshold referred to herein is greater than the first threshold and less than a second threshold.
In this step, after the capacity of the first to-be-converted space is determined, a space of the same capacity as the first to-be-converted space is divided out from the free space of the memory space, and the space is used as the first to-be-converted space.
In an implementation of the present application, in order to further increase the read and write rates of the data memory, data with a high degree of activity may also be stored into the high-speed storage space, namely, storing the data from the conventional storage device into the high-speed storage space in step S102, which may be implemented specifically by performing the following steps:
Further, a specific way to calculate the degrees of activity of the data in the conventional storage device may be to:
S103: determining, in the case that the utilization rate is greater than the second threshold, a second to-be-converted space of the high-speed storage space, storing data stored in the second to-be-converted space into the conventional storage device, and converting the second to-be-converted space into the memory space.
In this step, the second threshold referred to herein is greater than the first threshold, and in the case that the utilization rate of the current memory space is greater than the second threshold, it indicates that the utilization rate of the current memory space is high, and the memory space may not be sufficient. In this case, in order to avoid the server lag caused by high memory occupation and ensure the operation speed of a server, the present application stores the data stored in the high-speed storage space into the conventional storage device, and then converts the high-speed storage space into the memory space, which avoids the above problems.
In an implementation of the present application, in order to minimize the impact of conversion of the high-speed storage space on the read-write rate of the data memory, data with a low degree of activity may be transferred to the conventional storage device, so as to ensure that data with a high degree of activity is in the high-speed storage space, namely, determining the second to-be-converted space of the high-speed storage space referred to herein, which may also be specifically implemented by performing the steps shown in
Reference is made to
The following steps are specifically included:
S301: calculating the capacity of the used memory space based on the utilization rate.
S302: calculating, based on the capacity of the used memory space, a capacity of the memory space in the case that the utilization rate is equal to a fourth threshold, and determining a capacity of the second to-be-converted space as a capacity variation of the memory space.
S303: calculating degrees of activity of data in a high-speed storage space, and storing data with a degree of activity less than a second preset value into the conventional storage device.
S304: determining the second to-be-converted space in the free space of the high-speed storage space based on the capacity of the second to-be-converted space.
The fourth threshold is greater than the first threshold and less than the second threshold.
Based on the above technical solution, by means of the method for scheduling the non-volatile memory according to the present application, by converting the memory space into the high-speed storage space in the case that the utilization rate of the current memory space is less than the first threshold, and storing the data from the conventional storage device into the high-speed storage space, the read-write speed of the data memory is increased while the device utilization rate is improved; and by storing the data stored in the high-speed storage space into the conventional storage device in the case that the utilization rate of the current memory space is greater than the second threshold, and then converting the high-speed storage space into the memory space, server lag caused by high memory occupation is avoided, and the operation speed of the server is ensured.
Reference is made to
The system may include:
The second threshold is greater than the first threshold.
On the basis of the above embodiment, in a specific embodiment, the first conversion module 200 may include:
The third threshold is greater than the first threshold and less than the second threshold.
On the basis of the above embodiment, in a specific embodiment, the first conversion module 200 may include:
Further, the second calculation sub-module includes:
On the basis of the above embodiment, in a specific embodiment, the second conversion module 300 may include:
The fourth threshold is greater than the first threshold and less than the second threshold.
Since the embodiment of the system corresponds to the embodiment of the method, the embodiment of the system may be referred to the description of the embodiment of the method, which will not be repeated herein.
Reference is made to
The device 500 for scheduling the non-volatile memory may vary greatly depending on configuration or performance, and may include one or more central processing units (CPUs) 522 (such as one or more processors), a memory 532, and one or more storage media 530 (such as one or more mass-storage devices) for storing applications 542 or data 544. The memory 532 and the storage medium 530 may be ephemeral storage or persistent storage. The programs stored in the storage medium 530 may include one or more modules (not shown), each of which may include a series of instruction operations for the device. Furthermore, the processor 522 may be set to communicate with the storage medium 530 to execute the series of instruction operations in the storage medium 530 on the device 500 for scheduling the non-volatile memory.
The device 500 for scheduling the non-volatile memory may further include one or more power supplies 525, one or more wired or wireless network interfaces 550, one or more input/output interfaces 558, and/or, one or more operating systems 541, such as Windows Server™, Mac OS X™, Unix™, Linux™, and FreeBSD™.
The steps in the above method for scheduling the non-volatile memory as described in
Those skilled in the art may clearly understand that, for the convenience and simplicity of description, the specific working process of the above described systems, devices and modules may refer to the corresponding process in the above method embodiments, and will not be repeated here.
In several embodiments provided in the present application, it should be understood that the disclosed device, apparatus and method may be realized in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules is only a logical function division, and there may be another division method when actually implemented, for example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not implemented. On the other hand, the mutual coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices or modules, and may be electrical, mechanical or other forms.
The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place or distributed to multiple network modules. Some or all of the modules may be selected according to the actual needs to achieve the purpose of this embodiment.
In addition, each functional module in each embodiment of the present application may be integrated in a processing module, or each module may exist physically independently, or two or more modules may be integrated in a module. The above integrated modules may be implemented in the form of hardware or software function modules.
If the integrated modules are implemented in the form of software functional modules and sold or used as independent products, they may be stored in a computer readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or the whole or part of the technical solution, may be embodied in the form of a software product, which is stored in a storage medium, which includes a number of instructions to enable a computer device (which may be a personal computer, a function calling device, or a network device, etc.) to perform all or part of the steps of the methods of the various embodiments of the present application. The aforementioned storage media include: USB flash disk, mobile hard disk, read only memory (ROM), random access memory (RAM), magnetic disc or optical disc and other media that may store program codes.
The method, system, device and readable storage medium for scheduling the non-volatile memory provided in the present application are described in detail above. In this paper, specific examples are used to explain the principle and implementation mode of the present application. The above examples are only used to help understand the method and core idea of the application. It should be pointed out that for ordinary technicians in the technical field, certain improvements and modifications may be made to the present application without departing from the principles of the application, and these improvements and modifications also fall within the protection scope of the claims of the application.
It should also be noted that in this specification, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms “including”, “comprising” or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or equipment including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or equipment. Without more restrictions, the elements defined by the statement “including one . . . ” do not exclude that there are other identical elements in the process, method, article or equipment including the elements.
Number | Date | Country | Kind |
---|---|---|---|
202010538125.5 | Jun 2020 | CN | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/CN2021/076874 | 2/19/2021 | WO |
Publishing Document | Publishing Date | Country | Kind |
---|---|---|---|
WO2021/248935 | 12/16/2021 | WO | A |
Number | Name | Date | Kind |
---|---|---|---|
20110138115 | Oh | Jun 2011 | A1 |
20120203999 | Jess | Aug 2012 | A1 |
20140281064 | Imazaki | Sep 2014 | A1 |
20180088853 | Kotra | Mar 2018 | A1 |
20180188963 | Yao et al. | Jul 2018 | A1 |
20200020360 | Kosuru | Jan 2020 | A1 |
20200097182 | Volvovski | Mar 2020 | A1 |
20210334021 | Devasigamony | Oct 2021 | A1 |
20220100406 | Zhou | Mar 2022 | A1 |
Number | Date | Country |
---|---|---|
103810113 | May 2014 | CN |
104040512 | Sep 2014 | CN |
106649152 | May 2017 | CN |
109389213 | Feb 2019 | CN |
111722804 | Sep 2020 | CN |
Entry |
---|
Feng, Yazhi, et al. “Multiple subpage writing FTL in MLC by exploiting dual mode operations.” IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems 39.3 (2019): 599-612. (Year: 2019). |
Ozturk, Ozcan, Mahmut Kandemir, and Mary Jane Irwin. “Increasing on-chip memory space utilization for embedded chip multiprocessors through data compression.” Proceedings of the 3rd IEEE/ACM/IFIP international conference on Hardware/software codesign and system synthesis. 2005. (Year: 2005). |
PCT/CN2021/076874 international search report. |
Number | Date | Country | |
---|---|---|---|
20230195315 A1 | Jun 2023 | US |