Hybrid use of non-volatile memory as storage and cache
By introducing a buffer pool management system, allowing applications to access data directly from nonvolatile memory and copy data to local memory when needed, it solves the problem of using nonvolatile memory to achieve data atomicity and persistence in the prior art without changing commercial-grade file systems and database servers, and achieves efficient data access and improved system performance.
Patent Information
- Application Number
- CN201980069988.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2018-10-23
- Filing Date
- 2019-10-09
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2039-10-09
AI Technical Summary
The prior art is difficult to use nonvolatile memory as a persistent storage device to achieve atomicity and persistence of data without changing the write-ahead logging or page replacement algorithms of commercial-grade file systems and database servers.
By introducing a buffer pool management system, the state and memory location references of logical buffers are managed, allowing applications to access data directly from nonvolatile memory and copy data into local memory when needed, achieving atomicity and persistence of the data.
It realizes that non-volatile memory is used to provide data atomicity and persistence without changing the subsystem of the existing file system and database server, improves the acceleration time of the database system, increases cache capacity, and improves the performance of write operations and reduces power consumption.
Smart Images

Figure CN112912858B_ABST
Abstract
Description
Background Art
[0001] Recent developments in computer storage technology have provided a form of non-volatile memory (NVM) for use as a persistent storage device to support various storage systems (such as file systems and database servers). Such non-volatile memory can replace disk-based storage devices and solid-state storage devices (SSDs). When non-volatile memory is used as a persistent storage device within a file system or database server, the non-volatile memory is viewed by the computer system as a form of storage device from which data is read into local storage, and data (modified data or newly created data) is written to the storage device from local storage. Whether the storage device is implemented using NVM, SSD, or disk-based storage devices, the memory management of the computer system is generally the same. Summary of the invention
[0002] This Summary is provided to introduce some concepts in a simplified form, which are further described in the Detailed Description below. This Summary is not intended to identify key or essential features of the claimed subject matter, nor is it intended to limit the scope of the claimed subject matter.
[0003] A common specification for memory and storage devices is latency, which is the amount of time between the time a read request is received on the input and the time the requested data is provided on the output. Certain forms of nonvolatile memory that can be used as persistent storage devices have latency that is on the same order of magnitude, or a small multiple, of the latency of other memory devices that are typically used as local memory in computer systems, such as dynamic random access memory (DRAM) or static random access memory (SRAM).
[0004] Using such non-volatile memory, it is feasible for applications to access data directly from the non-volatile memory used as a storage device without copying the data to local storage and without significantly affecting performance. However, if the data is to be modified, problems arise. Most file systems and database systems can guarantee data atomicity and persistence that cannot be provided in the case where applications can modify data directly in non-volatile memory.
[0005] Commercial grade file systems and database servers also typically have robust solutions for subsystems to ensure this data atomicity and persistence level while managing virtual memory and caches. For example, some database systems implement write-ahead logging to ensure the atomicity and immutability of transactions when writing data to the database. As another example, computer systems typically perform memory management using a form of virtual memory and caches, both of which rely on page replacement algorithms (such as the least recently used (LRU) replacement algorithm) to free up memory locations. Because commercial applications rely on the stability of these subsystems, it is difficult to change these subsystems without introducing significant risk.
[0006] A memory system has been developed in which a non-volatile memory is used as a persistent storage device while allowing applications to bypass local memory and directly read data stored in the non-volatile memory. In applications such as database servers or file systems, the memory system can be implemented without changing any write-ahead logging or page replacement algorithms.
[0007] The memory system includes a buffer pool management system that manages access to data in the computer system through buffer pools. A buffer pool is a data structure that defines a collection of logical buffers in which data resides. An application is assigned one or more logical buffers for reading and writing data. A logical buffer is a data structure that has, among other things, a state and a reference to a set of locations in memory. These locations can be in local memory, typically dynamic random access memory, or can be in non-volatile memory used as a persistent storage device. As long as the state of the logical buffer is read-only, these locations can reference non-volatile memory. When the state of the logical buffer allows write access, these locations will reference local memory. When a transition occurs between read and write access, data can be transferred between non-volatile memory and local memory, and data in the data structure of the logical buffer can be updated.
[0008] The currently used buffer pool management system can be modified to implement the memory system in a way that is transparent to write-ahead logging or page replacement algorithms, thereby allowing non-volatile memory to be used as a persistent storage device in the memory system while minimizing changes to the database server or file system. For read-only data, copying data to local memory can be avoided, which can improve ramp-up times in the database system, increase cache capacity, and improve performance of write operations. Power consumption can be reduced by avoiding memory copies and reducing over-provisioning.
[0009] In the following description, reference is made to the accompanying drawings which form a part hereof, and in which are shown by way of illustration specific example implementations. Other implementations may be made without departing from the scope of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1 is a block diagram of an example computing environment including a buffer pool management system for a computing system that uses non-volatile memory as a persistent storage device.
[0011] Figure 2 is a schematic diagram showing how a buffer pool defines buffers allocated in local memory or non-volatile memory.
[0012] Figure 3 is a flow chart describing the operation of allocating a buffer for read access directly from non-volatile memory.
[0013] Figure 4 is a flow chart describing an operation of modifying a buffer used to access data from a local memory;
[0014] Figure 5 is a flow chart describing operations of releasing local memory referenced by a buffer and causing the buffer to reference non-volatile memory.
[0015] Figure 6 is a block diagram of an example computer. DETAILED DESCRIPTION
[0016] Figure 1 is a block diagram of an example computing environment including a buffer pool management system for a computing system that uses non-volatile memory as a persistent storage device.
[0017] exist Figure 1 In the embodiment of the present invention, database server computer 100 includes a transaction processing module 140 that responds to requests from applications (not shown) on client computers 150 to process data in a database supported by database server computer 100. Typically, client computers 150 access database server computer 100 through one or more computer networks 160. Computer network 160 can be any computer network that supports interaction between client computers 150 and database server computer 100, such as a local area network or a wide area network, whether private and / or publicly accessible, and computer network 160 can include wired and / or wireless connections. Computer network 160 can be implemented using any of several available network communication protocols, including but not limited to Ethernet and TCP / IP. Database server computers and client computers can communicate using a combination of protocols such as: Figure 6The computer described is implemented.
[0018] Database server computer 100 stores data persistently in a persistent storage device, such as storage device 180 (see also Figure 6 608 and 610 in ) or non-volatile memory 130 used by the system as a persistent storage device in a manner similar to storage device 180. Storage device 180 can be implemented as, for example, a disk-based storage device and a solid-state storage device (SSD). As described below, non-volatile memory 130 has lower latency than conventional disk-based storage devices and SSDs.
[0019] although Figure 1 A database server computer and a transaction processing module for the database are shown, but this configuration is illustrative only.Other applications, such as but not limited to a file system, may execute on a computer system that may use a memory system as described herein.
[0020] The transaction processing module 140 accesses the data of the database through the buffer pool 110. The buffer pool management system 120 allocates one or more logical buffers in the buffer pool 110 to the transaction processing module 140. There may be multiple transaction processing modules 140, in which case the buffer pool management system 120 allocates a separate one or more logical buffers in the buffer pool 110 to each transaction processing module 140.
[0021] The buffer pool 110 is a data structure that defines a collection of logical buffers in which data resides for access by applications such as the transaction processing module 140. A logical buffer is a data structure that has, among other things, a state and a reference to a set of locations in memory. In this memory system, for data that is persistently stored in the non-volatile memory 130, the memory location of the buffer may refer to a local memory 115, typically a dynamic random access memory (DRAM) or a static random access memory (SRAM), or to a non-volatile (NVM) 130 used as a persistent storage device such as for a file system or database system.
[0022] Example technologies for NVM are any storage class memory that is persistent and byte-addressable. A device is byte-addressable if a single addressable unit of data (e.g., a byte) can be accessed without accessing adjacent units of data. Non-volatile memory is a computer storage device whose contents are not lost when power is removed. A memory is considered storage class if it has a large enough capacity to store data persistently in an application such as a file system or database system. For example, 3D-XPoint memory can be used, which is available under the QuantX brand of Micron Technology and the OPTANE brand of Intel. NVDIMM memory modules from Hewlett Packard Enterprises can also be used.
[0023] Other examples of nonvolatile memory include NAND and NOR flash memory, ferroelectric RAM (FeRAM, F-RAM, or FRAM), programmable metallization cell (PMC) memory, conductive bridging RAM (CBRAM), phase change RAM (PRAM or PCM), silicon oxide nitride silicon oxide (SONOS) memory, resistive RAM (RRAM or ReRAM), racetrack or domain wall memory (DWM), carbon nanotube-based RAM (NRAM or Nano-RAM), and spin transfer torque magnetoresistive random access memory (STT-MRAM).
[0024] Local memory is usually volatile memory, which is a computer memory that requires power to maintain the stored information, examples of which are conventional static RAM (SRAM) or dynamic RAM (DRAM). SRAM usually uses six transistors to store some information. SRAM can maintain its state as long as it is powered on, and has simple controls to read and write data given an input address. DRAM usually uses a single transistor and a capacitor to store some information. DRAM requires a regular refresh signal to maintain its state, and the interaction for reading and writing data given an input address is more complicated than SRAM. Other types of volatile memory that can be used as local memory include, but are not limited to, zero capacitor RAM (Z-RAM), capacitor-free two-transistor RAM (TTRAM). In some implementations, local memory can be a form of non-volatile memory.
[0025] As used herein, the latency of a memory or storage device is the amount of time between the time a read request is received on an input and the time the requested data is provided on an output. In the memory systems described herein, the latency of certain forms of non-volatile memory that may be used as persistent storage devices is of the same order of magnitude or a small multiple of the latency of other memory devices that are typically used as local memory in computer systems, such as dynamic random access memory (DRAM) or static random access memory (SRAM). Using such non-volatile memory, it is feasible for an application to access data directly from the non-volatile memory without copying the data to local memory and without significantly affecting performance.
[0026] For example, 3D-XPoint memory can be used as non-volatile memory 130 and is available under the QuantX brand of Micron Technology and the OPTANE brand of Intel. Such non-volatile memory has a latency of about 300 nanoseconds to 500 nanoseconds. The latency of a typical DRAM used as a local memory is about 100 nanoseconds, but the local memory can use a latency between 10 nanoseconds and 100 nanoseconds. The latency of the non-volatile memory can be any small multiple of the latency of the local memory, where the access pattern to the data in the local memory and the non-volatile memory does not substantially affect performance. Typically, a non-volatile memory with a latency less than ten times the latency of the local memory is sufficient. A non-volatile memory with a latency less than or equal to seven times the latency of the local memory will provide better performance on average. A non-volatile memory with a latency less than or equal to five times the latency of the local memory or less than or equal to three times the latency of the local memory is preferred. In some cases, the latency of the non-volatile memory can be about the same as the latency of the local memory, or even lower. As will be described in more detail below, as long as the state of the logical buffer is read-only, its memory location can reference non-volatile memory 130. When the state of the logical buffer allows write access, its memory location references local memory 115. When transitioning between read and write access, the memory system can transfer data between non-volatile memory and local memory, and can update data in data structures for the logical buffer.
[0027] The database server computer may also include a subsystem (not shown) that ensures data atomicity and persistence when writing data, such as a subsystem that implements write-ahead logging when writing data to the database. The buffer pool management system 120 may also include an algorithm for determining whether to release a buffer in the buffer pool for use by other data, commonly referred to as a "page replacement algorithm," such as a least recently used (LRU) replacement algorithm. Both the page replacement algorithm and the write-ahead logging subsystem may remain unchanged through modifications to the buffer pool management system described herein.
[0028] Now go to Figure 2 , an example data structure showing how a buffer pool is represented will now be described.
[0029] Buffer pool 210 is a data structure that defines a collection of logical buffers 240. The buffer pool data structure may use any suitable structure to represent a collection of logical buffers, such as an array. Each logical buffer 240 is represented by a data structure, referred to herein as a buffer descriptor 250. Figure 2 As shown, the buffer descriptor 250 may include data defining a buffer state 252 and a reference 254 to a memory location, such as a pointer. The buffer state may be selected from a set of possible buffer states, including, for example, read-only, ready to be dirty, dirty (which indicates that the data in the buffer has been modified or is new data and has not yet been written to a persistent storage device), or other states. The logical buffer may use a memory location in local memory 215 (such as DRAM) or non-volatile memory (NVM) 230. Therefore, the reference 254 to the memory location may be a reference to a memory location in local memory or non-volatile memory. Although Figure 2 The illustrated buffer descriptor 250 includes one field 254 for the reference, but in some implementations, the buffer descriptor 250 may include two references, one for a reference to local memory and another for a reference to non-volatile memory.
[0030] Now we will use Figure 2 As an illustrative example of how to implement a buffer pool Figures 3 to 5 1 and 12. The following describes how applications such as transaction processing module 140 access data stored in buffer pools and how buffer pool management system 120 operates to manage such buffer pools. The description begins with a quick overview of how a computer manages the interaction between applications and the computer's memory management system.
[0031] An application such as transaction processing module 140 is allocated a series of memory locations in the computer's virtual memory. The computer's memory management system maps the series of memory locations in the virtual memory to buffers in buffer pool 210. The buffer pool management system determines which buffers 240 are available or free and which buffers are used.
[0032] When an application requests access to data that is persistently stored in non-volatile memory, the file system or database server typically instructs the memory management module to perform memory mapping, which means that a range of addresses in the virtual address space of the application is mapped to a range in the data. This correlation allows the application to treat the data as if it were in local memory. The memory management system manages the movement of data in and out of the buffer pool 210 in a manner that is transparent to the application. When an application requests access to data in the series of data, the memory management module transfers the series of data from the non-volatile memory to an available buffer in the buffer pool. If there are no available buffers in the buffer pool, the buffer pool management system will use a replacement algorithm to identify one or more buffers to be released. A variety of replacement algorithms can be used, such as the least recently used (LRU) algorithm, an example of which can be found in "Principles of Database Buffer Management" by Effelsberg, W. et al., "ACM Transactions on Database Systems", Vol. 9, No. 4, December 1984, pp. 560 to 595.
[0033] In this case, when an application creates new data or modifies data it has read, the buffer pool management system cannot release the buffers used by the application storing the new or modified data before the commit record log record of the transaction (a series of actions that must be atomic and persistent) is committed to the persistent storage device. Such buffers are generally referred to as "dirty". Buffers containing data in a file or database to be modified (such as a file that has been opened for write access, but the data has not been modified yet) can be distinguished from buffers with modified data. Such buffers with unmodified data can be called "ready to be dirty". The buffer pool management system can easily release such data and buffers containing read-only data.
[0034] In database systems, some file systems and some other computer systems, additional protocols are used to ensure data atomicity and persistence. For example, database systems generally do not allow the release of "dirty" buffers before committing the commit log records of transactions (a series of actions that must be atomic and persistent) to persistent storage. Some well-known principles that allow recovery in the event of a failure in transaction-oriented systems include atomicity, consistency, isolation and persistence. See Haerder, T. and Reuter, A., "Principles of Transaction-Oriented Database Recovery-ATaxonomy", Vol. 15, No. 4, pp. 287 to 317, "ACM Computing Surveys", December 1983. Such principles are generally embodied in commercial implementations of transactional database systems and other transaction-oriented systems (such as distributed file systems, distributed operating systems, relational database systems, object-oriented database systems, fault-tolerant computer systems, high-availability computer systems, real-time operating systems, object-oriented operating systems, distributed data collection systems, etc.).
[0035] For example, a database server may implement write-ahead logging (WAL). In a WAL-based system, data in a dirty buffer is written back to the same memory location in non-volatile memory from which the data was read. Similarly, a log record representing the changes made to the data must already be in persistent storage before the changed data can replace the previous version of the data in non-volatile storage. In other words, the system is not allowed to write data from a dirty buffer to non-volatile memory until at least the undo portion of the log record describing the data change is written to persistent storage. Implementation details of write-ahead logging can be found in "ARIES: A Transaction Recovery Method Supporting Fine-Granularity Locking and Partial Rollbacks Using Write-Ahead Logging" by Mohan, C. et al., ACM Transactions on Database Systems, Vol. 17, No. 1, March 1992, pp. 94-162.
[0036] Buffer pools and buffer pool management systems (examples of which are incorporated herein by reference) Figures 2 to 5 The shown and described) can be implemented in a way that is transparent to the page replacement algorithm and the write-ahead logging. Since such subsystems usually have reliable implementations in commercial database systems, it is highly desirable to avoid changes to these subsystems.
[0037] Implementations of such a buffer pool and buffer pool management system in which the latency of the non-volatile memory used as a persistent storage device is of the same order of magnitude as the latency of the local memory take advantage of the latency of the non-volatile memory while taking advantage of its persistence. The buffers in the buffer pool can be directly linked to locations in the non-volatile memory. By directly linking to locations in the non-volatile memory, data in these locations can be accessed for read operations without copying the data to the local memory.
[0038] In the context of database operations, when the workload on the database progresses from initialization to steady state, its working set (i.e., the data currently being used) gradually grows at a rate that depends on the computing time and available bandwidth to fill the memory from the persistent storage device. In the acceleration phase between initialization and steady state, data is usually read from non-volatile memory to local memory. Using the buffer pool and buffer pool management system in this article, data that does not need to be modified can be accessed directly from non-volatile memory without being copied to local memory. The local memory remains idle to achieve high throughput on other operations involving writing data. By avoiding copying read-only data to local memory, the acceleration phase can be shortened. Moreover, the capacity of the buffer pool in the local memory seems to be larger for other components in the system. Due to the low latency of non-volatile memory and the elimination of redundant input and output operations to copy data to local memory, transaction throughput is improved.
[0039] In one implementation, the buffer pool management system ensures that in the case where the buffer is linked to a location in non-volatile memory, the buffer is only linked to clean data. When an application requests write access to data, the buffer pool management system copies the data to a buffer in local memory and the buffer data structure is updated to reference the memory location in local memory. The buffer pool management system can write the buffer in local memory with dirty data back to non-volatile memory. After the buffer pool management system writes the dirty data to non-volatile memory, the buffer data structure can be updated to reference the location in non-volatile memory and indicate that the data is clean. The buffer pool management system can mark the memory location in local memory as released.
[0040] During a "lazy" write operation, either due to the operation of the replacement algorithm or for other reasons, writing data back to non-volatile storage may occur as part of a checkpoint. A checkpoint involves writing back to persistent storage all dirty pages that were modified before a given time. A "lazy" write typically occurs when data is no longer part of the working set, based on a usage history that is tracked for each buffer.
[0041] Several operations may be implemented within the buffer pool management system to support these various uses of non-volatile memory.
[0042] Now citing Figure 3 , when an application requests access to a range of data that is not in the buffer pool, the buffer pool management system allocates 300 a buffer, for example by creating a buffer descriptor 250. The buffer pool management system sets 302 a memory location, such as a pointer, in the allocated buffer (e.g., 254) to point to the memory location of the data in the non-volatile memory. The allocated buffer is added 304 to the buffer pool data structure (e.g., 210). The buffer state (e.g., 252) may be set to "clean" or "read-only". The buffer is returned to the application.
[0043] Now go to Figure 4 , if the application is to modify data in a buffer that references a location in non-volatile memory, as shown at 400, the data is retrieved from the non-volatile memory into the local memory. The buffer pool management system requests the memory manager to allocate 402 a buffer, i.e., a set of memory locations, in the local memory. The buffer pool management system then updates 404 the memory location (e.g., 254) stored in the buffer data structure 250 to reference the buffer allocated in the local memory. The buffer pool management system then causes the data to be read 406 from the non-volatile memory to the buffer allocated in the local memory, and may change 408 the state (e.g., 252) to indicate that the data is ready to be modified (e.g., "ready to be dirty"). If the data in the buffer that references the local memory is modified, the buffer pool management system may change the state (e.g., 252) of the buffer to "dirty".
[0044] Now go to Figure 5 , if the data is never modified and the memory location in local memory is to be freed, the buffer pool management system may modify 500 the buffer data structure (e.g., 254) to reference the memory location of the data in non-volatile memory. The buffer pool management system may instruct the memory manager to free 502 the location in local memory. The state of the buffer data structure (e.g., 252) may be set 504 to "clean". When the data in the buffer is "dirty" and is written back to non-volatile memory, Figure 5 The same steps in can also be implemented as part of a write operation.
[0045] The foregoing operations implement the primary transition of each buffer from referencing non-volatile memory to referencing local memory and then back to non-volatile memory. Any operation attempting to write data to a buffer that references non-volatile memory will call Figure 4to move data into local memory and cause the buffer to reference local memory. Any operation that can free a memory location in a local memory reference through the buffer will produce clean data in non-volatile memory and call Figure 5 These operations can be performed transparently to any write-ahead logging or page replacement algorithm.
[0046] Given the possibility that a buffer may be referencing clean data in non-volatile memory, various other operations can be optimized. For example, a buffer does not have to be released from the buffer pool if it references non-volatile memory. Checkpointing and input / output prediction can eliminate penalties based on disk access time.
[0047] By allowing the buffers in the buffer pool to reference a memory location in a local memory or a non-volatile memory used as a persistent storage device, wherein the local memory and the non-volatile memory have access delays of the same order of magnitude or a smaller multiple of each other, and by operating to manage the transition between these states, several advantages can be obtained. For read-only data, data can be avoided from being copied to the local memory, which can improve the acceleration time in the database system, increase cache capacity and improve the performance of write operations. By avoiding memory copies and reducing over-provisioning, power consumption can be reduced. The local memory remains idle to achieve high throughput on other operations involving write data. For other components in the system, the capacity of the buffer pool in the local memory seems larger. Due to the low latency of non-volatile memory and the elimination of redundant input and output operations to copy data to local memory, transaction throughput is improved. These and other advantages can be obtained while minimizing changes (if any) to the computer program (especially subsystem) (such as pre-write logging and page replacement algorithms) that implements the database server.
[0048] Now that the example implementation has been described, Figure 6 An example of a computer is shown, with which the components of the computer system described above can be implemented. This is only an example of a computer and is not intended to impose any limitation on the scope of use or function of such a computer.
[0049] The computer can be any of a variety of general or special computing hardware configurations. Some examples of the types of computers that can be used include, but are not limited to, personal computers, game consoles, set-top boxes, handheld or portable devices (e.g., media players, notebook computers, tablet computers, cellular phones (including but not limited to "smart" phones), personal data assistants, recorders), server computers, multiprocessor systems, microprocessor-based systems, programmable consumer electronics, networked personal computers, minicomputers, mainframe computers, and distributed computing environments that include the above types of computers or devices, etc.
[0050] refer to Figure 6 , the computer 600 includes a processing system including at least one processing unit 602 and at least one memory 604. The processing unit 602 may include multiple processing devices; the memory 604 may include multiple memory devices. The processing unit 602 includes a processor, which is a logic circuit system that responds to and processes instructions to provide the functions of the computer. A processing device may include one or more processing cores (not shown), which are multiple processors that can operate independently of each other in the same logic circuit system. Typically, one of the processing units in the computer is designated as the main processor, commonly referred to as a central processing unit (CPU). There may also be one or more additional synergistic processing units in the computer, such as a graphics processing unit (GPU) 620. The synergistic processing unit includes a processor that performs operations that can supplement the central processing unit, such as but not limited to graphics operations and signal processing operations.
[0051] Memory 604 may include volatile computer storage devices (such as dynamic random access memory (DRAM) or other random access memory devices) and non-volatile computer storage devices (such as read-only memory, flash memory, etc.), or some combination of the two. Other computer storage devices (such as special purpose memory or registers) may also be present in one or more processors. Computer 600 may include additional computer storage devices (removable or non-removable) such as, but not limited to, magnetic or optical recording disks or tapes. Such additional computer storage devices may be stored in a variety of formats. Figure 1 6 is shown by a removable storage device 608 and a non-removable storage device 610. Such computer storage devices 608 and 610 are typically non-volatile storage devices. Figure 6 The various components in are typically interconnected by an interconnection mechanism such as one or more buses 630 .
[0052] A computer storage device is any device in which a computer can store data in and retrieve data from an addressable physical storage location by changing the state of the device at the addressable physical storage location. Thus, a computer storage device can be a volatile or non-volatile memory, or a removable or non-removable storage device. Memory 604, removable storage 608, and non-removable storage 610 are all examples of computer storage devices. Some examples of computer storage devices are RAM, ROM, EEPROM, flash memory or other storage technology, CD-ROM, digital versatile disk (DVD) or other optical or magneto-optical recording storage devices, cassettes, magnetic tape, disk storage or other magnetic storage devices. Computer storage devices and communication media are different categories, and both are different from signals propagated through communication media.
[0053] The computer 600 may also include communication connection(s) 612 that allow the computer to communicate with other devices via a communication medium. Communication media typically transmit computer program instructions, data structures, program modules, or other data over wired or wireless material by propagating a modulated data signal such as a carrier wave over the material or other transport mechanism. The term "modulated data signal" refers to a signal that has one or more of its characteristics set or changed in a manner that can encode information in the signal. By way of example and not limitation, communication media include wired media (such as metal or other conductive wires that propagate electrical signals or optical fibers that propagate light signals) and wireless media (such as any non-wired communication medium that allows propagation of signals such as acoustic, electromagnetic, electrical, optical, infrared, radio frequency, and other signals).
[0054] The communication connection 612 is a device such as a wired network interface, a wireless network interface, a radio frequency transceiver (e.g., Wi-Fi 670, cellular 674, Long Term Evolution (LTE) or Bluetooth 672, etc.), a transceiver, a navigation transceiver (e.g., Global Positioning System (GPS) or Global Navigation Satellite System (GLONASS), etc.), a transceiver, and a network interface device 676 (e.g., Ethernet, etc.) or other device that interfaces with the communication medium to transmit data through the communication medium and receive data from signals propagated through the communication medium.
[0055] The computer 600 may have various input devices 614, such as a pointer device, a keyboard, a touch-based input device, a pen, a camera, a microphone, sensors (such as an accelerometer, a thermometer, a light sensor, etc.), etc. The computer 600 may have various output devices 616, such as a display, a speaker, etc. Such devices are well known in the art and need not be discussed in detail here. The various input and output devices may implement a natural user interface (NUI), which is any interface technology that enables a user to interact with a device in a "natural" manner without artificial constraints imposed by input devices such as a mouse, keyboard, remote control, etc.
[0056] Examples of NUI approaches include approaches that rely on voice recognition, touch and stylus recognition, gesture recognition on and adjacent to the screen, mid-air gestures, head and eye tracking, sound and voice, vision, touch, gestures, and machine intelligence, and may include the use of touch-sensitive displays, voice and speech recognition, intent and goal understanding, motion gesture detection using depth cameras (such as stereo camera systems, infrared camera systems, and other camera systems and combinations thereof), motion gesture detection using accelerometers or gyroscopes, facial recognition, three-dimensional displays, head, eye, and gaze tracking, immersive augmented reality and virtual reality systems (all of which provide more natural interfaces), and techniques for sensing brain activity using electric field sensing electrodes (EEG and related approaches).
[0057] The various computer storage devices 608 and 610, communications connection 612, output device 616, and input device 614 may be integrated with the rest of the computer within the housing, or may be connected via various input / output interface devices on the computer, in which case the reference numerals 608, 610, 612, 614, and 616 may indicate both interfaces for connecting to the devices and the devices themselves.
[0058] A computer typically includes an operating system, which is a computer program that, when executed, manages access to the various resources of the computer by other applications running on the computer. There may be multiple applications. The various resources include memory, storage, input devices, and output devices, such as Figure 6The display device and input device shown. In order to manage access to data stored in non-volatile computer storage devices, the computer usually also includes a file system, which maintains data files or a database system that maintains data structures in a persistent storage device. A file is a named logical structure defined and implemented by a file system, which is used to map a logical record sequence of names and data to an addressable physical location on a computer storage device. Therefore, the file system hides the physical location of the data from applications running on the computer, so that the application can use the file name and the commands defined by the file system to access the data in the file. The file system usually provides at least basic file operations, such as creating a file, opening a file, writing a file or its attributes, reading a file or its attributes, and closing a file.
[0059] Combination Figure 1 to Figure 1 0 and the various modules, tools or applications, data structures and flow charts and graphical user interfaces described herein, and Figure 6 Any operating system, file system, database system, and application on the computers in the system can be implemented using one or more processing units of one or more computers and one or more computer programs processed by the one or more processing units.
[0060] A computer program includes computer-executable instructions and / or computer-interpreted instructions, such as program modules, which are processed by one or more processing units in a computer. Typically, such instructions define routines, programs, objects, components, data structures, etc. that, when processed by a processing unit, instruct a computer or configure a computer to perform operations on data or configure a computer to implement various components, modules, or data structures.
[0061] Alternatively or additionally, the functionality of one or more of the various components described herein may be at least partially performed by one or more hardware logic components. For example, and not limitation, illustrative types of hardware logic components that may be used include field programmable gate arrays (FPGAs), program-specific integrated circuits (ASICs), program-specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0062] Thus, in one aspect, a computer system includes a local memory and a non-volatile memory for persistent storage of data. The local memory has a first latency and the non-volatile memory has a second latency. A buffer pool management system stores a buffer pool data structure defining a set of buffers. The buffers are defined by the buffer data structure. The buffer data structure includes data indicating a state of the buffer and data indicating a memory location where data for the buffer is stored. In a first state, the buffer references a memory location in the local memory. In a second state, the buffer references a memory location in the non-volatile memory. In the second state, an application executing on the computer system accesses data of the buffer from the non-volatile memory without copying the data to the local memory.
[0063] In another aspect, a computer-implemented process is performed by a computer that includes a local memory and a non-volatile memory for persistent storage of data, wherein the local memory has a first latency and the non-volatile memory has a second latency. The process includes storing a buffer pool data structure that defines a set of buffers, each buffer being defined by a buffer data structure, wherein the buffer data structure includes data indicating a state of the buffer and data indicating a memory location where data for the buffer is stored. In the first state, the buffer references a memory location in the local memory, and in the second state, the buffer references a memory location in the non-volatile memory. The process includes: in response to an application requesting access to data from the buffer in the second state, accessing the data for the buffer from the non-volatile memory without copying the data to the local memory.
[0064] In another aspect, a computer includes a local memory and a non-volatile memory for persistently storing data. The local memory has a first latency and the non-volatile memory has a second latency. The computer includes means for storing a data structure defining a set of buffers, including data indicating a state of each buffer and data indicating a memory location where data for each buffer is stored. In a first state, the buffer references a memory location in the local memory. In a second state, the buffer references a memory location in the non-volatile memory. In the second state, an application executing on the computer system accesses the data of the buffer from the non-volatile memory without copying the data to the local memory.
[0065] In any of the foregoing aspects, the first delay and the second delay are such that when data is read directly from the non-volatile memory without reading the data into a buffer in the local memory, the access pattern to the data in the local memory and the data in the non-volatile memory does not substantially affect performance. For example, the first delay and the second delay can be of the same order of magnitude. In some implementations, the second delay can be less than or equal to ten times the first delay. In some implementations, the second delay can be less than or equal to five times the first delay. In some implementations, the second delay can be less than or equal to three times the first delay.
[0066] In any of the foregoing aspects, to release a memory location in the local memory referenced by the buffer, the buffer pool management system may write data to the memory location in the non-volatile memory and may change the buffer to a second state and reference the memory location of the data in the non-volatile memory. In such an implementation, when the application is ready to modify the data for the buffer and the buffer is in the second state, the buffer pool management system may copy the data of the buffer from the memory location in the non-volatile memory to the memory location in the local memory, may change the buffer to the first state, and may change the buffer to reference the location in the local memory.
[0067] In any of the foregoing aspects, operations of the buffer pool management system can be transparent to write-ahead logging operations performed by the computer system.
[0068] In any of the foregoing aspects, the operation of the buffer pool management system can be transparent to the operation of a page replacement algorithm executed by the computer system.
[0069] In any of the preceding aspects, the application may be a database system.
[0070] In any of the preceding aspects, the application may be a distributed file system.
[0071] In another aspect, an article of manufacture includes at least one computer storage device and computer program instructions stored on at least one computer storage device. The computer program instructions, when processed by a processing system of a computer (the processing system includes one or more processing units and a memory), configure the computer as described in any of the preceding aspects and / or perform the process as described in any of the preceding aspects.
[0072] Any of the foregoing aspects may be embodied as a computer system, any individual component of such a computer system, a process performed by such a computer system or any individual component of such a computer system, or an article of manufacture comprising a computer storage device in which computer program instructions are stored and which, when processed by one or more computers, configure the one or more computers to provide such a computer system or any individual component of such a computer system.
[0073] The subject matter defined in the following claims is not necessarily limited to the specific implementations described above.The specific implementations described above are disclosed by way of example only.
Claims
1. A computer system comprising: processing system, including processing equipment and computer storage devices, The computer storage device includes a local memory and a non-volatile memory for persistent storage of data, wherein the local memory has a first latency and the non-volatile memory has a second latency; wherein the computer storage device stores computer program instructions which, when executed by the processing system, configure the computer system to include: a buffer pool management system storing a buffer pool data structure defining a set of buffers, each buffer being defined by a buffer data structure, wherein the buffer data structure includes an indicated buffer state of the buffer and data indicating a memory location storing data for the buffer, wherein in a first state indicated for a buffer state allowing write access, the buffer references a memory location in a local memory, and in a second state indicated for a buffer state being read-only, the buffer references a memory location in the non-volatile memory; wherein in the second state, an application executing on the computer system accesses data for the buffer from the non-volatile memory without copying the data to the local memory; and The buffer pool management system is configured to change the buffer state between the first state and the second state.
2. A computer system according to claim 1, wherein in order to release the memory location in the local memory referenced by the buffer, the buffer pool management system writes the data to the memory location in the non-volatile memory, and changes the buffer state to the second state, and references the memory location of the data in the non-volatile memory.
3. The computer system of claim 2 , wherein when the application is ready to modify data for a buffer and the buffer state is the second state, the buffer pool management system copies the data for the buffer from the memory location in the non-volatile memory to a memory location in the local memory, changes the buffer state to the first state, and changes the buffer to reference the location in the local memory.
4. The computer system of claim 1 , wherein when the application is ready to modify data for a buffer and the buffer state is the second state, the buffer pool management system copies the data for the buffer from the memory location in the non-volatile memory to a memory location in the local memory, changes the buffer state to the first state, and changes the buffer to reference the location in the local memory.
5. The computer system of claim 1, wherein operation of the buffer pool management system is transparent to write-ahead logging operations performed by the computer system.
6. The computer system of claim 1, wherein the first delay and the second delay are in the same order of magnitude.
7. The computer system of claim 1 , wherein the first delay and the second delay are such that when data is read directly from the nonvolatile memory without reading the data into a buffer in the local memory, an access pattern to data in the local memory and data in the nonvolatile memory does not substantially affect performance.
8. A computer implemented process performed by a computer comprising a processing system having a processing device and computer storage, the computer storage comprising a local memory and a non-volatile memory for persistent storage of data, wherein the local memory has a first latency and the non-volatile memory has a second latency, wherein the computer storage stores computer program instructions that when executed by the processing system configure the computer system to perform a process comprising: storing a buffer pool data structure defining a set of buffers, each buffer being defined by a buffer data structure, wherein the buffer data structure includes an indicated buffer state of the buffer and data indicating a memory location storing data for the buffer, wherein in a first state indicated for a buffer state allowing write access, the buffer references a memory location in a local memory, and in a second state indicated for a buffer state being read-only, the buffer references a memory location in the non-volatile memory; as well as In response to an application requesting access to data from a buffer in the second state, accessing data for the buffer from the nonvolatile memory without copying the data to the local memory; as well as In response to an application requesting a change in the indicated buffer state of a buffer, the buffer state of the buffer is changed between the first state and the second state.
9. A computer-implemented process according to claim 8, wherein in order to release the memory location in the local memory referenced by the buffer, the buffer pool management system writes the data to the memory location in the non-volatile memory and changes the buffer state to the second state and references the data to the memory location in the non-volatile memory.
10. The computer-implemented process of claim 9, wherein when the application is ready to modify data for a buffer and the buffer state is the second state, the buffer pool management system copies the data for the buffer from the memory location in the non-volatile memory to a memory location in the local memory, changes the buffer state to the first state, and changes the buffer to reference the location in the local memory.
11. The computer-implemented process of claim 8, wherein when the application is ready to modify data for a buffer and the buffer state is the second state, the buffer pool management system copies the data for the buffer from the memory location in the non-volatile memory to a memory location in the local memory, changes the buffer state to the first state, and changes the buffer to reference the location in the local memory.
12. The computer implemented process of claim 9, wherein operation of the buffer pool management system is transparent to write-ahead logging operations performed by the computer system.
13. The computer-implemented process of claim 9, wherein the first delay and the second delay are on the same order of magnitude.
14. The computer-implemented process of claim 9, wherein the second delay is less than or equal to ten times the first delay.
15. An article for storage, comprising a computer storage device having computer program instructions stored thereon, a computer comprising a local memory and a computer storage device, the computer storage device comprising a local memory and a non-volatile memory for persistent storage of data, wherein the local memory has a first latency and the non-volatile memory has a second latency, wherein the computer program instructions, when processed by the computer, configure the computer to include: a buffer pool management system storing a buffer pool data structure defining a set of buffers, each buffer being defined by a buffer data structure, wherein the buffer data structure includes an indicated buffer state of the buffer and data indicating a memory location storing data for the buffer, wherein in a first state indicated for a buffer state allowing write access, the buffer references a memory location in a local memory, and in a second state indicated for a buffer state being read-only, the buffer references a memory location in the non-volatile memory; wherein in the second state, an application executing on the computer system accesses data for the buffer from the non-volatile memory without copying the data to the local memory; and The buffer pool management system is configured to change the buffer state between the first state and the second state.
16. The article of claim 15, wherein, in order to release a memory location in the local memory referenced by a buffer, the buffer pool management system writes the data to a memory location in the non-volatile memory and changes the buffer state to the second state and references the data to the memory location in the non-volatile memory.
17. The article of manufacture of claim 16, wherein when the application is ready to modify data for a buffer and the buffer state is the second state, the buffer pool management system copies the data for the buffer from the memory location in the non-volatile memory to a memory location in the local memory, changes the buffer state to the first state, and changes the buffer to reference the location in the local memory.
18. The article of manufacture of claim 15, wherein when the application is ready to modify data for a buffer and the buffer state is the second state, the buffer pool management system copies the data for the buffer from the memory location in the non-volatile memory to a memory location in the local memory, changes the buffer state to the first state, and changes the buffer to reference the location in the local memory.
19. The article of claim 15, wherein operation of the buffer pool management system is transparent to write-ahead logging operations performed by the computer system.
20. The article of claim 15, wherein the first time delay and the second time delay are on the same order of magnitude.
Citation Information
Patent Citations
Virtual retry queue
CN105612503A
Hybrid lpddr4-dram with cached NVM and flash-NAND in multi-chip packages for mobile devices
US20180005670A1