storage pages in a data storage application can be designated as having one of a used status, a free status, and a shadow status. The storage pages having the shadow status remain in use but available for conversion to the free status after completion of a savepoint. The storage pages designated to the shadow status can be assigned among at least a first group and a second group. A first savepoint can be invoked during which the storage pages designated to the shadow status and assigned to the first group are converted to the free status, and a second savepoint can be invoked during which the storage pages designated to the shadow status and assigned to the second group are converted to the free status. In this manner, locking of the system during a savepoint is not required. Related methods, systems, and articles of manufacture are also disclosed.

Patent
   8615639
Priority
Mar 25 2011
Filed
Mar 25 2011
Issued
Dec 24 2013
Expiry
Mar 09 2032
Extension
350 days
Assg.orig
Entity
Large
5
2
currently ok
13. A computer-implemented method comprising:
designating storage pages in a data storage application as having one of a used status, a free status, and a shadow status, the storage pages having the shadow status remaining in use but available for conversion to the free status after completion of a savepoint;
assigning the storage pages designated to the shadow status among at least a first group and a second group;
invoking a first savepoint during which the storage pages designated to the shadow status and assigned to the first group are converted to the free status; and
invoking a second savepoint during which the storage pages designated to the shadow status and assigned to the second group are converted to the free status;
wherein a complete lock is not required during a synchronization process because only a subset of the shadow pages are written at each savepoint.
1. A non-transitory computer program product storing instructions that, when executed by at least one programmable processor, cause the at least one programmable processor to perform operations comprising:
designating storage pages in a data storage application as having one of a used status, a free status, and a shadow status, the storage pages having the shadow status remaining in use but available for conversion to the free status after completion of a savepoint;
assigning the storage pages designated to the shadow status among at least a first group and a second group;
invoking a first savepoint during which the storage pages designated to the shadow status and assigned to the first group are converted to the free status; and
invoking a second savepoint during which the storage pages designated to the shadow status and assigned to the second group are converted to the free status;
wherein a complete lock is not required during a synchronization process because only a subset of the shadow pages are written at each savepoint.
7. A system comprising:
at least one programmable processor; and
a machine-readable medium storing instructions that, when executed by the at least one programmable processor, cause the at least one programmable processor to perform operations comprising:
designating storage pages in a data storage application as having one of a used status, a free status, and a shadow status, the storage pages having the shadow status remaining in use but available for conversion to the free status after completion of a savepoint;
assigning the storage pages designated to the shadow status among at least a first group and a second group;
invoking a first savepoint during which the storage pages designated to the shadow status and assigned to the first group are converted to the free status; and
invoking a second savepoint during which the storage pages designated to the shadow status and assigned to the second group are converted to the free status;
wherein a complete lock is not required during a synchronization process because only a subset of the shadow pages are written at each savepoint.
2. A computer program product as in claim 1, wherein the data storage application comprises at least one of a database application and a network-attached storage system.
3. A computer program product as in claim 1, wherein the storage pages designated to the shadow status are assigned to either of the first group and the second group, the first group being assigned to the first savepoint, which has an odd numbered label, and the second group being assigned to the second savepoint, which has an even numbered label.
4. A computer program product as in claim 1, wherein, while the first savepoint is being invoked, a new page to be designated to the shadow state is assigned to the second group.
5. A computer program product as in claim 1, wherein a new page can be designated to the shadow state during the invoking of either of the first savepoint and the second savepoint.
6. A computer program product as in claim 1, wherein the storage pages are retained on a storage medium accessible to the data storage application and the designating of the used status, the free status, and the shadow status is performed by a block status management module in a persistence layer of the data storage application.
8. A system as in claim 7, wherein the data storage application comprises at least one of a database application and a network-attached storage system.
9. A system as in claim 7, wherein the storage pages designated to the shadow status are assigned to either of the first group and the second group, the first group being assigned to the first savepoint, which has an odd numbered label, and the second group being assigned to the second savepoint, which has an even numbered label.
10. A system as in claim 7, wherein, while the first savepoint is being invoked, a new page to be designated to the shadow state is assigned to the second group.
11. A system as in claim 7, wherein a new page can be designated to the shadow state during the invoking of either of the first savepoint and the second savepoint.
12. A system as in claim 7, wherein the storage pages are retained on a storage medium accessible to the data storage application and the designating of the used status, the free status, and the shadow status is performed by a block status management module in a persistence layer of the data storage application.
14. A computer-implemented method as in claim 13, wherein the data storage application comprises at least one of a database application and a network-attached storage system.
15. A computer-implemented method as in claim 13, wherein the storage pages designated to the shadow status are assigned to either of the first group and the second group, the first group being assigned to the first savepoint, which has an odd numbered label, and the second group being assigned to the second savepoint, which has an even numbered label.
16. A computer-implemented method as in claim 13, wherein, while the first savepoint is being invoked, a new page to be designated to the shadow state is assigned to the second group.
17. A computer-implemented method as in claim 13, wherein a new page can be designated to the shadow state during the invoking of either of the first savepoint and the second savepoint.
18. A computer-implemented method as in claim 13, wherein the storage pages are retained on a storage medium accessible to the data storage application and the designating of the used status, the free status, and the shadow status is performed by a block status management module in a persistence layer of the data storage application.
19. A computer-implemented method as in claim 13, wherein at least one of the designating, the assigning, the invoking of the first savepoint, and the invoking of the second savepoint is performed by at least one programmable processor.

