GENERATION METHOD, INFORMATION PROCESSING APPARATUS, AND GENERATION PROGRAM

JP7643591B2Active Publication Date: 2025-03-11FUJITSU LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2023567409
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-12-15
Publication Date
2025-03-11
Estimated Expiration
2041-12-15

AI Technical Summary

Benefits of technology

【0012】 1実施態様によれば、新たなコンテナで実行されるDBMSの起動を高速化することができる。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007643591000001
    Figure 0007643591000001
  • Figure 0007643591000002
    Figure 0007643591000002
  • Figure 0007643591000003
    Figure 0007643591000003
Patent Text Reader

Abstract

Upon detecting an update of schema information of a database, an information processing device (1) generates a container image including the updated schema information and a database management system that manages the database, and at the point in time when scaling out the container, generates, on the basis of the generated container image, a new container that includes the updated schema information and in which a database management system is to be executed. This makes it possible to speed up the startup of the database management system executed in the new container.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a method of production and the like. [Background technology]

[0002] Container technology is a virtualization technology that is becoming increasingly popular, especially on cloud platforms. Container technology is a technology that virtualizes the application execution environment on the operating system (OS) installed on a server, and can achieve faster startup and more flexible scaling compared to server virtualization technology, which virtualizes the execution environment including the OS.

[0003] In recent years, the use of container technology has been increasing in applications that hold data such as databases (DBs). Examples of such applications include DBMSs (DataBase Management Systems) and applications that use data. In containerized databases, data is updated using external storage or the like to make the data permanent. FIG. 8 is a diagram showing a reference example of a first configuration of a containerized database. As shown in FIG. 8, a containerized database (container database) has a disk used to hold data in external storage.

[0004] The following processes are executed when scaling out a container database. Scaling out refers to increasing the number of servers that make up the system, in this case containers. First, the schema information is copied and loaded into a new container. Second, the actual data is copied. Third, WAL (Write Ahead Logging) data, which is a transaction log, is applied.

[0005] Therefore, when scaling out a container database, the first, second, and third processes are executed, making it difficult to realize fast startup of a new container database. Container databases also require fast startup and flexible scaling, just like container applications that do not hold a database.

[0006] Therefore, a method of using a shared disk is adopted to eliminate copies of schema information and actual data. Figure 9 is a diagram showing a reference example of a second configuration of a containerized database. As shown in Figure 9, the container database has a shared disk used to store data.

[0007] By using a shared disk, the time required for copying schema information, copying actual data, and applying WAL data is reduced to zero when scaling out a container database. That is, copying of schema information in the first process and the second and third processes are suppressed. Therefore, the second configuration can realize faster startup of a new container database than the first configuration. [Prior art documents] [Patent documents]

[0008] [Patent Document 1] International Publication No. 2005 / 029332 Summary of the Invention [Problem to be solved by the invention]

[0009] However, even in the second configuration, there is a problem that it is difficult to speed up the startup of a new container database. That is, even in the second configuration, the process of reading the schema information into a new container in the first process still remains in the scale-out of the container database. By using a shared disk in the second configuration, the IO load between multiple containers increases, so if the schema information is read from the shared disk when a new container database is started, the cost of the process of reading the schema information increases.

[0010] In one aspect, the present invention aims to speed up the startup of a DBMS executed in a new container. [Means for solving the problem]

[0011] In one aspect, in a generation method, when an update to schema information of a database is detected, a computer executes a process of generating a container image including the updated schema information and a database management system that manages the database, and at the timing of scaling out the container, generating a new container based on the generated container image, the new container including the updated schema information and in which the database management system is executed. Effect of the Invention

[0012] According to one embodiment, the startup of a DBMS running in a new container can be speeded up. [Brief description of the drawings]

