METHOD FOR EXECUTING DATABASE OPERATIONS SIMULTANEOUSLY

The method optimizes concurrent database operations by determining the maximum number of free storage units within a time window, addressing conflicts and ensuring efficient resource sharing, thereby improving system stability and reliability.

DE112020003597B4Active Publication Date: 2024-11-28INTERNATIONAL BUSINESS MACHINE CORPORATION
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
DE112020003597
Authority / Receiving Office
DE · DE
Patent Type
Patents
Current Assignee / Owner
Priority Date
2019-09-18
Filing Date
2020-08-21
Publication Date
2024-11-28
Estimated Expiration
2040-08-21

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

A method for performing concurrent database operations in a database system during a time window, wherein the database operations are configured to use storage units of a storage space of the database system, the method comprising: Determining a first utilization rate (201) of free storage units to be used by at least one first database operation and a second utilization rate (203) of free storage units to be used by a second database operation; Using the first and second utilization speeds to determine a maximum number of free memory units (205) to be used by the second database operation during the time window; Execute the second database operation (207) during the time window according to the maximum number; and Executing the first database operation (209), wherein the execution of the first database operation during the time window is limited to the storage units of the memory space.
Need to check novelty before this filing date? Find Prior Art

Description

BACKGROUND

[0001] The present invention relates to the field of digital computer systems and, more particularly, to a method for performing concurrent database operations in a database system.

[0002] A tenant can allocate a space on a file system that is shared with other tenants. This allocation can affect tenants that cannot use that space, even if it is no longer used by the first tenant. Therefore, a process may need to be executed to free up free space. For example, if the tenant drops tables in a database in the space, the allocated space must be released back to the file system. Systems may not be able to automatically free the allocated space and may require the execution of some commands / statements to trigger this. However, running the freeing process can cause conflicts with other concurrently running workloads that are using the space. This becomes even more important for high-volume operations such as bulk loads, which may require many new pages in a very short time window.

[0003] The publication US 2017 / 0 109 352 A1 relates to computer-implemented methods for simultaneously processing operations on a tree-based data structure, as well as systems and methods for performing these operations.

[0004] The document US 2011 / 0 093 422 A1 concerns a conflict resolution mechanism that collects statistical data on how much time certain joint actions or waiting times take. SUMMARY OF THE INVENTION

[0005] The invention is based on the object of creating an improved method, computer program product, and computer system for executing concurrent database operations in a database system. This object is achieved by the features of the independent claims. Embodiments are specified in the dependent claims.

[0006] Various embodiments provide a method for performing concurrent database operations in a database system, a computer system, and a computer program product as described by the subject matter of the independent claims. Advantageous embodiments are described in the subclaims. Embodiments of the present invention can be freely combined with one another, provided they are not mutually exclusive.

[0007] In one aspect, the invention relates to a method for executing concurrent database operations in a database system during a time window, wherein the database operations are configured to use storage units of a storage space of the database system.The method comprises determining a first usage rate of free storage units to be used by at least one first database operation and a second usage rate of free storage units to be used by a second database operation, using the first and second usage rates to determine a maximum number of free storage units to be used by the second database operation during the time window, executing the second database operation during the time window according to the maximum number, executing the first database operation, wherein the execution of the first database operation during the time window is limited to the storage units of the storage space.

[0008] In a further aspect, the invention relates to a computer system for executing concurrent database operations in a database system during a time window, wherein the database operations are configured to use storage units of a storage space of the database system.The computer system is configured to determine a first usage rate of free storage units to be used by at least a first database operation and a second usage rate of free storage units to be used by a second database operation, to use the first and second usage rates to determine a maximum number of free storage units to be used by the second database operation during the time window, to execute the second database operation during the time window according to the maximum number, to execute the first database operation, wherein the execution of the first database operation during the time window is limited to the storage units of the storage space.

[0009] In a further aspect, the invention relates to a computer program product comprising a computer-readable storage medium having a computer-readable program code embodied thereon, wherein the computer-readable program code is configured to implement all steps of the method according to preceding embodiments.

[0010] The concurrent database operations may be configured to use a respective number of free storage units of the storage space. For example, the first database operation may be configured to use N1 free storage units during the time window, and the second database operation may be configured to use N2 free storage units during the time window. At least a portion of the N1 free storage units may be free pages created during the time window. These created free pages may be referred to as free intermediate pages, which may be used by the first database operation during the time window. The first database operation may include delete operations that create free intermediate storage units so they can be used by other requests of the first database operation.If the storage space has fewer than N2 + N1 free storage units during the time window, the first database operation can only use fewer than the required N1 free storage units. The present subject matter can prevent this by establishing a maximum number of free storage units that can be used by the second database operation. The present subject matter can therefore enable efficient use of available storage by different tenants of the database system. The present subject matter can optimize execution of database operations that share storage resources.

[0011] Depending on the type of database operations in the memory space, severe fragmentation may be prevented by the present subject matter. For example, the first database operation may involve global loads inserting data into the memory space, the size of which may be reduced by the second database operation. With the present subject matter, conflicts between the area reclamation and the global loads may be avoided. This may prevent performance degradation (e.g., it may prevent a recently released area from having to be reallocated for the memory space) and may prevent global load failures. BRIEF DESCRIPTION OF THE DIFFERENT VIEWS OF THE DRAWINGS