The subject matter described herein relates to optimizing performance in data storage applications (e.g. a database) and other computing environments in which data are written and/or read from a storage medium or storage device.

Storage pages can be used in association with a data storage application that writes and/or reads data from a persistency layer that can include active data stored in fast but relatively expensive memory that is in turn written to a less expensive storage for longer term retention. The persistence layer can ensure that changes made within the data storage application are durable and that the data storage application can be restored to a most recent committed state after a restart. A committed state is achieved by writing the changes made to data in the persistence layer to the longer term storage. Data are stored in the longer term storage are organized in storage pages, a term that refers to a unit of physical storage.

A shadow paging technique can be used in conjunction with data storage applications to avoid overwriting an existing version of a page with changes until the changes are ready to be committed to longer term storage. For example, shadow paging can be used to undo changes that were written to the longer term storage since a most recent savepoint. A shadow page can be allocated to retain the original state of a logical page when the logical page is to be modified. A storage page retained in the longer term storage at a most recent savepoint are not overwritten until a subsequent savepoint is successfully completed. Instead, new physical pages are used to store changed logical pages. Therefore, until the subsequent savepoint is written to longer term storage, two physical pages may exist for one logical page: a shadow page containing the version written during the most recent savepoint, and a current physical page reflecting changes written to longer term storage since the most recent savepoint.

In one aspect, a method includes designating storage pages in a data storage application as having one of a used status, a free status, and a shadow status. The storage pages with the shadow status remain in use but available for conversion to the free status after completion of a savepoint. The storage pages designated to the shadow status are assigned among at least a first group and a second group. A first savepoint is invoked during which the storage pages designated to the shadow status and assigned to the first group are converted to the free status. A second savepoint is later invoked during which the storage pages designated to the shadow status and assigned to the second group are converted to the free status.

In some variations one or more of the following features can optionally be included in any feasible combination. The data storage application can include at least one of a database application and a network-attached storage system. The storage pages designated to the shadow status can be assigned to either of the first group and the second group. The first group can be assigned to the first savepoint, which has an odd numbered label, and the second group can be assigned to the second savepoint, which has an even numbered label. While the first savepoint is being invoked, a new page to be designated to the shadow state is assigned to the second group. A new page can be designated to the shadow state during the invoking of either of the first savepoint and the second savepoint, for example by being assigned to the group whose savepoint is not currently being invoked. The storage pages can be retained on a storage medium accessible to the data storage application. The designating of the used status, the free status, and the shadow status can be performed by a block status management module in a persistence layer of the data storage application.

