Storage device and cache control method

JP7640423B2Active Publication Date: 2025-03-05HITACHI INFORMATION & TELECOMM ENG LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
JP2021153061
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-09-21
Publication Date
2025-03-05
Estimated Expiration
2041-09-21

Smart Images

  • Figure 0007640423000004
    Figure 0007640423000004
  • Figure 0007640423000005
    Figure 0007640423000005
  • Figure 0007640423000006
    Figure 0007640423000006
Patent Text Reader

Abstract

To realize a cache control to improve processing performance.SOLUTION: A storage device manages an access history to user data, calculates a first index, creates analytic data including an access source, user data, a time zone, days of the week, and the first index, calculates a second index, creates access tendency data including the access source, the user data, the time zone, and the second index, and performs a cache control based on access tendency data corresponding to a time zone ahead of the current time zone, where the first index is for evaluating an access frequency to user data of the access source in the combination of the time zone and days of the week by aggregating a history accessed to an arbitrary time zone and an arbitrary day of the week on arbitrary user data corresponding to an arbitrary access source, and a second index for evaluating the access tendency to the user data of the access source in the same time zone based on the first index included in the same access source and in analytic data in the same time zone.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to cache control of a storage device. [Background technology]

[0002] Cache memory is used to improve the performance of processing using user data stored in a storage device. By storing data in the cache memory, it is possible to respond to user data at high speed. Since the capacity of cache memory is limited, it is necessary to manage user data. The technology described in Patent Document 1 is known as a method for managing data in a cache memory.

[0003] Patent document 1 states that "the system is configured with cache memories 36a-d which store data read from the storage devices, an access monitoring unit which monitors the access status from the higher-level device 20 to the data stored in the storage devices 10a-d, a schedule information creation unit which creates schedule information which determines the storage contents of the cache memories 36a-d based on the access status, and a memory control unit which controls the recording process of data from the storage devices 10a-d to the cache memories 36a-d and the deletion process of data from the cache memories based on the schedule information." [Prior art documents] [Patent documents]

[0004] [Patent Document 1] JP 2009-157749 A Summary of the Invention [Problem to be solved by the invention]

[0005] In the technology described in Patent Document 1, schedule information is generated based on the number of accesses, so user data that is accessed infrequently but periodically is not subject to cache control. For example, user data handled in batch processing is user data that is accessed infrequently but periodically, and by storing the data in cache memory before the start of batch processing, it is expected that the processing performance of the batch processing will improve.

[0006] An object of the present invention is to provide a cache control method based on the access tendency of user data and a storage device that executes the method. [Means for solving the problem]

[0007] A representative example of the invention disclosed in the present application is as follows: That is, a storage device including a controller and a plurality of storage media, the controller is capable of accessing a memory including a cache area, manages a history of accesses to user data stored in the plurality of storage media as access record information, calculates a first index for evaluating an access frequency of the access source to the user data in a combination of a time period and a day of the week by aggregating the history of accesses by an arbitrary access source to arbitrary user data in an arbitrary time period and an arbitrary day of the week based on the access record information, generates analysis data including the access source, user data, time period, day of the week, and the first index, calculates a second index for evaluating an access tendency of the access source to the user data in the same time period based on the first index included in the analysis data for the same access source and the same time period, generates first access trend data including the access source, user data, time period, day of the week, and the second index, and controls fetching and eviction of the user data from the memory based on the first access trend data corresponding to a time period one time ahead of the current time period. Effect of the Invention

[0008] According to the present invention, the storage device can control the fetching and eviction of user data in the cache area based on the access tendency of the user data. [Brief description of the drawings]

[0009] [Figure 1] FIG. 1 is a diagram illustrating an example of a system configuration according to a first embodiment of the present invention. [Diagram 2] FIG. 13 is a diagram illustrating an example of a data structure of access record information according to the first embodiment. [Diagram 3] FIG. 11 is a diagram illustrating an example of a data structure of access analysis information according to the first embodiment. [Figure 4] 13 is a diagram illustrating an example of a data structure of first cache control information according to the first embodiment; [Diagram 5] 13 is a diagram illustrating an example of a data structure of second cache control information according to the first embodiment; [Figure 6] 11 is a flowchart illustrating an example of an access analysis process executed by a control unit according to the first embodiment. [Figure 7] 11 is a flowchart illustrating an example of a weight calculation process executed by a control unit according to the first embodiment. [Figure 8A] 11 is a flowchart illustrating an example of an access source connection confirmation process executed by a control unit according to the first embodiment. [Figure 8B] 11 is a flowchart illustrating an example of an access source connection confirmation process executed by a control unit according to the first embodiment. [Figure 9] 11 is a flowchart illustrating an example of a cache control process executed by a control unit according to the first embodiment. [Figure 10A] 13 is a flowchart illustrating an example of an access analysis process executed by a control unit according to the second embodiment. [Figure 10B] 13 is a flowchart illustrating an example of an access analysis process executed by a control unit according to the second embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0010] Hereinafter, examples of the present invention will be described with reference to the drawings. However, the present invention should not be interpreted as being limited to the description of the embodiments shown below. It will be easily understood by those skilled in the art that the specific configuration can be changed without departing from the concept or purpose of the present invention.