[0012] In the following, embodiments of the invention will be explained in more detail by way of example only, with reference to the drawings in which: Fig. 1 shows an illustration of a data processing system. Fig. 2 is a flowchart of a method for performing concurrent database operations in a database system according to an example of the present disclosure. Fig. 3 is a flowchart of a method for determining a maximum number of free memory units that can be used by a database operation executing concurrently with another database operation. Fig. 4 is a flowchart of a method for determining a maximum number of free memory units that can be used by a database operation executing concurrently with another database operation. Fig. 5 illustrates a computerized system suitable for implementing one or more method steps pertaining to the present disclosure. DETAILED DESCRIPTION

[0013] The descriptions of the various embodiments of the present invention are provided for illustrative purposes, but are by no means intended to be exhaustive or limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein has been chosen to best explain the principles of the embodiments, practical application, or technical improvement over technologies found in the marketplace, or to enable others skilled in the art to understand the embodiments disclosed herein.

[0014] The database system may have one or more databases. One of the databases has storage locations. That is, these storage locations are allocated for the database. A storage location can be a storage location where actual data underlying database objects of the database can be stored. The storage location is used to allocate memory for data to be stored in the database. The storage location can be, for example, a collection of pages, such as a file. The storage location can be a table space, an index space, or virtual memory. The storage unit can be, for example, a page. A database operation can, for example, enable access to the database. A storage unit can be associated with a state value that specifies a state of the storage unit. A storage unit can be configured to contain data.A state of a storage unit indicates whether the storage unit is a free storage unit. A free storage unit is a storage unit that is not being used by a database operation. The free storage unit can either be an empty storage unit (e.g., it has never been used), or it can contain data that was written by a database operation in the past, but the data is no longer in use, e.g., the data has not been used for a period longer than a predefined maximum allowed period. For example, a storage unit can be configured to contain records. Each of the records can be assigned to respective disk blocks of the database system. A record, or data record, is a collection of related data elements such as a name, date of birth, and class of a particular user.A record represents an entity, where an entity refers to a user, task, or concept about which information is stored in the record.

[0015] A database operation may, for example, be initiated by a user's application or may be a database operation initiated by a database system. The term "user" may refer to an entity, e.g., a person, a computer, or an application running on a computer, that initiates database operations, e.g., to request an insertion of data items. The first database operation may, for example, be initiated by a user application. The second database operation may be initiated by the database system. A database operation may, for example, use at least one page of storage space. Using a page may, for example, comprise modifying the page.Modifying a page includes inserting one or more records into the page and / or deleting one or more records from the page and / or changing one or more records in the page and / or changing a state of the page. The database system may include multiple storage locations, each storage location of the multiple storage locations being allocated or assigned to a respective one or more database operations. A database operation may use storage units of a storage location allocated to it, and if no storage units exist in that storage location that can be used by the database operation, the database operation may request allocation of extra storage units. However, requesting such extra storage units may take a long time and may thus slow down the execution of the database operations.

[0016] The terms "first" and "second" as used herein refer to identifiers of nouns to which they are prefixed and do not imply any type of ordering (e.g., spatial, temporal, logical) unless explicitly defined as such. According to one embodiment, the first database operation may start before the second database operation is started. This may be advantageous in the case of database systems that regularly perform maintenance database operations. For example, the second database operation may be a maintenance database operation that is regularly performed on the database system; e.g., the second database operation may be used to reclaim free pages. Since it is regularly performed, the execution of the second database operation may coincide with the execution of other database operations during the maintenance period.Because the maintenance operation is performed more frequently than other database operations, such as the first database operation, it can be limited to a specific time window because it will be performed again later. Thus, limiting a regularly performed maintenance operation may be advantageous compared to limiting the other database operation, which only occurs once.

[0017] According to one embodiment, the second database operation can start at the same time as or before the second database operation is started. By starting earlier, the second database operation has the advantage of being the first to use the resources of the database system. By limiting the second database operation to a maximum number of free storage units during the time window, optimal resource sharing between the database operations can thus be enabled. Since the second database operation has used some resources before the first database operation is started, it can be limited during the time window so that the first database operation can have sufficient resources.

[0018] In one example, the method may be automatically executed in response to determining that the first and second database operations are or will be executing concurrently during the time window. This may enable an autonomously functioning database system. This may be particularly advantageous because a range reclamation for table spaces may take a long time (several minutes), and it is unknown when a new global load will occur. By automatically executing the present method, this can be accounted for once the global load has occurred.

[0019] According to one embodiment, each storage unit of the storage units is associated with a state value indicating whether the storage unit is allocated to the first and second database operations. The storage space comprises storage units allocated to the first and second database operations, wherein use of a storage unit by the second database operation comprises changing the state value of the storage unit to indicate that the storage unit is not allocated to the first database operation. Once a database operation accessing a particular database is terminated or completed, the allocated storage units of the database operation may no longer be allocated to the database operation and may be allocated (e.g., when they become free) for another database operation accessing the particular database.

