Database management device and control method

The database management device automates the generation of new databases based on usage thresholds, reducing administrative burden and optimizing storage space utilization by preventing waste and ensuring capacity.

JP7791454B2Active Publication Date: 2025-12-24NIPPON TELEGRAPH & TELEPHONE CORP
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2023565687
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-12-06
Publication Date
2025-12-24
Estimated Expiration
2041-12-06

AI Technical Summary

Technical Problem

Database administrators face a heavy workload due to the need to manage database usage and retention periods, leading to potential waste of storage space or insufficient capacity, requiring frequent manual intervention.

Method used

A database management device that includes a generation unit to create new databases when monitored usage exceeds a threshold, a monitoring unit to track database usage, and a management unit to reserve storage space for new databases, reducing manual intervention and optimizing storage use.

Benefits of technology

This approach reduces the administrative workload and ensures efficient use of storage space by automatically generating new databases when needed, preventing waste and ensuring sufficient capacity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007791454000001
    Figure 0007791454000001
  • Figure 0007791454000002
    Figure 0007791454000002
  • Figure 0007791454000003
    Figure 0007791454000003
Patent Text Reader

Abstract

One embodiment of the present invention is a database management device comprising a generation unit for generating a database, a monitoring unit for monitoring a physical quantity that has a positive correlation with the usage of the database generated by the generation unit, and a management unit that, when the physical quantity monitored by the monitoring unit exceeds a threshold value, instructs the generation unit to generate a new database as the database to be used subsequent to the database currently in use. When instructed to generate a new database by the management unit, the generation unit reserves a region for storing the new database within a storage device and generates the new database in the reserved region.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present invention relates to a database management device and a control method. [Background technology]

[0002] In the operation and management of a computer system, various data is collected from each device that makes up the computer system in order to detect failures and abnormalities in each device and to predict the occurrence of abnormalities (see Figure 6). The collected data is recorded in a database and analyzed. Data collected from each device includes CPU (Central Processing Unit) usage rates and various logs defined by Syslog (System Logging Protocol).

[0003] The frequency with which such time-series data is recorded in a database and the storage period of the database often differ depending on the type of database. Therefore, a database administrator must manage each database separately. Regarding database management, technologies related to the automatic generation of databases have been disclosed (see Patent Documents 1 and 2). [Prior art documents] [Patent documents]

[0004] [Patent Document 1] Japanese Patent Application Laid-Open No. 2003-228570 [Patent Document 2] Japanese Patent Application Publication No. 10-111819 Summary of the Invention [Problem to be solved by the invention]

[0005] As shown in Figure 7, database management tasks performed by administrators include managing database usage and database retention periods. For example, when the remaining capacity of a database becomes low, the administrator must prepare a new database. In this process, if a new database is prepared with some remaining capacity, there is a risk of wasting free space on the storage device that stores the database. On the other hand, if there is no remaining capacity, the database may run out of space, making it impossible to record data and achieving sufficient performance. For these reasons, administrators must perform management tasks while also monitoring the database intermittently, which creates the problem of a very heavy workload for the administrator.

[0006] In view of the above circumstances, the present invention aims to provide a technique for reducing the workload of database administrators and for efficiently using storage areas for recording data without waste. [Means for solving the problem]

[0007] One aspect of the present invention is a database management device comprising a generation unit that generates a database, a monitoring unit that monitors a physical quantity that is positively correlated with the usage of the database generated by the generation unit, and a management unit that instructs the generation unit to generate a new database as the database to be used after the database currently in use when the physical quantity monitored by the monitoring unit exceeds a threshold value, wherein when instructed by the management unit to generate a new database, the generation unit reserves an area in a storage device to store the new database and generates the new database in the reserved area.

[0008] One aspect of the present invention is a control method for a database management device, comprising: a step of acquiring a physical quantity that has a positive correlation with database usage; and a generation step of reserving an area in a storage device for storing a new database when the physical quantity exceeds a threshold, and generating a new database in the reserved area as the database to be used next after the database currently in use. [Effects of the Invention]

[0009] The present invention makes it possible to reduce the workload of database administrators and to use storage areas for recording data effectively without waste. [Brief explanation of the drawings]