[0011] In the configurations of the invention described below, the same or similar configurations or functions are given the same reference numerals, and duplicated explanations are omitted.

[0012] In this specification, the terms "first," "second," "third," and the like are used to identify components and do not necessarily limit the number or order. EXAMPLES

[0013] FIG. 1 is a diagram illustrating an example of a system configuration according to a first embodiment of the present invention.

[0014] The system of the first embodiment is configured from a storage device 100 and a host computer 101. The number of host computers 101 connected to the storage device 100 may be two or more.

[0015] The storage apparatus 100 and the host computer 101 may be connected via a network such as a Wide Area Network (WAN), a Local Area Network (LAN), or a Storage Area Network (SAN), or may be directly connected. The connection method may be either wireless or wired.

[0016] The host computer 101 is a computer that writes data to and reads data from the storage apparatus 100. The host computer 101 has a CPU, a memory, a network interface, and an IO interface, none of which are shown.

[0017] The storage apparatus 100 manages user data accessed by the host computer 101. The storage apparatus 100 includes a controller 110 and a plurality of storage media 111. The storage apparatus 100 may include two or more controllers 110.

[0018] The controller 110 controls the storage device 100, and also controls data transfer between the host computer 101 and the storage device 100. The controller 110 includes a processor 120, a memory 121, a connection interface 122, and a storage interface 123. Each component is connected to each other via an internal path.

[0019] The processor 120 executes a program stored in the memory 121. The processor 120 executes the program to realize the functions of the storage device 100. In the following description, when the processing is described mainly with respect to the program, it will be indicated that the program is being executed by the processor 120.

[0020] The memory 121 stores programs executed by the processor 120 and information necessary for executing the programs. The programs and information stored in the memory 121 will be described later. The memory 121 also includes a cache area 140, which is a storage area for temporarily storing data.

[0021] The connection interface 122 is a device for connecting to the host computer 101. The connection interface 122 is, for example, a CA (Channel Adapter) and a NIC (Network Interface Card), etc. The storage interface 123 is a device for connecting to the storage medium 111.

[0022] The storage medium 111 is a device that stores user data. The storage medium 111 is, for example, a hard disk drive (HDD) or a solid state drive (SSD). A RAID may be configured using a plurality of storage media 111. In this embodiment, a file will be described as an example of user data.

[0023] The storage apparatus 100 may have a cache memory separate from the controller 110. Furthermore, the controller 110 may have a cache memory separate from the memory 121.

[0024] Here, a description will be given of the programs and information stored in the memory 121. The memory 121 stores a program that realizes the control unit 130, and also stores access record information 150, access analysis information 151, first cache control information 152, and second cache control information 153. Note that the memory 121 also stores information for managing data stored in the storage medium 111, etc., but this is omitted in this embodiment.

[0025] The control unit 130 performs various controls of the storage apparatus 100. For example, the control unit 130 generates a RAID volume and logically divides the RAID volume to generate an LU. The control unit 130 also provides the generated LU to the host computer 101. In this case, management information indicating the correspondence between the LU and the storage medium 111 is stored in the memory 121. When the control unit 130 receives an I / O request from the host computer 101, the control unit 130 accesses the storage medium 111 that provides the storage area (logical block) that constitutes the LU based on the management information. The control unit 130 also has various functions such as an LU management function, a data transfer function, and a cache control function.

[0026] The control unit 130 of this embodiment is characterized by a cache control function, the details of which will be described later.

[0027] The access record information 150 is information for managing the history of accesses to user data stored in the storage medium 111. The data structure of the access record information 150 will be described with reference to FIG.