[0020] This embodiment can be advantageously and seamlessly integrated into existing systems for the following exemplary reasons. In existing systems, database administrators execute a maintenance command at regular intervals, e.g., the time window is an interval of intervals. The second database operation can be triggered by the maintenance command. The maintenance command can, for example, be executed automatically. This can result in the maintenance command being executed concurrently with one or more other active workloads of the first database operation. For example, global loads can load a lot of data into the tablespace, the size of which is reduced by the maintenance command. Conflicts between space reclaim and global loads can be avoided by this embodiment.This can, for example, prevent a newly released area from having to be reallocated for the table space, or can prevent errors in global operations.

[0021] This embodiment can improve the use of free space. For example, if 10 tables, each with 1 terabyte (TB) of data, were added to the storage space by the first database operation, and 9 of these 10 tables are discarded, 9 TB of free space is present in the storage space and may not be used by the first database operation. The present subject matter can allow other files in a file system to access this free space by making it available using the second database operation.

[0022] According to one embodiment, determining the maximum number is performed such that the first database operation is performed on storage units without requesting allocation of the storage units used by the second database operation. For example, the second database operation may reallocate necessary pages so that the first database operation can be performed on the storage space without having to request reallocation of pages.

[0023] According to one embodiment, the method further comprises providing a fixed number of free storage units of the storage space that can be used by the first database operation during the time window according to the first usage rate, calculating a first number as the difference between the fixed number and the total number of free storage units of the storage space that can be used by the second database operation during the time window according to the second usage rate, wherein the determined number is the smallest number of the first and the second number.

[0024] The fixed number of free pages can be an estimate of the number of free pages that can be used by the first database operation during the time window. These free pages can be referred to as intermediate free pages because they must be used by the first database operation during the time window. Thus, the second database operation can only reallocate permanently free pages. The first number can be an estimate of the number of permanently free pages during the time window.

[0025] This embodiment can be advantageous because it enables an accurate and reliable method for conflict-free concurrent execution of multiple database operations. Before the first database operation is started, it is allocated a number of memory units. The first database operation may, for example, have multiple load requests and delete requests. During the execution of the first database operation, free intermediate pages may be created (e.g., by delete requests), but the first database operation requires these free intermediate pages during the time window. The fixed number of pages may include an estimate of the created free intermediate pages, so that the second database operation can only use permanently free pages.For example, a typical workload during a day might involve 5,000 load operations, with each load balanced by a corresponding delete, and the overall required area remaining relatively constant. In this case, a reclaim operation might only become active if there are more delete requests than insert requests (and some pages would be permanently freed).

[0026] According to one embodiment, the method further comprises providing a buffer having the fixed number of free memory units, wherein the buffer is configured to contain different numbers of memory units. In one example, the buffer may be logically reserved. The second database operation may be configured to use the buffer, e.g., before starting the second database operation, to determine how many free pages it can use by subtracting the number of free pages of the buffer from the total number of free pages of the memory space. By providing a buffer with pages that are not to be freed and that is large enough to cover common fluctuations of insert and delete operations (associated with the first database operation) during the time window, zigzag-shaped behavior of the memory size may be avoided.For example, the buffer contents may change for a subsequent iteration of the present method; e.g., the buffer size may change if the method is repeated for a different pair of a first and a second database operation that is executed concurrently in a different time window. This may enable systematic execution of the present method.

[0027] According to one embodiment, the method further comprises: determining a total speed as the sum of the first and second usage speeds; determining a fraction of the second usage speed present in the total speed; multiplying the number of storage units in the storage space by the fraction, wherein the determined maximum number is the result of the multiplication. This embodiment may enable an accurate and reliable method for conflict-free concurrent execution of multiple database operations.

[0028] According to one embodiment, the determination of the maximum number of free storage units is performed before the first database operation is started. This can enable optimal execution of concurrent database operations. For example, this embodiment can accelerate the execution of the first database operation compared to the case where the determination is performed during the time window, since the second database operation may exceed this maximum during the determination. Furthermore, if an already free page is available in the storage space, using this page is faster than allocating a new page at the file system level.

[0029] According to one embodiment, determining the maximum number of free storage units is performed during the execution of the first database operation. This can save processing resources that would otherwise be required to perform the determination even though the first database operation has neither started nor failed.

[0030] According to one embodiment, determining the first usage rate and the second usage rate is performed using monitoring data indicative of a processing history of database operations in the database system. Using data from the same database system in which the method is performed can enable an accurate and reliable estimation of the rates.

[0031] According to one embodiment, the first usage speed is a maximum speed of usage speeds determined from the monitoring data, and the second usage speed is a minimum speed of usage speeds determined from the monitoring data.

[0032] The first database operation may include multiple insert and / or delete and / or update requests or tasks. The first usage rate may, for example, indicate how many new data pages can be written in a given time window. The first usage rate may, for example, be the maximum rate for all global load operations associated with the first database operation. Information used to determine the first and second usage rates may be available either from dedicated performance measurements or by constantly monitoring the database system, collecting data throughput, and calculating the maximum or minimum value.

[0033] The second usage rate can be a minimum rate for reclaiming free pages, e.g., the minimum number of pages that are reclaimed in a given time window. The second usage rate can be calculated by determining how many free pages are in the memory space and can be reclaimed. The method allows limiting the number of pages to be reclaimed so that at least as many free pages are available as a global load operation can fill during the time required for memory reclaim.