[0010] [Figure 1] FIG. 1 is a block diagram showing a configuration of a database management system. [Figure 2] FIG. 10 is a diagram illustrating an example of setting data. [Figure 3] FIG. 10 is a diagram illustrating an example of setting data. [Figure 4] 10 is a flowchart showing a processing flow of the database management device. [Figure 5] 10 is a flowchart showing a processing flow of the database management device. [Figure 6] FIG. 10 is a diagram illustrating how data is acquired from a managed device. [Figure 7] FIG. 10 illustrates an example of management work by an administrator. DETAILED DESCRIPTION OF THE INVENTION

[0011] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described in detail with reference to the drawings. 1 is a block diagram showing the configuration of a database management system 10 including a database management device 100 according to an embodiment. The database management system 10 is a system that acquires data from a managed device 500 and records the data in a database. The managed device 500 is a server, a virtual machine built on a server, or the like.

[0012] The database management system 10 comprises a database management device 100, a storage device 200, and a recording unit 400. The database management device 100 manages a database recorded in the storage device 200. Furthermore, the database management device 100 instructs the recording unit 400 to switch the recording destination to a new database when the database becomes full. Note that "full" may indicate that the entire database has been used, or may be a value that is not full, such as 97% of the database capacity (for example, a value close to full, such as 90%).

[0013] The recording unit 400 records data acquired from the managed device 500 in a database. The storage device 200 is configured with a non-volatile storage device such as an HDD (Hard Disk Drive) or an SSD (Solid State Drive). A database is created in the storage device 200 for each type of data. In this embodiment, databases 300-1, 300-N are stored in the storage device 200 to record N types of data. A database newly created to record the same type of data as a certain database is also stored. FIG. 1 shows, as an example, database 300-1-1 newly created to record the same type of data as database 300-1. In the following description, when there is no need to distinguish between databases 300-1, 300-N, 300-1-1, etc., they will be referred to as database 300.

[0014] The database management device 100 is composed of a generation unit 110, a monitoring unit 120, a learning unit 130, a deletion unit 140, a management unit 150, and setting data 160. The generation unit 110 generates a database in a storage device 200. The monitoring unit 120 monitors physical quantities that are positively correlated with the usage of the database generated by the generation unit 110. The monitoring unit 120 acquires the physical quantities by referring to the storage device 200 each time a predetermined monitoring time (e.g., on the hour) arrives. If the physical quantity exceeds a threshold, the monitoring unit 120 notifies the management unit 150 that the threshold has been exceeded. Furthermore, if the database becomes full, the monitoring unit 120 also notifies the management unit 150 that the database is full.

[0015] In this embodiment, the physical quantity used is the usage rate obtained by dividing the data size of data actually recorded in one database 300 by the size of the database. For example, if the size of database 300-1 is 100 megabytes and the data size of the data actually recorded is 70 megabytes, the usage rate of database 300-1 is 70%.

[0016] When the usage rate monitored by the monitoring unit 120 exceeds a threshold, the management unit 150 instructs the generation unit 110 to generate a new database as the database to be used after the database currently in use. When the generation unit 110 is instructed by the management unit 150 to generate a new database, it reserves an area in the storage device 200 for storing the new database and generates the new database in the reserved area. At this time, the management unit 150 references the setting data 160 to obtain the format and size of the database to be generated, and specifies the size and format of the database to be generated to the generation unit 110. Furthermore, when the database becomes full, the management unit 150 instructs the recording unit 400 to switch the recording destination to a new database that has already been prepared.

[0017] The setting data 160 is stored in a non-volatile storage device. This setting data is set by the administrator of the database management device 100 when creating a new database that does not have any setting data set, and is then updated by the database management device 100 as described below. After setting the setting data, the administrator can input an instruction to the database management device 100 to create a new database.

[0018] 2 and 3 are diagrams showing an example of setting data 160. Fig. 2 is a diagram showing format data of the setting data. The format data indicates the format of each type of database. The format indicates the type and the data structure of one record corresponding to this type.