[0013] [Figure 1] FIG. 1 is a diagram illustrating an example of a flow of a generation process according to the embodiment. [Diagram 2] FIG. 2 is a block diagram illustrating an example of a functional configuration of the information processing device according to the embodiment. [Diagram 3] FIG. 3 is a diagram illustrating an example of a flow of an image updating process according to the embodiment. [Figure 4]FIG. 4 is a diagram illustrating an example of the flow of a container update process and a container generation process according to the embodiment. [Diagram 5] FIG. 5 is a diagram illustrating an example of a flowchart of an image updating process according to the embodiment. [Figure 6] FIG. 6 is a diagram illustrating an example of a flowchart of a container generation process according to the embodiment. [Figure 7] FIG. 7 is a diagram illustrating an example of a computer that executes a generation program. [Figure 8] FIG. 8 is a diagram illustrating a reference example of a first configuration of a containerized database. [Figure 9] FIG. 9 is a diagram illustrating a reference example of a second configuration of a containerized database. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0014] Hereinafter, embodiments of the generating method, the information processing device, and the generating program disclosed in the present application will be described in detail with reference to the accompanying drawings. Note that the present invention is not limited to the embodiments. EXAMPLES

[0015] In the embodiments, scale-out will be described when an application that holds a database is containerized. An example of the application here is a DBMS that holds and manages a database. Scaling out here refers to increasing the number of containers. Note that in the embodiments, containerization of a DBMS may be referred to as a container database.

[0016] First, conventionally, the following processes are executed when scaling out a container database. First, the schema information is copied and loaded into a new container. Second, the actual data is copied from the master container to the new container. Third, WAL (Write Ahead Logging) data, which is a transaction log, is applied. By using a shared disk, the time required for copying the schema information, copying the actual data, and applying the WAL data is reduced to zero when scaling out a container database. In other words, the copying of the schema information in the first process and the second and third processes are suppressed.

[0017] In the scale-out of a container database, even if a shared disk is used, the process of reading schema information from the shared disk still remains. When a shared disk is used, the IO load between multiple containers increases. Therefore, if the schema information is read from the shared disk when starting a new container database, the cost of the process of reading the schema information increases, and it takes time to start up the new container database.

[0018] Therefore, in the embodiment, an information processing device is described that, in order to deal with the startup delay caused by the process of loading schema information that occurs when generating a new container database, eliminates the process of loading schema information by having the schema information stored in the container image.

[0019] [Generation process flow] FIG. 1 is a diagram showing an example of a flow of a generation process according to an embodiment. In FIG. 1, a shared disk d2 holds real data d21. A master container c1, a replica container (for updating) c2, and a reference container c3 exist in the container operation environment. The master container c1 here refers to a container that manages a container. The replica container (for updating) c2 refers to a container used when updating the schema information s0. The reference container c3 refers to a container used to refer to the updated schema information s0. The reference container c3 runs an application that accesses the real data d21 held in the shared disk d2, for example. That is, the reference container c3 executes a DBMS and provides the application with access to the real data d21 held in the shared disk d2. Note that, for example, Kubernetes or OpenShift may be applied as a tool for constructing and managing the container operation environment.

[0020] The schema information s0 here includes a table definition that defines the relationship between data held in tables on the DB, and information that defines how data held in tables defined by the table definition is physically arranged. The master container c1, replica container (for updating) c2, and reference container c3 need to have the same schema information s0 in order to synchronize their respective schema information s0. The actual data d21 is the actual data on the DB associated with the schema information s0.

[0021] Under these circumstances, the user updates the table definition in the master container c1. Then, the master container c1 reflects the updated table definition in the replica container (for update) c2 (S91). The master container c1 updates the schema information s0 to update the table definition in the replica container (for update) c2.

[0022] When the scale-out support tool detects an update to the table definition of the replica container (for update) c2, it updates the reference container image i0 using the replica container (for update) c2 (S92). An image including the updated schema information s0 and DBMS is placed in the reference container image i0. The scale-out support tool then stores the reference container image i0 in the container image storage location d1 (S93).

[0023] Then, when the reference container image i0 is updated, the scale-out support tool obtains the latest reference container image i0 from the container image storage location d1. Then, the scale-out support tool updates the existing reference container c3 with the latest reference container image i0 (S94).

[0024] This allows the scale-out support tool to quickly update the schema information s0 of the existing reference container c3. In other words, since the reference container c3 is updated with the latest reference container image i0, it becomes unnecessary to read the updated schema information s0 from the shared disk d2, and the schema information s0 can be quickly updated.