[0034] According to one embodiment, the storage space is allocated for the first and second database operations. The first database operation is a database operation for storing data in the storage space, and the second database operation is a database operation for reallocating storage units of the storage space. This can allow free pages to be retained as available resources for a concurrent workload and to reclaim only a portion that is not used by that concurrent workload within a given timeframe.

[0035] According to one embodiment, the storage space is a table space and the storage units are pages, wherein the first database operation is a global load / insert operation and the second database operation is a page reclaim operation.

[0036] According to one embodiment, the database, DB, system is a DB2 for Linux, UNIX and Windows, DB2 LUW.

[0037] These embodiments can enable seamless integration of the present subject matter into existing DB2 LUW systems. The DB2 LUW uses table spaces as containers for the physical storage of tables. A table space is structured into pages. The pages are used for various tables, and some of the pages may have been used in the past, but the data on them has been deleted (either individual rows or entire tables have been discarded), and these pages become free pages. To remedy such situations, the DB2 LUW provides the maintenance command for reclaiming free pages. The command can be defined as follows: ALTER TABLESPACE<table_space_name> REDUCE <n>. The command specifies a page number to free space. In this case, the command specifies how many pages the table space should be reduced by.

[0038] Fig. 1 depicts a data processing system 100. The data processing system 100 includes a client system 101 and a database system 103. The client system 101 is connected to the database system 103 via a network 102. The network 102 may be implemented wired or wirelessly, for example, using wireless protocols and technologies such as WLAN, WiMax, etc.

[0039] The client system 101 may have one or more client applications 105. Each of the client applications 105 may be configured to access data in the database system 103. To do so, the client applications 105 may, for example, be connected to the DB2 Universal Library client library, which enables data exchange with a database system that supports DB2 systems. The DB2 Universal Library client library may provide the functionality required for the client applications 105 to access the database system 103.

[0040] An application from the applications 105 can be configured to initiate a database action or operation. For this purpose, a TCP / IP data connection can be established, for example, between the application 105 and an agent from the agents 107 of the database system 103. The agents 107 of the database system 103 can be configured to control activities in the database system 103. In particular, the agents 107 enable most data processing to be performed for the applications 105. Multiple subagents 109 can be assigned if the database system 103 has multiple processors or is part of a partitioned database. The agents 107 distribute database requests to the subagents 109. The subagents 109 execute the requests for the applications 105.

[0041] The database system 103 may have one or more storage locations 110 of one or more databases of the database system 103. The storage location 110 may be allocated or assigned a hard disk space of hard disks 111, as in Fig. 1. Each disk space can have pages that can be used to store table data.

[0042] Fig. 2 is a flowchart of a method for performing concurrent database operations in a database system during a time window. The database operations may use storage units of a storage space. Using storage units may include using at least free storage units of the storage space. e.g., the first database operation may continue to use a storage unit whose use was started in a time window preceding the current time window. The storage area may, for example, be a table space of a database. The storage space is allocated or associated with at least one database operation among the database operations. For example, the storage space may be assigned to a first database operation among the database operations.

[0043] Each database operation can be configured to use a specific number of free memory units per unit of time. This means that each database operation can have a usage rate of free memory units. Using a free memory unit can, for example, involve writing data to the free memory unit or reclaiming the free memory unit. Reclaiming the free memory unit can involve reassigning the free memory unit so that it belongs to a different memory space, for example, one assigned to another database operation.

[0044] For example, the first database operation may comprise one or more load requests or tasks. e.g., the first database operations may comprise N load requests, e.g., N = 5000. The load requests may insert data into a free storage unit or overwrite data from a storage unit. The second database operation may be a reclaiming database operation. The reclaiming database operation may be configured to reallocate or reassign free storage units.

[0045] The second database operation can, for example, be executed periodically in the database system. For example, the second database operation can be configured to run at predefined time intervals, e.g., every Monday or daily from 10:00 a.m. to 11:00 a.m. The present method can be executed during at least some of the time intervals. The time window can be one of the time intervals.

[0046] A first usage rate of free memory units to be used by the first database operation may be determined in step 201. The first usage rate is the number of free memory units used by the first database operation during a specific time unit. The first usage rate may be estimated in step 201 by using historical data, for example, comprising log records of database operations similar to the first database operation. Database operations may be similar if they have the same type of requests (e.g., insert requests) and / or are initiated by the same application and / or are executed in the same time period. In another example, the first usage rate may be user-defined, e.g.,determining the first usage speed may comprise receiving a user input indicative of the first usage speed.

[0047] The first database operation may have multiple global load requests that must be executed concurrently. Since the sum of all concurrent global loads is limited by the maximum input / output operations per second (IOPS) allowed by the database system's hardware, all loads combined can only process a maximum number of memory units per time interval. The first utilization rate can be defined as the maximum number of pages per time interval. This means that if multiple global loads are executed concurrently, they will compete for resources, and the load speed for both will decrease. If multiple loads achieve a higher combined load speed, this combined value can be the first utilization rate.

[0048] A second utilization rate of free storage units to be used by the second database operation may be determined in a step 203. The second utilization rate indicates the minimum number of storage units that will be reclaimed in the time window.