[0028] The access analysis information 151 is information for managing the analysis results of the access trends of data during a sample period. The data structure of the access analysis information 151 will be described with reference to FIG. 3. The access analysis information 151 is generated each time an access analysis process, which will be described later, is executed. The memory 121 stores the access analysis information 151 generated during the management period. The management period is, for example, one year. The management period can be set arbitrarily.

[0029] The first cache control information 152 and the second cache control information 153 are information for controlling the fetching of data to the cache area 140 and the eviction of data from the cache area 140. The data structure of the first cache control information 152 will be described with reference to Fig. 4. The data structure of the second cache control information 153 will be described with reference to Fig. 5.

[0030] In the first embodiment, cache control is performed using only the first cache control information 152. Cache control using the first cache control information 152 and the second cache control information 153 will be described in the second embodiment.

[0031] FIG. 2 is a diagram illustrating an example of a data structure of the access record information 150 according to the first embodiment.

[0032] The access record information 150 stores entries (history) including a source ID 201, a file ID 202, a date and time 203, a time 204, and a day of the week 205. One entry exists for one access to any data (file). Note that the fields included in the entry are not limited to those described above.

[0033] The source ID 201 is a field that stores identification information of the source of file access. In the source ID 201 of this embodiment, a user ID that identifies the host computer 101 is stored. The source ID 201 may also store identification information of a program, etc. The file ID 202 is a field that stores identification information of the accessed file. The date and time 203 is a field that stores the access date and time. The time 204 is a field that stores the access time. The day of the week 205 is a field that stores the day of the week of the access date and time.

[0034] FIG. 3 is a diagram showing an example of a data structure of the access analysis information 151 according to the first embodiment.

[0035] The access analysis information 151 stores entries (analysis data) including a source ID 301, a file ID 302, a day of the week 303, a time period 304, and a weight 305. There is one entry for each combination of an access source, a file, a day of the week, and a time period. Note that the fields included in an entry are not limited to those described above.

[0036] Source ID 301 is a field that stores identification information of the access source. File ID 302 is a field that stores identification information of the file to be accessed. Day of the week 303 is a field that stores the day of the week on which the access occurs. Time period 304 is a field that stores the start time of the time period during which the access occurs. In this embodiment, 24 hours are divided into a number of time periods with a unit time span of 10 minutes. The unit time span can be set arbitrarily. Weight 305 is a field that stores a weight for evaluating the access frequency to the file of the access source for the combination of time period and day of the week.

[0037] FIG. 4 is a diagram illustrating an example of the data structure of the first cache control information 152 according to the first embodiment.

[0038] The first cache control information 152 stores entries (first access trend data) including a source ID 401, a file ID 402, a day of the week 403, a time period 404, and a standard deviation value 405. There is one entry for each combination of an access source, a file, a day of the week, and a time period. Note that the fields included in the entry are not limited to those described above.

[0039] The source ID 401, file ID 402, day of the week 403, and time period 404 are the same fields as the source ID 301, file ID 302, day of the week 303, and time period 304. The deviation value 405 is a field for storing the deviation value of the weight for evaluating the access tendency of the access source to the file in the same time period.

[0040] FIG. 5 is a diagram illustrating an example of the data structure of the second cache control information 153 according to the first embodiment.

[0041] The second cache control information 153 stores an entry (second access trend data) including a source ID 501, a file ID 502, a date 503, and a time period 504. One entry exists for each combination of an access source, a file, a date, and a time. Note that the fields included in the entry are not limited to those described above.

[0042] The source ID 501, file ID 502, and time period 504 are the same fields as the source ID 301, file ID 302, and time period 304. The date 503 is a field that stores the date on which the access is performed.

[0043] Next, the cache control function of the control unit 130 will be described.

[0044] When the control unit 130 detects an access to a file, it adds a history of the access to the access record information 150. The values ​​of the date and time 203, the time 204, and the day of the week 205 are set based on time information managed by the control unit 130.

[0045] Fig. 6 is a flowchart illustrating an example of an access analysis process executed by the control unit 130 according to the first embodiment. Fig. 7 is a flowchart illustrating an example of a weight calculation process executed by the control unit 130 according to the first embodiment.

[0046] The control unit 130 periodically executes the access analysis process. The execution period is, for example, once a month. The execution period can be set arbitrarily.

[0047] The control unit 130 copies the previously generated access analysis information 151, reads one month's history from the access record information 150, and starts a loop process of access sources (step S101). Specifically, the control unit 130 generates a list of access sources based on the acquired history, and selects one access source from the list. Note that if the previously generated access analysis information 151 does not exist, the control unit 130 generates empty access analysis information 151.