Articles are also described that comprise a tangibly embodied machine-readable medium operable to cause one or more machines (e.g., computers, etc.) to result in operations described herein. Similarly, computer systems are also described that may include a processor and a memory coupled to the processor. The memory may include one or more programs that cause the processor to perform one or more of the operations described herein.

The details of one or more variations of the subject matter described herein are set forth in the accompanying drawings and the description below. Other features and advantages of the subject matter described herein will be apparent from the description and drawings, and from the claims. For example, while the specific examples described below to illustrate features of the current subject matter make reference to the data storage application being a database, other types of data storage applications are within the scope of the current subject matter.

The accompanying drawings, which are incorporated in and constitute a part of this specification, show certain aspects of the subject matter disclosed herein and, together with the description, help explain some of the principles associated with the disclosed implementations. In the drawings,

FIG. 1 is a box diagram illustrating aspects of a system at least some of whose features are consistent with implementations of the current subject matter;

FIG. 2 is a process flow diagram illustrating features of a method consistent with implementations of the current subject matter;

FIG. 3 is a diagram illustrating features of a system architecture at least some of whose features are consistent with implementations of the current subject matter; and

FIG. 4 is a logic flow diagram illustrating features consistent with one or more implementations of the current subject matter.

When practical, similar reference numbers denote similar structures, features, or elements.

FIG. 1 shows an example of a system 100 in which a computing system 102, which can include one or more programmable processors that can be collocated, linked over one or more networks, etc., executes one or more modules, software components, or the like of a data storage application 104. The data storage application 104 can include one or more of a database, an enterprise resource program, a distributed storage system (e.g. NetApp Filer available from NetApp of Sunnyvale, Calif.), or the like.

The one or more modules, software components, or the like can be accessible to local users of the computing system 102 as well as to remote users accessing the computing system 102 from one or more client machines 106 over a network connection 110. One or more user interface screens produced by the one or more first modules can be displayed to a user, either via a local display or via a display associated with one of the client machines 106. Data units of the data storage application 104 can be transiently stored in a persistence layer 112 (e.g. a page buffer or other type of temporary persistency layer), which can write the data, in the form of storage pages, to one or more storages 114, for example via an input/output component 116. The one or more storages 114 can include one or more physical storage media or devices (e.g. hard disk drives, persistent flash memory, random access memory, optical media, magnetic media, and the like) configured for writing data for longer term storage. It should be noted that the storage 114 and the input/output component 116 can be included in the computing system 102 despite their being shown as external to the computing system 102 in FIG. 1.

Data retained at the longer term storage 114 can be organized in pages, each of which has allocated to it a defined amount of storage space. In some implementations, the amount of storage space allocated to each page can be constant and fixed. For simplicity, features of the current subject matter are described with reference to such an approach. However, other implementations in which the amount of storage space allocated to each page can vary are also within the scope of the current subject matter. A data storage application 104 tracks which blocks of data storage in the storage 114 are “used” (i.e. have a page or part of a page stored therein) and which are currently unused or “free.” The tracking can in some implementations include an array of state values or some other transient representation of free and used blocks in the storage 114. In a shadow paging approach, a third status, which is technically a subset of the “used” status, can be “shadow.” A page with a shadow status is is still in use but can be freed after completion of a next savepoint. A typical block allocation manager or other component tasked with maintaining assignment status information of memory blocks in the storage 114 may perform operations including allocating a block having a free status to “used” when the block is required to contain a logical page or part thereof, releasing a block that has previously been used to a “free” status once it is no longer needed, assigning a block as a shadow block, and releasing a block previously set as a shadow block back to a “free” status.

While the process of releasing shadow pages to the free status is occurring, a system may enter a temporary lock state during which no other pages can be re-designated as having shadow status. A lock state can be entered to synchronize the designating of pages with the shadow status and the freeing of pages previously designated as having shadow status. The lock can be necessary because, if a page is newly designated as having the shadow state during the finite period of time during which a savepoint operation is executed, that newly designated shadow page would be immediately freed along with the other shadow pages. However, entering a lock state by a data storage application 104 generally reduces concurrency and thus increases runtime processing, which can be undesirable.