[0049] The first and second usage rates may be used in a step 205 to determine a maximum number of free storage units to be used by the second database operation during the time window. Fig. 3 and Fig. 4 provide exemplary methods for determining the maximum number of free storage units to be used by the second database operation.

[0050] In a step 207, the second database operation may be executed during the time window according to the determined maximum number. This means that the second database operation may not use more than the determined maximum number of free storage units during the time window.

[0051] In a step 209, the first database operation can be executed during the time window, with the execution of the first database operation limited to the memory units of the memory space. Since the determined maximum number limits the second database operation to a predefined number of memory units, this leaves sufficient memory units that can be used by the first database operation during the time window without having to request extra memory units. That is, the execution of the first database operation is limited to the memory units of the memory space. This can prevent any potential intrusion on pages that could be used by concurrent operations (such as global loads).

[0052] The first database operation can start before the time window. Therefore, the first database operation continues executing during the time window. In another example, the first database operation can start executing at the beginning of the time window.

[0053] Fig. 3 is a flowchart of a method for determining a maximum number of free memory units that may be used by a database operation executing concurrently with another database operation.

[0054] In a step 301, a fixed number of free storage units of the storage space may be determined. The storage space may be, for example, a table space, and the storage unit may be a page. The fixed number of free storage units of the storage space may be a number of storage units that can be used by the first database operation during the time window according to the first usage rate. A buffer may be used for this purpose. The buffer may be reserved (e.g., logically) for the first database operation. Within the same time window required by global loads (the first database operation) to fill the buffer, the range reclaim by the second database operation may release excess free storage units back to the file system.This guarantees that the range reclaim is executed no longer than the global load takes, and assumes the worst case of slow range reclaim and the fastest possible global load. Accordingly, the first usage rate is determined as a maximum rate, and the second usage rate is determined as a minimum rate, as described with reference to [ ]. Fig. 2 described.

[0055] A first number may be calculated in step 303 as the difference between the fixed number and the total number of free storage units of the storage space. The first number is the number of storage units available for reclaim. A first number may be defined as follows: total_num_reclaimable_pages = num_free_pages - num_pages_in_buffer, where num_pages_in_buffer is the fixed number of pages and num_free_pages is the total number of free memory units in the memory space.

[0056] A second number of free memory units that can be used by the second database operation during the time window according to the second usage rate can be determined in a step 305. The second number can be defined as follows: num_reclaimable_pages = load_time * reclaim_speed (in pages / second), where load_time is the time the global load operation needs (at least) to fill the buffer and can be defined as follows: load_time = num_pages_in_buffer / load_speed. Load_speed is the first usage rate. Load_time can be used as an upper bound for calculating how many pages (the second number) can be reclaimed (at most) in this time window.

[0057] In a step 307, the maximum number of free pages that can be used (e.g., reclaimed) by the second database operation can be determined as the smallest of the first and second numbers. This can limit the number of reclaimable pages. The maximum number can be defined as follows: num_reclaimable_pages = min(num_reclaimable_pages, total_num_reclaimable_pages), where min() refers to a function that calculates the minimum value of two numbers.

[0058] Fig. 4 is a flowchart of a method for determining a maximum number of free memory units that may be used by a database operation executing concurrently with another database operation.

[0059] The procedure of Fig. 4 does not use a buffer. The method of Fig. 4 can be used as a security measure. The procedure of Fig. 4 may be based on a division of the number of free pages between range reclaim and a (potential) global load.

[0060] In step 401, a summed speed may be determined as the sum of the first and second utilization speeds. The summed speed may be defined as follows: summed_speed = reclaim_speed + load_speed. The reclaim speed is the second utilization speed, and the load speed is the first utilization speed. For example, assume that the minimum reclaim speed is 250 pages / second and the maximum load speed is 1250 pages / second. In this case, the total number of pages modified by either the global load or the reclaim is 1500 pages / second.

[0061] In a step 403, a fraction of the second usage rate present in the total rate may be determined. In a step 405, a total number of free memory units in the memory space may be multiplied by the fraction. This would result in a number of pages that the reclaim can use, which may be defined as follows: num_reclaimable_pages = num_free_pages * reclaim_speed / summed_speed. The fraction is defined as the ratio of the reclaim speed to the summed speed: reclaim_speed / summed_speed.

[0062] In a step 407, the maximum number of free pages that can be used by the second database operation (or the determined maximum number) may be provided as the result of the multiplication of step 405, num_reclaimable_pages.

[0063] Fig. 5 illustrates a general computerized system suitable for implementing method steps pertaining to the present disclosure.

[0064] It should be understood that the methods described herein are at least partially non-interactive and automated by computerized systems, such as servers or embedded systems. However, in exemplary embodiments, the methods described herein may be implemented in a (partially) interactive system. These methods may further be implemented in software 522 (including firmware 522), hardware (processor) 505, or a combination thereof. In exemplary embodiments, the methods described herein are implemented in software as an executable program and executed by a special-purpose or general-purpose digital computer, such as a personal computer, a workstation, a minicomputer, or a mainframe computer. The most general-purpose system 101 therefore includes a general-purpose computer 501.