[0048] The control unit 130 starts a loop process of the files accessed by the selected access source (step S102). Specifically, the control unit 130 generates a list of files accessed by the selected access source based on the acquired history, and selects one file from the list.

[0049] The control unit 130 starts a loop process of the days of the week (step S103). Specifically, the control unit 130 selects the days of the week. In this embodiment, the days of the week are selected in order starting from Sunday.

[0050] The control unit 130 starts loop processing of the time slots (step S104). Specifically, the control unit 130 divides 24 hours into unit time widths and selects one time slot. In this embodiment, the time slots are selected in order starting from "0:00".

[0051] The control unit 130 executes a weight calculation process (step S105). Here, the weight calculation process will be described with reference to FIG.

[0052] The control unit 130 refers to the copied access analysis information 151 and judges whether or not there is an entry whose selected access source, selected file, and selected time period match (step S201). Specifically, the control unit 130 searches for an entry whose combination of values ​​of source ID 301, file ID 302, and time period 304 matches the combination of the selected access source, selected file, and selected time period.

[0053] If an entry that satisfies the condition exists, the control unit 130 proceeds to step S203.

[0054] If there is no entry that satisfies the condition, the control unit 130 adds an entry to the access analysis information 151 (step S202), and then proceeds to step S203. At this time, the control unit 130 sets the selected access source, selected file, selected day of the week, and start time of the selected time period in the source ID 301, file ID 302, day of the week 303, and time period 304 of the added entry. The control unit 130 also sets 0 to the weight 305 of the added entry.

[0055] In step S203, the control unit 130 determines whether or not there was access from the selected access source to the selected file during the selected time period (step S203). Specifically, the control unit 130 determines whether or not there is a history of access from the selected access source to the selected file during the selected time period in the acquired history.

[0056] If there is no access to the selected file from the selected access source during the selected time period, the control unit 130 ends the weight calculation process.

[0057] If the selected file is accessed from the selected access source during the selected time period, the control unit 130 adds "+1" to the weight 305 of the entry (step S204).

[0058] In this embodiment, the index for evaluating the access frequency is not the number of accesses, but the cumulative weight indicating the presence or absence of access during a time period. This makes it possible to select user data that is accessed infrequently but periodically as a target for cache control.

[0059] Control unit 130 determines whether the day of the week when the access occurred matches the selected day of the week (step S205).

[0060] If the day of the week when the access occurred does not match the selected day of the week, the control unit 130 ends the weight calculation process.

[0061] If the day of the week when the access occurred matches the selected day of the week, control unit 130 adds a weight "+2" to weight 305 of the entry (step S206), and then ends the weight calculation process.

[0062] This concludes the explanation of the weight calculation process. Returning to the explanation of FIG.

[0063] The control unit 130 determines whether the process has been completed for all time periods (step S106).

[0064] If the process has not been completed for all time periods, the control unit 130 returns to step S104 and selects a new time period.

[0065] When the process has been completed for all time periods, the control unit 130 determines whether the process has been completed for all days of the week (step S107).

[0066] If the process has not been completed for all days of the week, control unit 130 returns to step S103 and selects a new day of the week.

[0067] When the process has been completed for all days of the week, the control unit 130 determines whether the process has been completed for all files accessed by the selected access source (step S108).

[0068] If the processing has not been completed for all files accessed by the selected access source, the control unit 130 returns to step S102 and selects a new file.

[0069] When the processing is completed for all files accessed by the selected access source, the control unit 130 starts a loop process for the days of the week (step S109). Specifically, the control unit 130 selects a day of the week.

[0070] The control unit 130 starts loop processing of the time periods (step S110). Specifically, the control unit 130 selects one time period.

[0071] The control unit 130 calculates the deviation value of the weight of the file for the selected access source on the selected day of the week and the selected time period (step S111). Specifically, the following process is executed.

[0072] (S111-1) The control unit 130 searches the access analysis information 151 for an entry whose combination of values ​​of the source ID 301, day of the week 303, and time period 304 matches the combination of the selected access source, selected day of the week, and start time of the selected time period. The control unit 130 obtains the value of the weight 305 of the searched entry.

[0073] (S111-2) The control unit 130 calculates the average weight. The control unit 130 also calculates a variance value from the difference between the weight of each file and the average weight. Furthermore, the control unit 130 calculates a standard deviation from the variance value. The weight of each file is w i If the average value is Aw, the number of files is x, the variance value is d, and the standard deviation is Σ, the variance value d is given by equation (1) and the standard deviation Σ is given by equation (2).