[0025] The scale-out support tool then monitors the metrics of the existing reference container c3. The metrics here refer to, for example, CPU usage, memory usage, the number of accesses to the DB, and network usage. If the metrics of any of the reference containers c3 exceed a preset threshold, the scale-out support tool obtains the latest reference container image i0 from the container image storage location d1. The scale-out support tool then generates a new reference container c3' using the latest reference container image i0 (S95).

[0026] As a result, the scale-out support tool uses the latest reference container image i0, and can quickly launch the new reference container c3'. In other words, the scale-out support tool can quickly start up the DBMS of the new reference container c3'. In other words, by using the latest reference container image i0, the reference container c3' does not need to read the updated schema information s0 from the shared disk d2, which reduces disk IO associated with scale-out and allows the DBMS to start up quickly.

[0027] [Functional configuration of information processing device] FIG. 2 is a block diagram showing an example of a functional configuration of an information processing device according to an embodiment. As shown in FIG. 2, the information processing device 1 includes a control unit 10, a first storage unit 20, a second storage unit 30, a third storage unit 40, and a container group 50. The container group 50 includes a master container 51, a replica container (for update) 52, and a reference container 53. The replica container (for update) 52 and the reference container 53 include schema information 60. The schema information 60 corresponds to s0 shown in FIG. 1. The master container 51 corresponds to c1 shown in FIG. 1. The replica container (for update) 52 corresponds to c2 shown in FIG. 1. The reference container 53 corresponds to c3 shown in FIG. 1.

[0028] The control unit 10 is a processing unit that controls the entire information processing device 1, and has an image updating unit 11, a container updating unit 12, and a container generating unit 13. The storage unit (not shown) includes a first storage unit 20, a second storage unit 30, and a third storage unit 40.

[0029] The first storage unit 20 includes a container image 21. An image including at least schema information 60 and a DBMS is stored in the container image 21. The container image 21 is generated or updated by an image update unit 11, which will be described later. The first storage unit 20 corresponds to the container image storage location d1 shown in FIG. 1. The container image 21 corresponds to the reference container image i0 shown in FIG. 1.

[0030] The second storage unit 30 includes actual data 31. The actual data 31 is actual data in a DB associated with the schema information 60. The second storage unit 30 corresponds to the shared disk d2 shown in FIG. 1. The actual data 31 corresponds to the actual data d21 shown in FIG. 1. The third storage unit 40 includes actual data 41 that is the same as the actual data 31.

[0031] The image update unit 11 updates a container image of the DBMS containing the schema information 60. For example, the image update unit 11 monitors updates to the schema information 60 of the replica container (for update) 52. When the image update unit 11 detects an update to the schema information 60 of the replica container (for update) 52, it obtains the latest container image 21 at that time from the first storage unit 20 and starts up the reference container 53 using the obtained container image 21. The image update unit 11 obtains the schema information 60 from the replica container (for update) 52 and copies it to the started reference container 53. Then, the image update unit 11 creates an image of the updated reference container 53. Then, the image update unit 11 stores the imaged container image 21 in the first storage unit 20 as the latest container image 21.

[0032] The container updating unit 12 updates the container image 21 to the existing reference container 53. For example, when the container image 21 is updated, the container updating unit 12 acquires the latest container image 21 from the first storage unit 20. Then, the container updating unit 12 replaces the image of the existing reference container 53 with the acquired latest container image 21.

[0033] This allows the container update unit 12 to quickly update the schema information 60 of the existing reference container 53. In other words, the reference container 53 does not read the updated schema information 60 from the second storage unit 30, but is updated by the latest container image 21, so that the schema information 60 can be updated quickly.

[0034] The container generation unit 13 generates a new container. That is, the container generation unit 13 executes a scale-out of a container. For example, the container generation unit 13 monitors the metrics of the existing reference containers 53. When the metrics of any of the reference containers 53 exceed a preset threshold, the container generation unit 13 acquires the latest container image 21 from the first storage unit 20. Then, the container generation unit 13 generates a new reference container 53 using the latest container image 21. Note that, although it has been described that the container generation unit 13 generates a new reference container 53 when the metrics of the reference container 53 exceed the threshold, the present invention is not limited thereto, and a new reference container 53 may be generated when a user instructs scale-out.