[0019] In Figure 2, CPU (Central Processing Unit) usage, memory usage, kernel, and httpd are used as example types. CPU usage indicates the CPU usage rate on a server or virtual machine. Memory usage indicates the RAM (Random Access Memory) usage rate on a server or virtual machine. Kernel and httpd are data types defined in Syslog (System Logging Protocol). These database types are just examples.

[0020] A record consists of a combination of a data name (such as "Date and Time" or "Usage Rate" in Figure 2) and a data type ("DT" in Figure 2). The data type indicates the type, such as integer or character, and the size. For example, if the data type is "INT", it indicates an integer type with a size of 4 bytes. Also, if the data type is "CHAR(10)", it indicates a character type with a size of 10 bytes.

[0021] The date and time in the CPU usage record shown in Figure 2 indicates the date and time when CPU usage was detected. A numerical value between 0 and 100 (%) is recorded for the usage rate in the CPU usage record. The date and time in the memory usage record indicates the date and time when memory usage was detected. A numerical value between 0 and 100 (%) is recorded for the usage rate in the CPU usage record. The date and time in the kernel record indicates the date and time when the log message was acquired. A string indicating the log is recorded in the log message in the kernel record. The date and time in the httpd record indicates the date and time when the log message was acquired. A string indicating the log is recorded in the log message in the httpd record.

[0022] FIG. 3 is a diagram showing the management data included in the setting data. The management data consists of type, initial size, second and subsequent size, retention period, unnecessary period, and threshold. Type indicates the type of database. Initial size indicates the size of the database to be generated when the generation unit 110 generates a database of a certain type when no database of that type has been generated yet. In other words, it indicates the size of the newly generated database. s11, s21, s31, and s41 listed in the initial size indicate the sizes when generating databases for CPU usage, memory usage, kernel, and httpd, respectively.

[0023] The second or subsequent size indicates the size of a database to be generated when the generation unit 110 generates a new type of database when one type of database has already been generated. In other words, it indicates the size of a database when a new database of the same type as a database already existing in the storage device 200 is generated. The second or subsequent size indicates a size according to the usage pattern of a previously generated type of database. In this embodiment, the frequency of recording to the database within a predetermined period is used as an example of the usage pattern. s12, s22, s32, and s42 listed in the second or subsequent size indicate the sizes when generating databases for CPU usage, memory usage, kernel, and httpd, respectively.

[0024] The initial size and the second and subsequent sizes may be expressed in units indicating size (bytes, megabytes, etc.) or may be expressed in terms of the number of records.

[0025] The retention period for managed data indicates the retention period for the database. The date on which the retention period expires is referred to as the retention deadline. For example, if the retention period is 30 days and the database was created on January 1st, the retention period for this database will be from January 1st until the retention deadline of January 30th. rp1, rp2, rp3, and rp4 listed in the retention period indicate the retention periods for the CPU usage rate, memory usage rate, kernel, and httpd databases, respectively.

[0026] The unnecessary period is the period from immediately after the retention period expires until the deletion unit 140 deletes the database. The day on which the unnecessary period expires is referred to as the unnecessary period. When the unnecessary period arrives, the management unit 150 instructs the deletion unit 140 to delete the database whose unnecessary period has expired. For example, if the unnecessary period is set to 0 days, the database is deleted when the retention period expires. Regarding the operation of the retention period and the unnecessary period, the retention period is the period during which deletion of the database is prohibited, and the unnecessary period is determined, for example, according to the free space in the storage device 200. Up1, up2, up3, and up4 listed in the unnecessary period indicate the unnecessary periods for the CPU usage rate, memory usage rate, kernel, and httpd databases, respectively.

[0027] The threshold is a value that the monitoring unit 120 compares with the usage rate to determine whether to instruct the generation unit 110 to generate a new database as the database to be used after the database currently in use. If the usage rate exceeds the threshold, the management unit 150 instructs the generation unit 110 to generate a new database as the database to be used after the database currently in use. The thresholds th1, th2, th3, and th4 indicate thresholds for determining whether to generate new databases for CPU usage rate, memory usage rate, kernel, and httpd, respectively.