[0065] In exemplary embodiments, the computer 401 comprises, in terms of hardware architecture, as in Fig. 5, a processor 505, a main memory 510 connected to a memory controller 515, and one or more input and / or output (I / O) devices (or peripheral devices) 10, 545 connected in communication via a local input / output controller 535. The input / output controller 535 may be, but is not limited to, one or more buses or other wired or wireless connections as known in the art. The input / output controller 535 may have additional elements omitted for simplicity, such as controllers, buffers (caches), drivers, repeaters, and receivers to enable data transfers. Furthermore, the local interface may include address, control, and / or data connections to enable appropriate data transfers between the aforementioned components.As described herein, the I / O units 10, 545 may typically comprise any general purpose cryptographic card or smart card known in the art.

[0066] Processor 505 is a hardware unit for executing software, particularly that stored in memory 510. Processor 505 may be any custom-made or commercially available processor, a central processing unit (CPU), an auxiliary processor among several processors associated with computer 501, a semiconductor-based microprocessor (in the form of a microchip or a chipset), a macroprocessor, or generally any unit for executing instructions.

[0067] Memory 510 may include any one or a combination of volatile memory elements (e.g., random access memory (RAM, such as DRAM, SRAM, SDRAM, etc.)) and non-volatile memory elements (e.g., ROM, erasable programmable read-only memory (EPROM), electronically erasable read-only memory (EEPROM), programmable read-only memory (PROM)). Note that memory 510 may have a distributed architecture in which various components are remote from each other but accessible by processor 505.

[0068] The software in memory 510 may include one or more separate programs, each comprising an ordered listing of executable instructions for implementing logical functions, particularly functions involved in embodiments of this invention.

[0069] The software in the main memory 510 typically also includes a suitable operating system (OS) 511. The operating system 511 essentially controls the execution of other computer programs.

[0070] The methods described herein may be in the form of a source program, an executable program (object code), a script, or other entity comprising a set of instructions. In the case of a source program, the program must be translated by a compiler, an assembler, an interpreter, or the like, which may be contained in memory 510, in order to operate properly in conjunction with operating system 511. Furthermore, the methods may be written as an object-oriented programming language comprising classes of data and methods, or in a procedural programming language comprising routines, subroutines, and / or functions.

[0071] In exemplary embodiments, a conventional keyboard 550 and a mouse 555 may be connected to the input / output controller 535. Other output devices, such as the I / O devices 545, may include input devices such as, but are not limited to, a printer, a scanner, a microphone, and the like. Finally, the I / O devices 10, 545 may further include devices that transmit both input and output, such as, but are not limited to, a network interface card (NIC) or a modulator / demodulator (for accessing other files, devices, systems, or a network), a radio frequency (RF) or other transceiver, a telephone interface, a bridge, a router, and the like. The I / O devices 10, 545 may be any general cryptographic card or smart card known in the art.The system 101 may further include a display controller 525 connected to a display 530. In exemplary embodiments, the system 101 may further include a network interface for connecting to a network 566. The network 566 may be an IP-based network for data transmission between the computer 501 and any external server, client, and the like over a broadband connection. The network 566 transmits and receives data between the computer 501 and external systems 30 that may be integrated to perform some or all of the steps of the methods discussed herein. In exemplary embodiments, the network 566 may be a managed IP network managed by a service provider. The network 566 may be implemented wirelessly, e.g., by using wireless protocols and technologies such as WLAN, WiMax, etc.Network 566 may also be a packet-switched network such as a local area network, a wide area network, a metropolitan area network, an Internet network, or another similar type of network environment. Network 566 may be a fixed wireless network, a wireless local area network (LAN), a wireless wide area network (WAN), a personal area network (PAN), a virtual private network (VPN), an intranet, or other suitable network system, and includes equipment for receiving and transmitting signals.

[0072] If computer 501 is a PC, workstation, intelligent device, or the like, the software in memory 510 may further include a basic input / output system (BIOS) 522. The BIOS is a set of essential software routines that initialize and test hardware during boot-up, launch the operating system 511, and support the transfer of data between hardware devices. The BIOS is stored in ROM so that the BIOS can be executed when computer 501 is activated.

[0073] When computer 501 is operating, processor 505 is configured to execute software stored in memory 510, to transfer data to and from memory 510, and generally to control operations of computer 501 based on the software. The methods and operating system 511 described herein, in whole or in part, but typically the latter, are read by processor 505, possibly cached in processor 505, and then executed.

[0074] If the systems and methods described herein are implemented in software as described in Fig. As shown in Figure 5, the methods may be stored on any computer-readable medium, such as a memory 520, for use by or in connection with any computer-related system or method. Memory 520 may include disk storage, such as a hard disk drive (HDD).