[0035] As a result, the container generation unit 13 can quickly launch the new reference container 53 by using the latest container image 21. That is, the container generation unit 13 can quickly start up the DBMS of the new reference container 53. In other words, by using the latest container image 21, the reference container 53 does not need to read the updated schema information 60, which reduces disk IO associated with scale-out, and allows the DBMS to be started up quickly.

[0036] [Image update process flow] FIG. 3 is a diagram showing an example of the flow of an image update process according to the embodiment. First, a user updates the table definition of the master container 51 ( <0> ). The master container 51 then uses a DB standard function to reflect the update of the table definition in the replica container (for updating) 52. The master container 51 updates the schema information 60 to update the table definition of the replica container (for updating) 52.

[0037] On the other hand, in the control unit 10, the image update unit 11 monitors the update of the schema information 60 of the replica container (for update) 52 ( <1> ). When the image update unit 11 detects an update to the schema information 60 of the replica container (for update) 52, it acquires the latest container image 21 at that time from the first storage unit 20. This container image 21 is a container image that contains the latest schema information 60 at that time. Then, the image update unit 11 uses the acquired container image 21 to generate a reference container 53 for update ( <2> ).

[0038] Then, the image update unit 11 copies the schema information 60 from the replica container (for update) 52 to the reference container 53 for update ( <3> This allows the image update unit 11 to update the reference container 53 for update with the latest schema information 60.

[0039] Then, the image update unit 11 images the updated reference container for update 53, and stores the imaged container image 21 in the first storage unit 20 as the latest container image 21 ( <4> This allows the image update unit 11 to hold the container image 21 of the reference container 53 in which the latest schema information 60 has been inserted.

[0040] [Flow of container update process and container generation process] FIG. 4 is a diagram showing an example of the flow of a container update process and a container generation process according to the embodiment. As shown in FIG. 4, in the control unit 10, when the container image 21 is updated, the container update unit 12 acquires the latest container image 21 from the first storage unit 20. Then, the container update unit 12 updates the existing reference container 53 with the acquired container image 21 ( <5> ). That is, the container updating unit 12 replaces the image of the existing reference container 53 with the acquired latest container image 21. This enables the container updating unit 12 to quickly update the schema information 60 of the existing reference container 53.

[0041] In addition, in the control unit 10, the container generation unit 13 monitors the metrics of the existing reference container 53 ( <6> ). Then, when the metrics of any of the reference containers 53 exceed the threshold, the container generation unit 13 acquires the latest container image 21 from the first storage unit 20. Then, the container generation unit 13 generates a new reference container 53' using the acquired container image 21. As a result, the container generation unit 13 can quickly launch the new reference container 53' by using the container image 21. That is, the container generation unit 13 can quickly start the DBMS of the new reference container 53'. In other words, by using the latest container image 21 for the reference container 53', it is not necessary to read the updated schema information 60, and disk IO associated with scale-out is suppressed, allowing the DBMS to be started quickly.

[0042] [Image update process flowchart] Fig. 5 is a diagram showing an example of a flowchart of an image update process according to an embodiment. As shown in Fig. 5, the image update unit 11 monitors the schema information 60 of the replica container (for update) 52 (step S11). The image update unit 11 determines whether an update of the schema information 60 is detected (step S12). If it is determined that an update of the schema information 60 is detected (step S12; Yes), the image update unit 11 generates a reference container 53 for update in order to update the container image (step S13).

[0043] Then, the image update unit 11 copies the schema information 60 from the replica container (for update) 52 to the update reference container 53 (step S14). Then, the image update unit 11 images the update reference container 53, and stores the imaged container image 21 in the first storage unit 20 (step S15).

[0044] When an update of the container image 21 is detected, the container update unit 12 replaces the image of the existing reference container 53 with the latest container image 21 (step S16). Then, the container update unit 12 ends the container update process.

[0045] In step S12, when it is determined that an update of the schema information 60 has not been detected (step S12; No), the image update unit 11 ends the image update process.

[0046] [Flowchart of container generation process] 6 is a diagram illustrating an example of a flowchart of a container generation process according to an embodiment. As illustrated in FIG. 6, the container generation unit 13 monitors the metrics information of existing reference containers 53 (step S21). The container generation unit 13 determines whether the metrics have exceeded a threshold or whether the user has instructed scale-out (step S22). That is, the container generation unit 13 determines whether the metrics of any of the reference containers 53 have exceeded a threshold. In addition, the container generation unit 13 determines whether the user has instructed scale-out.

[0047] If it is determined that the metrics exceed the threshold or that the user has instructed scale-out (step S22; Yes), the container generation unit 13 acquires the latest container image 21 from the first storage unit 20 (step S23). Then, the container generation unit 13 uses the acquired container image 21 to generate a new reference container 53' (step S24). Then, the container generation unit 13 ends the container generation process.

[0048] On the other hand, if it is determined that the metrics do not exceed the threshold value and the user has not instructed to scale out (step S22; No), the container generation unit 13 ends the container generation process.

[0049] [Effects of the embodiment] According to the above embodiment, when the information processing device 1 detects an update of the schema information of the database, it generates a container image 21 including the updated schema information 60 and a database management system that manages the database. Then, at the timing of the scale-out of the container, the information processing device 1 generates a new container including the updated schema information 60 and in which the database management system is executed, based on the generated container image 21. As a result, the information processing device 1 can quickly launch the new container by generating a new container using the container image 21 including the updated schema information 60. That is, the information processing device 1 can quickly start the DBMS of the new container. In other words, since the information processing device 1 uses the container image 21 including the updated schema information 60, it is not necessary to read the updated schema information 60 from the shared disk, and the disk IO associated with the scale-out is suppressed, so that the DBMS can be quickly started.

[0050] Furthermore, according to the above embodiment, the information processing device 1 generates a container using the latest container image at the time when an update to the schema information 60 is detected. Then, the information processing device 1 copies the updated schema information 60 to the generated container. Then, the information processing device 1 generates a container image 21 by imaging the container to which the updated schema information 60 is copied. In this way, by generating the container image 21 including the updated schema information 60, the information processing device 1 can quickly reflect the updated schema information 60 in existing containers and new containers.

[0051] Furthermore, according to the above embodiment, when the container image 21 including the updated schema information 60 is generated, the information processing device 1 updates the already existing container by using the generated container image 21. As a result, the information processing device 1 can quickly update the schema information 60 of the already existing container by using the container image 21.

[0052] Furthermore, according to the above embodiment, the information processing device 1 generates a new container when the metrics of an existing container exceed a specified value. As a result, when the metrics of an existing container exceed a specified value, the information processing device 1 can quickly generate a new container containing the updated schema information 60 by using the container image 21.

[0053] According to the above embodiment, the information processing device 1 generates a new container at the timing when an instruction to scale out a container is received. As a result, when an instruction to scale out a container is received, the information processing device 1 can quickly generate a new container containing the updated schema information 60 by using the container image 21.

[0054] [others] In the above embodiment, the information processing device 1 is described as being equipped with the master container 51, the replica container (for updating) 52, and the reference container 53, but the present invention is not limited to this. That is, each of a plurality of servers may be equipped with one or a plurality of containers, and one of the plurality of servers may have the functions of the control unit 10.

[0055] In the above embodiment, each component of the information processing device 1 does not necessarily have to be physically configured as shown in the figure. That is, the specific form of distribution and integration of the information processing device 1 is not limited to that shown in the figure, and all or a part of it can be functionally or physically distributed and integrated in any unit according to various loads, usage conditions, etc. For example, the image update unit 11 may be distributed into a monitoring unit that monitors updates to the schema information 60 and an update unit that updates the latest container image when an update to the schema information 60 is detected. In addition, the container update unit 12 and the container generation unit 13 may be integrated into one unit. In addition, the first storage unit 20, the second storage unit 30, and the third storage unit 40 may be connected via a network as external devices of the information processing device 1.

[0056] Moreover, the various processes described in the above embodiments can be realized by executing a prepared program on a computer such as a personal computer or a workstation. Therefore, an example of a computer that executes a generation program that realizes the same functions as the information processing device 1 shown in Fig. 2 will be described below. Fig. 7 is a diagram showing an example of a computer that executes a generation program.

[0057] 7, the computer 100 has a CPU 103 that executes various arithmetic processes, an input device 115 that accepts data input from a user, and a display device 109. The computer 100 also has a drive device 113 that reads programs and the like from a storage medium, and a communication I / F (Interface) 117 that transmits and receives data to and from other computers via a network. The computer 100 also has a memory 101 that temporarily stores various information, and a HDD (Hard Disk Drive) 105. The memory 101, the CPU 103, the HDD 105, the display device 109, the drive device 113, the input device 115, and the communication I / F 117 are connected by a bus 119.

[0058] The drive device 113 is, for example, a device for the removable disk 111. The HDD 105 stores the generation program 105a and the generation related information 105b. The communication I / F 117 manages the interface between the network and the inside of the device, and controls the input and output of data from other computers. For example, a modem or a LAN adapter can be used as the communication I / F 117.

[0059] The display device 109 is a display device that displays a cursor, an icon, a tool box, and data such as documents, images, function information, etc. The display device 109 may be, for example, a liquid crystal display or an organic EL (Electroluminescence) display.

[0060] The CPU 103 reads out the generation program 105a, expands it in the memory 101, and executes it as a process. Such a process corresponds to each functional unit of the information processing device 1. The generation related information 105b corresponds to information used for executing the generation program 105a, etc. And, for example, the removable disk 111 stores each piece of information such as the generation program 105a.

[0061] It should be noted that the generating program 105a does not necessarily have to be stored in the HDD 105 from the beginning. For example, the program may be stored in a "portable physical medium" such as a flexible disk (FD), a CD-ROM, a DVD disk, a magneto-optical disk, or an IC card that is inserted into the computer 100. Then, the computer 100 may read out the generating program 105a from these and execute it. [Explanation of symbols]

[0062] 1. Information processing device 10 Control section 11 Image Update Section 12 Container Update Section 13 Container Generation Section 20 First memory unit 21 Container Images 30 Second memory unit 31 Actual Data 40 Third Memory Unit 41 Actual Data 50 containers 51 Master Container 52 Replica container (for updating) 53 Reference Container 60 Schema Information

Claims

1. When detecting an update of schema information of a database, a container image is generated including the updated schema information and a database management system that manages the database; At the timing of container scale-out, a new container including the updated schema information and in which the database management system is executed is generated based on the generated container image. A method of generating data in which processing is performed by a computer.

2. The process of generating the container image includes: generating a container using the latest container image at the time when the update of the schema information is detected; Copying the updated schema information into the created container; Create a container image by copying the updated schema information to the container. The method of claim 1 .

3. When the container image including the updated schema information is generated, an existing container is updated with the generated container image. The method according to claim 1 or 2.

4. The process of generating a new container generates the new container when the metrics of an existing container exceed a specified value. The method of claim 1 .

5. The process of generating the new container generates the new container at a timing when an instruction to scale out the container is received. The method of claim 1 .

6. a first generation unit that generates a container image including the updated schema information and a database management system that manages the database when detecting an update of schema information of the database; a second generation unit that generates a new container including the updated schema information and in which the database management system is executed, based on the container image generated by the first generation unit at the timing of container scale-out; 13. An information processing device comprising:

7. When detecting an update of schema information of a database, a container image is generated including the updated schema information and a database management system that manages the database; At the timing of container scale-out, a new container including the updated schema information and in which the database management system is executed is generated based on the generated container image. A generating program that causes a computer to execute a process.

Citation Information

Patent Citations

  • Database extension / construction system, database extension / construction device, database extension / construction program, database extension / construction method, database construction system, database construction device, database construction program and database construction method

    JP2005267217A

  • Node and information processing system processing nodes

    JP2017219972A

  • Database schemer update method

    WO2005029332A1

  • Application execution device, application execution method, and recording medium

    WO2019181860A1