To address these and potentially other issues with currently available solutions, one or more implementations of the current subject matter provide methods, systems, articles or manufacture, and the like that can, among other possible advantages, allow a temporal staggering of savepoint operations that affect specific shadow pages. Shadow pages can be assigned to one of a set of alternating savepoints in two or more groups such that shadow pages assigned to the first group are processed during a first savepoint, shadow pages assigned to the second group are processed during a second savepoint, and so forth. In this manner, because only a subset of the shadow pages are written at each savepoint, a complete lock of the system during the synchronization process is not required. Creation, modification, etc. of shadow pages can remain enabled during the processing of the first group of shadow pages as changes can be added to the non-locked group of shadow pages for processing with a later savepoint.

Implementations of the current subject matter can include features providing one or both of these advantages. For example, the process flow chart 200 of FIG. 2 shows a method having at least some features consistent with an implementation of the current subject matter. At 202, storage pages in a data storage application are designated as having one of a used status, a free status, and a shadow status. As noted, the storage pages having the shadow status remain in use but available for conversion to the free status after completion of a savepoint. At 204, the storage pages designated to the shadow status are assigned among at least a first group and a second group. A first savepoint is invoked at 206 during which the storage pages designated to the shadow status and assigned to the first group are converted to the free status. Subsequently, a second savepoint is invoked at 210 during which the storage pages designated to the shadow status and assigned to the second group are converted to the free status.

In one example, the first group and the second group can be assigned as either an even or an odd shadow page. The savepoints can be numbered sequentially with increasing integer number labels. When a savepoint having an odd number label is invoked, the odd-labeled shadow pages can be converted to the free status. Then, when the next savepoint, which has an even number label, is invoked, the even-labeled shadow pages can be converted to the free status. While a savepoint is in progress, storage pages to be newly designated as shadow pages are assigned only to a group whose savepoint is not currently in progress. Other numbers of savepoint groups are also within the scope of the current subject matter, and the labeling of shadow page groups and savepoints corresponding to these groups need not be performed only using the even-odd example discussed herein. For example, shadow pages can be assigned to one of two or more groups, and savepoints corresponding to each other shadow pages groups can be invoked in an alternating or other pattern such that each shadow page group in eventually processed to be converted to the free status.

FIG. 3 shows a software architecture 300 consistent with one or more features of the current subject matter. A data storage application 104, which can be implemented in one or more of hardware and software, can include one or more of a database application, a network-attached storage system, or the like. According to at least some implementations of the current subject matter, such a data storage application 104 can include or otherwise interface with a persistence layer 112 or other type of memory buffer, for example via a persistence interface 302. A page buffer 304 within the persistence layer 112 can store one or more logical pages 306, optionally can include shadow pages, active pages, and the like. The logical pages 306 retained in the persistence layer 112 can be written to a storage (e.g. a longer term storage) 114 via an input/output component 116, which can be a software module, a sub-system implemented in one or more of software and hardware, or the like. The storage 114 can include one or more data volumes 310 where stored pages 312 are allocated at physical memory blocks.

In some implementations, the data storage application 104 can include or be otherwise in communication with a page manager 314 and/or a savepoint manager 316. The page manager 314 can communicate with a page management module 320 at the persistence layer 112 that can include a free block manager 322 that monitors page status information 324, for example the status of physical pages within the storage 114 and logical pages in the persistence layer 112 (and optionally in the page buffer 304). The savepoint manager 316 can communicate with a savepoint coordinator 326 at the persistence layer 204 to handle savepoints, which are used to create a consistent persistent state of the database for restart after a possible crash.