[0074]

number

[0075]

number

[0076] (S111-3) The control unit 130 substitutes the weight, average value, and standard deviation of each file into formula (3) to calculate the deviation value of the weight.

[0077]

number

[0078] (S111-4) The control unit 130 adds entries to the first cache control information 152 for the number of files. The control unit 130 sets the selected access source, the selected day of the week, and the start time of the selected time period in the source ID 401, day of the week 403, and time period 404 of each entry. The control unit 130 also sets file identification information in the file ID 402 of each entry, and sets the deviation value of the weight of the file in the deviation value 405 of each entry.

[0079] By using the weight deviation value, it is possible to compare the access frequency of a file on the same day of the week and in the same time period. Also, the weight deviation value is a numerical value that can be compared between different access sources. This concludes the description of the process of step S111.

[0080] The control unit 130 determines whether the process has been completed for all time periods (step S112).

[0081] If the process has not been completed for all time slots, the control unit 130 returns to step S110 and selects a new time slot.

[0082] When the process has been completed for all time periods, the control unit 130 determines whether the process has been completed for all days of the week (step S113).

[0083] If the process has not been completed for all days of the week, control unit 130 returns to step S109 and selects a new day of the week.

[0084] When the process has been completed for all days of the week, the control unit 130 determines whether the process has been completed for all access sources (step S114).

[0085] If the process has not been completed for all access sources, the control unit 130 returns to step S101 and selects a new access source.

[0086] When the process is completed for all access sources, the control unit 130 executes a sort process of the first cache control information 152 (step S115), and then ends the access analysis process. Specifically, the control unit 130 sorts the entries by day of the week, and then sorts the entries by time period.

[0087] In this embodiment, the control unit 130 generates new access analysis information 151 using the previously generated access analysis information 151 and one month's worth of history, but is not limited to this. For example, the control unit 130 may read out four months' worth of history and generate the access analysis information 151 using the history.

[0088] 8A and 8B are flowcharts illustrating an example of an access source connection confirmation process executed by the control unit 130 according to the first embodiment.

[0089] The control unit 130 periodically executes the access source connection confirmation process. The execution period is, for example, one hour. The execution period can be set arbitrarily.

[0090] If the login information cannot be acquired, the control unit 130 executes the access source connection confirmation process of Fig. 8A. First, the control unit 130 starts a loop process of the access source (step S301). Specifically, the control unit 130 reads three months' worth of history from the access record information 150, generates a list of access sources based on the acquired history, and selects one access source from the list.

[0091] The control unit 130 judges whether or not there has been an access from the selected access source within one hour from the present based on the access record information 150 (step S302). Note that the time range of the judgment criterion may be other than one hour.

[0092] If there has been an access from the selected access source within one hour from now, the control unit 130 sets the fetch flag of the selected access source to ON (step S303), and the process proceeds to step S305.

[0093] If there has been no access from the selected access source within one hour from now, the control unit 130 sets the fetch flag of the selected access source to OFF (step S304), and proceeds to step S305.

[0094] In step S305, the control unit 130 determines whether or not the process has been completed for all access sources (step S305).

[0095] If the process has not been completed for all access sources, the control unit 130 returns to step S301 and selects a new access source.

[0096] When the process has been completed for all access sources, the control unit 130 ends the access source connection confirmation process.

[0097] If the login information can be acquired, the control unit 130 executes the access source connection confirmation process of Fig. 8B. First, the control unit 130 starts a loop process of the access source (step S351). The process of step S351 is the same as the process of step S301.

[0098] The control unit 130 determines whether or not the user is currently logged in based on the access record information 150 (step S352).

[0099] If logged in, control unit 130 sets the fetch flag of the selected access source to ON (step S353), and proceeds to step S355.

[0100] If the user is not logged in, control unit 130 sets the fetch flag of the selected access source to OFF (step S354), and the process proceeds to step S355.

[0101] In step S355, control unit 130 determines whether or not the process has been completed for all access sources (step S355).

[0102] If the process has not been completed for all access sources, control unit 130 returns to step S351 and selects a new access source.

[0103] When the process has been completed for all access sources, the control unit 130 ends the access source connection confirmation process.

[0104] FIG. 9 is a flowchart illustrating an example of a cache control process executed by the control unit 130 according to the first embodiment.

[0105] The control unit 130 periodically executes the cache control process. The execution period is, for example, 10 minutes. The execution period can be set arbitrarily.