[0075] Different embodiments are specified in the following numbered clauses: 1. A method for executing concurrent database operations in a database system during a time window, wherein the database operations are configured to use storage units of a storage space of the database system, the method comprising determining a first usage rate of free storage units to be used by at least a first database operation and a second usage rate of free storage units to be used by a second database operation, using the first and second usage rates to determine a maximum number of free storage units to be used by the second database operation during the time window, executing the second database operation during the time window according to the maximum number, and executing the first database operation,where the execution of the first database operation during the time window is limited to the storage units of the storage space., 2. The method of clause 1, wherein each storage unit of the storage units has a state value associated with it indicating whether the storage unit is allocated to the first and second database operations, the storage space comprising storage units allocated for the first and second database operations, wherein using a storage unit by the second database operation comprises changing the state value to indicate that the storage unit is unallocated. 3. The method of clause 2, wherein the determining is performed such that the first database operation is performed on storage units without requesting allocation of the storage units used by the second database operation. 4. Method according to any of the preceding clauses, further comprising: Providing a fixed number of free storage units of the storage space that can be used by the first database operation during the time window according to the first usage rate, Calculating a first number as the difference between the fixed number and the total number of free storage units of the storage space, Calculating a second number of free storage units that can be used by the second database operation during the time window according to the second usage rate, wherein the determined maximum number is the smallest number of the first and second numbers. 5. The method of clause 4, further comprising providing a buffer configured to have the fixed number of free memory units, the buffer configured to have different numbers of memory units. 6. The method of clause 1, 2, or 3, further comprising: determining a total speed as the sum of the first and second usage speeds; determining a fraction of the second usage speed present in the total speed; multiplying the total number of free storage units in the storage space by the fraction, the determined maximum number being the result of the multiplication. 7. The method according to any one of the preceding clauses, wherein the execution of the first database operation was started before the start of the second database operation. 8. Method according to one of the preceding clauses 1 to 6, wherein the execution of the first database operation was started at the same time as or after the start of the second database operation. 9. The method according to any one of the preceding clauses, wherein determining the maximum number of free storage units is performed before the first database operation is started. 10. The method according to any one of the preceding clauses 1 to 8, wherein determining the maximum number of free storage units is performed during the execution of the first database operation. 11. The method of any preceding clause, wherein determining the first usage rate and the second usage rate is performed by using monitoring data indicative of a processing history of database operations in the database system. 12. The method of clause 11, wherein the first usage speed is a maximum speed among usage speeds determined from the monitoring data and the second usage speed is a minimum speed among usage speeds determined from the monitoring data. 13. The method of any preceding clause, wherein the storage space is allocated for the first and second database operations, wherein the first database operation is a database operation for storing data in the storage space, and the second database operation is a database operation for reallocating storage units of the storage space. 14. The method of any preceding clause, wherein the storage space is a table space and the storage units are pages, wherein the first database operation is a global load / insert operation and the second database operation is a page reclaim operation. 15. Method according to clause 14, wherein the database, DB, system is a DB2 for Linux, UNIX and Windows, DB2 LUW. 16. The method of any preceding clause, automatically executed during the time window in response to determining that the first and second database operations are concurrent database operations.

[0076] Aspects of the present invention are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, may be implemented using computer-readable program instructions.

[0077] The present invention may be a system, a method, and / or a computer program product. The computer program product may include a computer-readable storage medium (or media) having computer-readable program instructions stored thereon for causing a processor to perform aspects of the present invention.

[0078] The computer-readable storage medium may be any physical device capable of retaining and storing instructions for use by a device to execute instructions. The computer-readable storage medium may be, for example, but is not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. A non-exhaustive list of more specific examples of the computer-readable storage medium includes the following: a portable computer diskette, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM).Flash memory), a static random access memory (SRAM), a portable CD-ROM, a DVD, a memory stick, a floppy disk, a mechanically encoded device such as punched cards or raised structures in a groove on which instructions are stored, and any suitable combination of the foregoing. A computer-readable storage medium, as used herein, is not intended to be construed as containing transient signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission media (e.g., pulses of light carried through a fiber optic cable), or electrical signals carried through a wire.

[0079] Computer-readable program instructions described herein may be downloaded to respective computing / processing units from a computer-readable storage medium or to an external computer or storage device via a network such as the Internet, a local area network, a wide area network, and / or a wireless network. The network may include copper transmission cables, fiber optic transmission lines, wireless transmission, routers, firewalls, switching units, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing unit receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium within the respective computing / processing unit.

[0080] Computer-readable program instructions for performing operations of the present invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state-setting data, or either source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, or the like, as well as conventional procedural programming languages ​​such as the "C" programming language or similar programming languages.The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (for example, over the Internet using an Internet service provider).In some embodiments, electronic circuits, including, for example, programmable logic circuits, field programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), may execute the computer-readable program instructions by utilizing state information of the computer-readable program instructions to personalize the electronic circuits to perform aspects of the present invention.

[0081] Aspects of the present invention are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, may be implemented using computer-readable program instructions.

[0082] These computer-readable program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine such that the instructions executing via the processor of the computer or other programmable data processing device produce a means for implementing the functions / steps specified in the flowchart and / or block diagram block(s).These computer-readable program instructions may also be stored on a computer-readable storage medium that can direct a computer, a programmable data processing apparatus, and / or other devices to function in a particular manner, such that the computer-readable storage medium having instructions stored thereon comprises an article of manufacture, including instructions that implement aspects of the function / step specified in the block(s) of the flowchart and / or block diagrams.

[0083] The computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operations to be performed on the computer, other programmable apparatus, or other device to produce a computer-implemented process such that the instructions executing on the computer, other programmable apparatus, or other device implement the functions / steps specified in the block(s) of flowchart and / or block diagrams.