[0028] The threshold may be constant or may be dynamically changed depending on the data recording frequency. For example, when the recording frequency is high, the free space decreases rapidly, so the threshold may be changed to a lower value. Specifically, the management unit 150 may calculate the data size consumed per day based on the recording frequency, and set a new threshold value that allows a new database to be generated two days before the data becomes full if consumed at this data size. This allows data to be recorded to a new database two days later, not only when the recording frequency is high, but also when the recording frequency is low. This means that a database is prepared two days in advance regardless of the data recording frequency. Therefore, it is possible to prevent the next database from being generated earlier than necessary, thereby enabling efficient use of the storage area for recording data and optimal database management.

[0029] Of the setting data described above, the management unit 150 references the format data, the initial size, the subsequent size, the storage period, and the unnecessary period. The monitoring unit 120 references the threshold. In this embodiment, time-series data such as CPU usage rate and syslog kernel are recorded as examples of data stored in the database, but this is not limited to time-series data. In this embodiment, the data stored in the database does not have to be time-series data; it may also be data that is recorded so as to be accumulated in the database (so that the free space decreases monotonically).

[0030] Returning to the explanation of FIG. 1 , the learning unit 130 sets the data size of a newly created database for each type of database as the second and subsequent size in the setting data 160. Specifically, the learning unit 130 acquires the recording frequency for a given type of database within a predetermined period from the recording unit 400. The learning unit 130 also acquires the recording size within the period in which data was actually recorded within the predetermined period from the monitoring unit 120. The learning unit 130 develops a regression model using the acquired recording frequency and recording size within the period. Using this regression model, the learning unit 130 outputs the data size (second and subsequent size) corresponding to a given type of database to be newly created in response to an instruction from the management unit 150. The predetermined period may be, for example, a storage period indicated in the management data, but may also be set by an administrator. When the predetermined period is set as the storage period, the higher the recording frequency, the larger the second and subsequent size.

[0031] In this way, the size of the database is determined according to the manner in which the database is used, so the database management device 100 can use the storage area for recording data efficiently without waste.

[0032] As another example of a usage mode, the recording time of data recorded in a database may be used. For example, if there is a correlation such that the more nighttime recording times a database has, the more data is recorded, the learning unit 130 develops a regression model using the acquired recording time and the recording size within the period. The learning unit 130 uses this regression model to output the data size corresponding to a new type of database to be created. Any usage mode may be used as long as it has some correlation with the size of the database.

[0033] The deletion unit 140 deletes databases whose unnecessary period has expired in response to instructions from the management unit 150. This increases the free space in the storage device 200, allowing the database management device 100 to use the storage area for recording data efficiently and without waste. Note that when the unnecessary period has expired, the retention period has expired. Therefore, it can be said that the deletion unit 140 deletes databases whose retention period has expired.

[0034] Next, the processing flow of the database management device 100 will be described. FIGS. 4 and 5 are flowcharts showing the processing flow of the database management device 100. The management unit 150 determines whether or not an instruction to create a new database has been input by the administrator (step S101). At this time, the administrator specifies the type of database to be created. If an instruction to create a new database has been input by the administrator (step S101: YES), the management unit 150 instructs the creation unit to create a database of the specified type. In response to the instruction, the creation unit 110 reserves an area in the storage device 200 for storing the new database, creates the new database in the reserved area (step S102), and returns to step S101.

[0035] If the administrator has not input an instruction to create a new database (step S101: NO), the monitoring unit 120 determines whether the database monitoring time has arrived (step S103). If the database monitoring time has arrived (step S103: YES), the monitoring unit 120 acquires the usage rate by referring to the storage device 200 (step S104). At this time, the monitoring unit 120 acquires the usage rates of all types of databases.

[0036] The monitoring unit 120 determines whether a database is full (step S105). This determination is also made for all types of databases. If it is determined that a database is not full (step S105: NO), the monitoring unit 120 refers to the threshold value of the setting data and determines whether the usage rate has exceeded the threshold value (step S106). This determination is also made for the usage rate of all types of databases. If the usage rate has exceeded the threshold value (step S106: YES), the monitoring unit 120 notifies the management unit 150 that the threshold has been exceeded. At this time, the management unit 150 is also notified of the type of database that has exceeded the threshold value. The management unit 150 instructs the generation unit 110 to generate a new database as the database to be used after the database currently in use. When the generation unit 110 is instructed by the management unit 150 to generate a new database, the generation unit 110 reserves an area in the storage device 200 for storing the new database and generates the new database in the reserved area (step S107). The management unit 150 refers to the storage period of the setting data, sets the storage period of the created database (step S108), and returns to step S101.