In some implementations of a data storage application 104, the page management module of the persistence layer 112 can implement a shadow paging approach as discussed above. The free block manager 322 within the page management module 320 can maintain the status of physical pages and can assign the processes of converting storage page statuses between free, used, and shadow in accordance with implementations described herein. The page buffer 304 can included a fixed page status buffer that operates as discussed herein. A converter component 340, which can be part of or in communication with the page management module 320, can be responsible for mapping between logical and physical pages written to the storage 114. The converter 340 can maintain the current mapping of logical pages to the corresponding physical pages in a converter table 342. The converter 340 can maintain a current mapping of logical pages 306 to the corresponding physical pages in one or more converter tables 342. When a logical page 306 is read from storage 114, the storage page to be loaded can be looked up from the one or more converter tables 342 using the converter 340. When a logical page is written to storage 114 the first time after a savepoint, a new free physical page is assigned to the logical page. The free block manager 322 marks the new physical page as “used” and the new mapping is stored in the one or more converter tables 342.

The persistence layer 112 can ensure that changes made in the data storage application 104 are durable and that the data storage application 104 can be restored to a most recent committed state after a restart. Writing data to the storage 114 need not be synchronized with the end of the writing transaction. As such, uncommitted changes can be written to disk and committed changes may not yet be written to disk when a writing transaction is finished. After a system crash, changes made by transactions that were not finished can be rolled back. Changes occurring by already committed transactions should not be lost in this process. A logger component 344 can also be included to store the changes made to the data of the data storage application in a linear log. The logger component can be used during recovery to replay operations since last savepoint to ensure that all operations are applied to the data and that transactions with a logged “COMMIT” record are committed before rolling back still-open transactions at the end of a recovery process.

In an example of a shadow paging approach to retaining uncommitted changes, shadow page that contains a savepoint version of a logical page is not overwritten until the next savepoint is successfully completed. This can be reflected in a page status table maintained by the system (e.g. in a free block manager as described below). As shown in the logical flow diagram 400 of FIG. 4, a logical page L1 is written to a first physical page P1 during a most recent savepoint at 402 and a mapping (L1, P1) is added to a converter table 342. After the savepoint, at 404 the logical page L1 is modified again to become L1Δ. When L1 needs to be written to the storage 114 again, for example because of cache replacement or because the next savepoint operation has begun, the first physical page P1 becomes a shadow page S1 and a new free first physical page P2 is assigned to the logical page L1. The first physical page P2 is marked as “used” and a new mapping (L1, P2) is written to the converter table 342 at 406. The old mapping is still available in an old version of the converter table that was stored with the most recent savepoint. The first physical page P1 is still needed to retain the shadow page S1, so its status is not set to “free.” Instead, the first physical page P1 can be designated with a status of “free after savepoint.” When the next savepoint is completed at 410, the status of the first physical page P1 can then be updated to “free.”

Aspects of the subject matter described herein can be embodied in systems, apparatus, methods, and/or articles depending on the desired configuration. In particular, various implementations of the subject matter described herein can be realized in digital electronic circuitry, integrated circuitry, specially designed application specific integrated circuits (ASICs), computer hardware, firmware, software, and/or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.

These computer programs, which can also be referred to programs, software, software applications, applications, components, or code, include machine instructions for a programmable processor, and can be implemented in a high-level procedural and/or object-oriented programming language, and/or in assembly/machine language. As used herein, the term “machine-readable medium” refers to any computer program product, apparatus and/or device, such as for example magnetic discs, optical disks, memory, and Programmable Logic Devices (PLDs), used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term “machine-readable signal” refers to any signal used to provide machine instructions and/or data to a programmable processor. The machine-readable medium can store such machine instructions non-transitorily, such as for example as would a non-transient solid state memory or a magnetic hard drive or any equivalent storage medium. The machine-readable medium can alternatively or additionally store such machine instructions in a transient manner, such as for example as would a processor cache or other random access memory associated with one or more physical processor cores.