[0106] The control unit 130 identifies a file to be controlled (step S401). Specifically, the control unit 130 reads an entry in which the current day of the week is stored in the day of the week 403 and the start time of the time period immediately following the time period to which the current time belongs is stored in the time period 404 from the first cache control information 152.

[0107] The control unit 130 determines the file to be fetched based on the deviation value and the fetch flag (step S402). Specifically, the control unit 130 selects an entry whose deviation value 405 is greater than the first threshold value. However, the control unit 130 excludes entries in which the identification information of the access source whose fetch flag is OFF is stored in the source ID 401. The first threshold value can be set arbitrarily.

[0108] The control unit 130 determines the file to be expelled based on the deviation value and the fetch flag (step S403). Specifically, the control unit 130 selects an entry in which an access source with the fetch flag OFF is set in the source ID 401. The control unit 130 also selects an entry in which the deviation value 405 is smaller than the second threshold. The second threshold can be set arbitrarily.

[0109] The control unit 130 evicts the eviction target file from the cache area 140 (step S404), and fetches the fetch target file into the cache area 140 (step S405). After that, the control unit 130 ends the cache control process.

[0110] If it is not possible to fetch all of the files to be fetched into the cache area 140, the control unit 130 selects a predetermined number of files in descending order of deviation value and fetches the selected files. The control unit 130 may also use an existing technique such as LRU to evict files from the cache area 140 and fetch the files to be fetched.

[0111] In the first embodiment, the controller 110 executes all processes related to cache control, but the following modified example is also possible. A control device is provided separately from the storage device 100, and the control device executes the access analysis process and transmits the first cache control information 152 to the storage device 100. In this case, the access analysis information 151 is held by the control device.

[0112] As described above, the storage apparatus 100 of the first embodiment can perform cache control based on the access tendency of user data on any day of the week and in any time period, thereby improving the performance of processing using user data.

[0113] By periodically analyzing access trends, the storage apparatus 100 can perform cache control in accordance with the current access trends, thereby ensuring continuous stable processing performance.

[0114] Since the storage device 100 does not keep specific user data resident therein, the cache area 140 can be used effectively.

[0115] This control method can also be applied to general computers other than the storage device 100. EXAMPLES

[0116] In the second embodiment, cache control is performed using the first cache control information 152 and the second cache control information 153.

[0117] The system configuration of the second embodiment is the same as that of the first embodiment. The hardware configuration and the software configuration of the storage device 100 of the second embodiment are the same as those of the first embodiment.

[0118] The contents of the access analysis process are partially different in the second embodiment. Figures 10A and 10B are flowcharts illustrating an example of the access analysis process executed by the control unit 130 of the second embodiment.

[0119] The processes from step S101 to step S115 are the same as those described in the first embodiment. After step S115, the control unit 130 reads two months' worth of history from the access record information 150, and starts loop processing of the access source (step S116). Specifically, the control unit 130 generates a list of the access sources based on the acquired history, and selects one access source from the list. Note that the range of the history to be read may be other than two months.

[0120] The control unit 130 starts a loop process of the files accessed by the selected access source (step S117). Specifically, the control unit 130 generates a list of files accessed by the selected access source based on the acquired history, and selects one file from the list.

[0121] The control unit 130 starts loop processing of the dates (step S118). Specifically, the control unit 130 selects a date. In this embodiment, the dates from the 1st to the 31st are selected in order.

[0122] The control unit 130 starts loop processing of the time slots (step S119). Specifically, the control unit 130 divides 24 hours into unit time widths and selects one time slot. In this embodiment, the time slots are selected in order starting from "0:00".

[0123] Based on the acquired history, the control unit 130 determines whether the selected file is periodically accessed from the selected access source on the selected date and in the selected time period (step S120). For example, if the file is accessed two or more times in the same time period every month, the control unit 130 determines that the selected file is periodically accessed from the selected access source on the selected date and in the selected time period.

[0124] If periodic access is not being performed, the control unit 130 proceeds to step S122.

[0125] If periodic access is being performed, the control unit 130 adds an entry to the second cache control information 153 (step S121), and then proceeds to step S122. At this time, the control unit 130 sets the selected access source, the selected file, the selected date, and the start time of the selected time period in the source ID 501, file ID 502, date 503, and time period 504 of the added entry.

[0126] In step S122, the control unit 130 determines whether or not the process has been completed for all time periods (step S122).

[0127] If the process has not been completed for all time periods, the control unit 130 returns to step S119 and selects a new time period.

[0128] When the process has been completed for all time periods, the control unit 130 determines whether the process has been completed for all dates (step S123).