[0084] The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowcharts or block diagrams may represent a module, segment, or portion of instructions comprising one or more executable instructions for implementing the particular logical function(s). In some alternative implementations, the functions specified in the block may occur in a different order than shown in the figures. For example, two blocks shown consecutively may actually execute substantially in parallel, or the blocks may sometimes execute in the reverse order, depending on the functionality involved.It is further to be understood that each block of the block diagrams and / or flowchart illustrations, and combinations of blocks in the block diagrams and / or flowchart illustrations, may be implemented by special purpose hardware-based systems that perform the specified functions or acts, or by combinations of special purpose hardware and computer instructions.< / n>

Claims

[1] A method for performing concurrent database operations in a database system during a time window, wherein the database operations are configured to use storage units of a storage space of the database system, the method comprising: Determining a first usage rate (201) of free memory units to be used by at least one first database operation and a second usage rate (203) of free memory units to be used by a second database operation; Using the first and second usage rates to determine a maximum number of free storage units (205) to be used by the second database operation during the time window; Executing the second database operation (207) during the time window according to the maximum number; and Executing the first database operation (209), wherein the execution of the first database operation during the time window is limited to the storage units of the storage space. [2] The method of claim 1, wherein each storage unit of the storage units is associated with a state value indicating whether the storage unit is allocated to the first and second database operations, the storage space comprising storage units allocated for the first and second database operations, wherein using a storage unit by the second database operation comprises changing the state value to indicate that the storage unit is not allocated. [3] The method of claim 2, wherein the determining is performed such that the first database operation is performed on storage units without requiring allocation of the storage units used by the second database operation. [4] The method of claim 1, further comprising: Providing a fixed number of free storage units of the storage space (301) that can be used by the first database operation during the time window according to the first usage rate, Calculating a first number (303) as the difference between the fixed number and the total number of free storage units of the storage space, Calculating a second number (305) of free storage units that can be used by the second database operation during the time window according to the second usage rate, wherein the determined maximum number (307) is the smallest number of the first and second numbers. [5] The method of claim 4, further comprising providing a buffer configured to have the fixed number of free memory units, the buffer configured to have different numbers of memory units. [6] The method of claim 1, further comprising: Determining a total speed as the sum of the first and second usage speeds (401); Determining a fraction of the second usage speed present in the total speed (403); Multiplying the total number (405) of free storage units in the storage location by the fraction, the determined maximum number being the result of the multiplication (407). [7] The method of claim 1, wherein the execution of the first database operation was started before starting the second database operation. [8] The method of claim 1, wherein the execution of the first database operation was started at the same time or after starting the second database operation. [9] The method of claim 1, wherein determining the maximum number of free storage units is performed before starting the first database operation. [10] The method of claim 1, wherein determining the maximum number of free storage units is performed during execution of the first database operation. [11] The method of claim 1, wherein determining the first usage rate and the second usage rate is performed by using monitoring data indicative of a processing history of database operations in the database system. [12] The method of claim 11, wherein the first usage speed is a maximum speed of usage speeds determined from the monitoring data, and the second usage speed is a minimum speed of usage speeds determined from the monitoring data. [13] The method of claim 1, wherein the storage space is allocated for the first and second database operations, the first database operation being a database operation for storing data in the storage space, and the second database operation being a database operation for reallocating storage units of the storage space. [14] The method of claim 1, wherein the storage space is a table space and the storage units are pages, wherein the first database operation is a global load / insert operation, and the second database operation is a page reclaim operation. [15] The method of claim 1, wherein determining, using the first and second usage rates, executing during the time window, and executing the first database operation are performed automatically in response to determining that the first and second database operations are concurrent database operations during the time window. [16] A computer program product for performing concurrent database operations in a database system during a time window, wherein the database operations are configured to use storage units of a storage space of the database system, wherein the computer program product comprises a computer-readable storage medium having computer-readable program code embodied thereon, wherein the computer-readable program code is configured to: Determining a first usage rate (201) of free memory units to be used by at least one first database operation and a second usage rate (203) of free memory units to be used by a second database operation; Using the first and second usage rates to determine a maximum number of free storage units (205) to be used by the second database operation during the time window; Executing the second database operation (207) during the time window according to the maximum number; and Executing the first database operation (209), wherein the execution of the first database operation during the time window is limited to the storage units of the storage space. [17] A computer system for performing concurrent database operations in a database system during a time window, wherein the database operations are configured to use storage units of a storage space of the database system, wherein the computer system is configured to: Determining a first usage rate (201) of free memory units to be used by at least one first database operation and a second usage rate (203) of free memory units to be used by a second database operation; Using the first and second usage rates to determine a maximum number of free storage units (205) to be used by the second database operation during the time window; Executing the second database operation (207) during the time window according to the maximum number; and Executing the first database operation (209), wherein the execution of the first database operation during the time window is limited to the storage units of the storage space. [18] A computer system according to claim 17, remotely connected to the database system or included in the database system.

Citation Information

Patent Citations

  • Time-based conflict resolution

    US20110093422A1

  • Concurrent bulk processing of tree-based data structures

    US20170109352A1