[0037] If it is determined in step S105 above that the database is full (step S105: NO), the monitoring unit 120 notifies the management unit 150 that the database is full. The management unit 150 instructs the recording unit 400 to switch the recording destination to a new database that has already been prepared (step S109), and returns to step S103.

[0038] In step S103 above, if the database monitoring time has not arrived (step S103: NO), the process proceeds to step S201 in Fig. 5. The management unit 150 determines whether the storage deadline has arrived (step S201). This determination is made for all databases for which a storage deadline has been set. If the storage deadline has arrived (step S201: YES), the management unit 150 refers to the setting data and sets unnecessary expiration dates for all databases for which the storage deadline has arrived (step S202), and then returns to step S101.

[0039] If the storage period has not expired (step S201: NO), the management unit 150 determines whether the expiration date has expired (step S203). This determination is made for all databases for which an expiration date has been set. If the expiration date has expired (step S203: YES), the management unit 150 instructs the deletion unit 140 to delete the database whose expiration date has expired. In response to the instruction from the management unit 150, the deletion unit 140 deletes the database whose expiration date has expired (step S204), and returns to step S101.

[0040] If the expiration date has not arrived (step S203: NO), the management unit 150 determines whether the update time has arrived (step S205). This update time is the time to update the second and subsequent sizes and the threshold. If the update time has arrived (step S205: YES), the management unit 150 instructs the learning unit 130 to output the second and subsequent sizes. Here, the instruction is to output the second and subsequent sizes of all types of databases. The learning unit 130 uses a regression model to output the second and subsequent sizes of all types of databases, thereby updating the second and subsequent sizes in the setting data (step S206).

[0041] Next, the management unit 150 calculates the data size consumed in one day based on the recording frequency, updates the threshold in the setting data (step S207), and returns to step S101. If the time for updating has not arrived (step S205: NO), the process returns to step S101.

[0042] As described above, in this embodiment, when a physical quantity that has a positive correlation with the amount of database usage exceeds a threshold, a database to be used next after the database currently in use is automatically generated, thereby reducing the workload of the database administrator.

[0043] Furthermore, when a physical quantity that has a positive correlation with the database usage exceeds a threshold, the generation unit 110 reserves an area in the storage device 200 for storing a new database, and generates a new database in the reserved area. Conventionally, when generating a database, a large amount of area is reserved to allow for some leeway, but in this embodiment, area is reserved as needed. This prevents unnecessary area from being reserved, allowing the storage area for recording data to be used efficiently and without waste. Furthermore, databases whose storage period has expired are deleted. This allows the storage area for recording data to be used efficiently and without waste, and allows the database to be managed appropriately.

[0044] Furthermore, the size from the second time onwards is set to a size according to the usage mode of a single type of database generated in the past. For example, since the size from the second time onwards is output using a regression model trained by the learning unit 130, the storage area for recording data can be used efficiently without waste. Note that if the database is to be generated periodically, the regression model is trained for a predetermined period equal to the desired periodicity. This also makes it possible to adjust the frequency of database generation.

[0045] Furthermore, by changing the threshold value according to the frequency of data recording in the database, even if the frequency of data recording suddenly increases, the administrator can automatically change the threshold value and generate a new database without performing any special work. This reduces the workload of the database administrator. Conversely, by increasing the threshold value when the frequency of data recording increases, it is possible to prevent the next database from being generated earlier than necessary, thereby enabling efficient use of the storage area for recording data and optimal management of the database.

[0046] In this embodiment, the usage rate is used as a physical quantity that has a positive correlation with the usage amount of the database, but this is not limiting. For example, a unit indicating size (such as gigabytes or terabytes) may be used as the physical quantity.