To provide for interaction with a user, the subject matter described herein can be implemented on a computer having a display device, such as for example a cathode ray tube (CRT) or a liquid crystal display (LCD) monitor for displaying information to the user and a keyboard and a pointing device, such as for example a mouse or a trackball, by which the user may provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well. For example, feedback provided to the user can be any form of sensory feedback, such as for example visual feedback, auditory feedback, or tactile feedback; and input from the user may be received in any form, including, but not limited to, acoustic, speech, or tactile input. Other possible input devices include, but are not limited to, touch screens or other touch-sensitive devices such as single or multi-point resistive or capacitive trackpads, voice recognition hardware and software, optical scanners, optical pointers, digital image capture devices and associated interpretation software, and the like.

The subject matter described herein can be implemented in a computing system that includes a back-end component, such as for example one or more data servers, or that includes a middleware component, such as for example one or more application servers, or that includes a front-end component, such as for example one or more client computers having a graphical user interface or a Web browser through which a user can interact with an implementation of the subject matter described herein, or any combination of such back-end, middleware, or front-end components. A client and server are generally, but not exclusively, remote from each other and typically interact through a communication network, although the components of the system can be interconnected by any form or medium of digital data communication. Examples of communication networks include, but are not limited to, a local area network (“LAN”), a wide area network (“WAN”), and the Internet. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.

The implementations set forth in the foregoing description do not represent all implementations consistent with the subject matter described herein. Instead, they are merely some examples consistent with aspects related to the described subject matter. Although a few variations have been described in detail herein, other modifications or additions are possible. In particular, further features and/or variations can be provided in addition to those set forth herein. For example, the implementations described above can be directed to various combinations and sub-combinations of the disclosed features and/or combinations and sub-combinations of one or more features further to those disclosed herein. In addition, the logic flows depicted in the accompanying figures and/or described herein do not necessarily require the particular order shown, or sequential order, to achieve desirable results. The scope of the following claims may include other implementations or embodiments.

Thomsen, Dirk, Schroeder, Axel, Schre'ter, Ivan

Patent Priority Assignee Title
10528592, Jan 04 2018 SAP SE Database scaling for multi-tenant applications
10691508, Nov 13 2018 SAP SE Integrating IoT solutions by common vocabularies with semantic technologies
10802924, Jul 25 2017 SAP SE Asynchronous session storing
11138091, Dec 12 2018 SAP SE Regression analysis platform
9558216, Nov 21 2014 SAP SE Moving tables across nodes in an in-memory database instance
Patent Priority Assignee Title
20030093608,
20100287346,
/////
Executed onAssignorAssigneeConveyanceFrameReelDoc
Mar 24 2011SCHROEDER, AXELSAP AGASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS 0261510583 pdf
Mar 24 2011THOMSEN, DIRKSAP AGASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS 0261510583 pdf
Mar 24 2011SCHRETER, IVANSAP AGASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS 0261510583 pdf
Mar 25 2011SAP AG(assignment on the face of the patent)
Jul 07 2014SAP AGSAP SECHANGE OF NAME SEE DOCUMENT FOR DETAILS 0336250334 pdf
Date Maintenance Fee Events
Oct 25 2016ASPN: Payor Number Assigned.
Jun 13 2017M1551: Payment of Maintenance Fee, 4th Year, Large Entity.
Jun 16 2021M1552: Payment of Maintenance Fee, 8th Year, Large Entity.


Date Maintenance Schedule
Dec 24 20164 years fee payment window open
Jun 24 20176 months grace period start (w surcharge)
Dec 24 2017patent expiry (for year 4)
Dec 24 20192 years to revive unintentionally abandoned end. (for year 4)
Dec 24 20208 years fee payment window open
Jun 24 20216 months grace period start (w surcharge)
Dec 24 2021patent expiry (for year 8)
Dec 24 20232 years to revive unintentionally abandoned end. (for year 8)
Dec 24 202412 years fee payment window open
Jun 24 20256 months grace period start (w surcharge)
Dec 24 2025patent expiry (for year 12)
Dec 24 20272 years to revive unintentionally abandoned end. (for year 12)