[0129] If the process has not been completed for all dates, the control unit 130 returns to step S118 and selects a new date.

[0130] When the processing has been completed for all the dates, the control unit 130 determines whether the processing has been completed for all the files accessed by the selected access source (step S124).

[0131] If the processing has not been completed for all files accessed by the selected access source, the control unit 130 returns to step S117 and selects a new file.

[0132] When the processing has been completed for all files accessed by the selected access source, the control unit 130 determines whether the processing has been completed for all access sources (step S125).

[0133] If the process has not been completed for all access sources, the control unit 130 returns to step S116 and selects a new access source.

[0134] When the process has been completed for all access sources, the control unit 130 ends the access analysis process.

[0135] The access source connection confirmation process of the second embodiment is the same as that of the first embodiment. The cache control process of the second embodiment is partially different from that of the first embodiment.

[0136] In step S401, the control unit 130 reads from the first cache control information 152 an entry in which the current day of the week is stored in the day of the week 403 and the start time of the time period one time after the time period to which the current time belongs is stored in the time period 404. The control unit 130 also reads from the second cache control information 153 an entry in which the current date is stored in the date 503 and the start time of the time period one time after the time period to which the current time belongs is stored in the time period 504.

[0137] In step S402, the control unit 130 selects an entry whose deviation value 405 is greater than the first threshold value. However, the control unit 130 excludes entries in which identification information of an access source whose fetch flag is OFF is stored in the source ID 401. The control unit 130 selects an entry read from the second cache control information 153. However, the control unit 130 excludes entries in which identification information of an access source whose fetch flag is OFF is stored in the source ID 501.

[0138] The processes from step S403 to step S405 are the same as those in the first embodiment.

[0139] In addition, if it is not possible to fetch all of the files to be fetched into the cache area 140, the control unit 130 fetches the files identified based on the second cache control information 153, then selects a predetermined number of files in descending order of deviation value, and fetches the selected files.

[0140] The storage apparatus 100 of the second embodiment can realize cache control that takes into account the access tendency on a specific date and time period.

[0141] The present invention is not limited to the above-mentioned embodiment, but includes various modified examples. The above-mentioned embodiment has been described in detail to easily explain the present invention, and is not necessarily limited to those including all of the configurations described. It is also possible to replace a part of the configuration of one embodiment with the configuration of another embodiment, and it is also possible to add the configuration of another embodiment to the configuration of one embodiment. It is also possible to add, delete, or replace a part of the configuration of each embodiment with another configuration. [Explanation of symbols]

[0142] 100 Storage Device 101 Host computer 110 Controller 111 Storage medium 120 processors 121 Memory 122 Connection Interface 123 Storage Interface 130 Control section 140 cache area 150 Access record information 151 Access analysis information 152 First cache control information 153 Second cache control information

Claims

1. A storage device including a controller and a plurality of storage media, The controller: A memory including a cache area is accessible, managing a history of accesses from an access source to the user data stored in the plurality of storage media as access record information; calculating a first index for evaluating an access frequency of the access source to the user data in a combination of a time period and a day of the week by aggregating the history of access by the access source to the user data in a time period and a day of the week based on the access record information, and generating analysis data including the access source, the user data, the time period, the day of the week, and the first index; calculating a second index for evaluating an access trend of an arbitrary access source to the user data in the same time period based on the first index included in the analysis data for the same access source and the same time period, and generating first access trend data including the access source, the user data, the time period, the day of the week, and the second index; A storage device comprising: a storage unit that controls fetching and flushing of user data from the memory based on the first access trend data corresponding to a time period one time ahead of a current time period.

2. 2. The storage device according to claim 1, The storage device according to claim 1, wherein the controller calculates a deviation value of the first index as the second index.

3. 3. The storage device according to claim 2, A storage device characterized in that the controller determines the user data to be fetched into the memory and the user data to be evicted from the memory based on a comparison result between the second indicator and a threshold value.

4. 4. The storage device according to claim 3, The controller: confirming a connection state of the access source that uses the storage device; searching for the first access trend data corresponding to a time period one time ahead of a current time period, the first access trend data corresponding to the access source that is not connected; A storage device comprising: a storage unit that determines the user data corresponding to the searched first access trend data as user data to be purged from the memory.