[0047] The database management device 100 may be configured using a processor such as a CPU (Central Processing Unit) and a memory. In this case, the generation unit 110, the monitoring unit 120, the learning unit 130, the deletion unit 140, and the management unit 150 function as the generation unit 110, the monitoring unit 120, the learning unit 130, the deletion unit 140, and the management unit 150 by the processor executing a program. Note that all or part of the functions of the generation unit 110, the monitoring unit 120, the learning unit 130, the deletion unit 140, and the management unit 150 may be realized using hardware such as an ASIC (Application Specific Integrated Circuit), a PLD (Programmable Logic Device), or an FPGA (Field Programmable Gate Array). The above program may be recorded on a computer-readable recording medium. Examples of the computer-readable recording medium include portable media such as a flexible disk, a magneto-optical disk, a ROM, a CD-ROM, and a semiconductor storage device (e.g., a solid-state drive (SSD)), and storage devices such as a hard disk or semiconductor storage device built into a computer system. The above program may be transmitted via a telecommunications line.

[0048] Although an embodiment of the present invention has been described above in detail with reference to the drawings, the specific configuration is not limited to this embodiment, and includes designs within the scope of the gist of the present invention. [Industrial Applicability]

[0049] The present invention is applicable to a system for managing a database. [Explanation of symbols]

[0050] 10...database management system, 100...database management device, 110...generation unit, 120...monitoring unit, 130...learning unit, 140...deletion unit, 150...management unit, 200...storage device, 300, 300-1, 300-N, 300-1-1...database, 400...recording unit, 500...managed device

Claims

1. a generation unit for generating a database; a monitoring unit that monitors a physical quantity that has a positive correlation with the usage amount of the database generated by the generating unit; a management unit that, when the physical quantity monitored by the monitoring unit exceeds a threshold, instructs the generation unit to generate a new database as a database to be used after the database currently in use, and specifies a type of the new database that is the same type as the database currently in use and a size of the new database that is updated from the size of the database currently in use in accordance with the usage pattern of the database currently in use; Equipped with A database management device in which, when instructed by the management unit to generate the new database, the generation unit reserves an area in a storage device for storing the new database, and generates the new database in the reserved area.

2. The database management device described in claim 1, wherein when the management unit instructs the generation unit to generate a database of a certain type when no database of the certain type has been generated, the size of the database to be generated is fixed, and when the management unit instructs the generation unit to generate a database of a certain type when a database of the certain type has been generated, the size of the database to be generated is set to a size that corresponds to the usage manner of the database of the certain type that was generated in the past.

3. The usage mode is the frequency of recording data in one type of database, a learning unit that outputs a data size of the one type of database to be newly generated using a regression model obtained by learning the correspondence between the recording frequency and the data size of the one type of database; 3. The database management device according to claim 2, wherein the management unit sets the data size of the newly created one type of database to a size corresponding to the data size output by the learning unit.

4. the management unit calculates a consumption data size to be consumed in a predetermined period based on a frequency of recording data in the database, and dynamically changes the threshold value according to the calculated consumption data size so that the physical quantity exceeds the threshold value a predetermined number of days before the database becomes full; A database management device as described in any one of claims 1 to 3, wherein when the management unit instructs the generation of the new database based on the dynamically changed threshold, the generation unit reserves the area in the storage device and generates the new database.

5. The database has a retention period.

5. The database management device according to claim 1, further comprising a deletion unit that deletes the database whose retention period has expired.

6. A method for controlling a database management device, comprising: obtaining a physical quantity that is positively correlated with the database usage; a generation step of reserving an area in a storage device for storing a new database when the physical quantity exceeds a threshold value, generating a new database in the reserved area as a database to be used after the database currently in use, and specifying a type of the new database that is the same as the type of the database currently in use and a size of the new database that is updated from the size of the database currently in use in accordance with the usage pattern of the database currently in use; A control method comprising:

7. 7. The control method according to claim 6, wherein in the generation step, when a type of database is generated in a state where no such database has been generated, the size of the database to be generated is set to a fixed size, and when a type of database is generated in a state where a type of database has been generated, the size of the database to be generated is set to a size according to the usage manner of the type of database generated in the past.

Citation Information

Patent Citations

  • Automatic index adding system of relational database

    JP1998111819A

  • Device and method for retrieving data

    JP2003228570A

  • Database storing method, and database storing system

    JP2006293981A

  • Data management apparatus and program

    JP2013235459A