5. 3. The storage device according to claim 2, The controller: aggregating the history of accesses made by an arbitrary access source to arbitrary user data on arbitrary dates and in arbitrary time periods based on the access record information, thereby identifying a combination of dates and time periods on which the access source periodically accesses the user data, and generating second access trend data including the access source, the user data, the dates, and the time periods; A storage device characterized by controlling the fetching and eviction of user data from the memory based on the first access trend data and the second access trend data corresponding to a time period one time ahead of a current time period.

6. 6. The storage device according to claim 5, The controller: determining the user data corresponding to the second access trend data as user data to be fetched into the memory; A storage device characterized by determining, based on a comparison result between the second indicator and a threshold value, from among the user data corresponding to the first access trend data corresponding to a time period one time beyond the current time period, the user data to be fetched into the memory and the user data to be evicted from the memory.

7. 7. The storage device according to claim 6, The controller: confirming a connection state of the access source that uses the storage device; excluding the second access trend data corresponding to the access source that is not connected from the second access trend data corresponding to a time period one time ahead of the current time period; searching for the first access trend data corresponding to a time period one time ahead of a current time period, the first access trend data corresponding to the access source that is not connected; A storage device comprising: a storage unit that determines the user data corresponding to the searched first access trend data as user data to be purged from the memory.

8. A cache control method executed by a storage device having a controller and a plurality of storage media, comprising: The controller: A memory including a cache area is accessible, managing a history of accesses from an access source to the user data stored in the plurality of storage media as access record information; The cache control method includes: a first step in which the controller calculates a first index for evaluating an access frequency of an access source to the user data in a combination of a time period and a day of the week by aggregating the history of accesses of the access source to the user data in a time period and a day of the week based on the access record information, and generates analysis data including the access source, the user data, the time period, the day of the week, and the first index; a second step in which the controller calculates a second index for evaluating an access trend of an arbitrary access source to the user data in the same time period based on the first index included in the analysis data for the same access source and the same time period, and generates first access trend data including the access source, the user data, the time period, the day of the week, and the second index; A cache control method characterized by including a third step in which the controller controls the fetching and eviction of the user data from the memory based on the first access trend data corresponding to a time period one time beyond the current time period.

9. 9. A cache control method according to claim 8, comprising: A cache control method, wherein the second step includes a step in which the controller calculates a deviation value of the first index as the second index.

10. 10. A cache control method according to claim 9, comprising: The cache control method, characterized in that the third step includes a step in which the controller determines the user data to be fetched into the memory and the user data to be evicted from the memory based on the result of comparing the second indicator with a threshold value.

11. 11. A cache control method according to claim 10, comprising: a step of the controller confirming a connection state of the access source that uses the storage device, The third step includes: a step of searching for the first access trend data corresponding to a time period one time ahead of a current time period and corresponding to an access source that is not connected, by the controller; and a step in which the controller determines that the user data corresponding to the searched first access trend data is to be evicted from the memory.

12. 10. A cache control method according to claim 9, comprising: the controller specifies a combination of a date and a time period during which an arbitrary access source periodically accesses the user data by aggregating the history of accesses made by the arbitrary access source to arbitrary user data on an arbitrary date and in an arbitrary time period based on the access record information, and generates second access trend data including the access source, the user data, the date, and the time period; A cache control method characterized in that the third step includes a step in which the controller controls the fetching and eviction of the user data from the memory based on the first access trend data and the second access trend data corresponding to a time period one time beyond the current time period.

13. 13. A cache control method according to claim 12, comprising: The third step includes: determining, by the controller, the user data corresponding to the second access trend data as the user data to be fetched into the memory; A cache control method characterized by including a step in which the controller determines, based on a comparison result between the second indicator and a threshold value, the user data to be fetched into the memory and the user data to be evicted from the memory from among the user data corresponding to the first access trend data corresponding to the time period one time beyond the current time period.

14. 14. A cache control method according to claim 13, comprising: a step of the controller confirming a connection state of the access source that uses the storage device, The third step includes: the controller excluding, from the second access trend data corresponding to a time period one time ahead of a current time period, the second access trend data corresponding to the access source that is not connected; a step of searching for the first access trend data corresponding to a time period one time ahead of a current time period and corresponding to an access source that is not connected, by the controller; and a step in which the controller determines that the user data corresponding to the searched first access trend data is to be evicted from the memory.

Citation Information

Patent Citations

  • Hierarchical storage device and its controller

    JP2003216460A

  • Image processing device

    JP2004334592A

  • Control unit, storage system, and memory control method

    JP2009157749A

  • Storage control device and storage control program

    JP2016051425A

  • Predictive Paging to Accelerate Memory Access

    US20200019506A1