Heuristic journal reservations
AssigneeQuantum Corporation
InventorStephen P. Lord
Life of this patent
Estimating the term…
Abstract
Example apparatus and methods reserve space in a journal using an observation based approach instead of a fixed sized approach or a worst case scenario approach. One example method receives a request to allocate space in a journal to support a file system transaction. The example method reserves an amount of space in the journal based on a pre-existing reservation size estimate. Unlike conventional systems, the estimate is not based on a worst-case scenario. The example method observes the actual amount of storage used in the journal by the file system transaction and then selectively automatically adjusts the pre-existing reservation size estimate. The estimate may slowly shrink if no overflows are encountered but may quickly grow if an overflow is detected.
Claims17
A non-transitory computer-readable storage medium storing computer executable instructions that when executed by a computer control the computer to perform a method, the method comprising:
- detecting a file system transaction;
- accessing a journal impact estimate for the file system transaction;
- determining a predicted journal usage for the file system transaction as a function of the journal impact estimate;
- allocating storage in a journal as a function of the predicted journal usage;
- observing an actual amount of storage used in the journal by transactions of the type of the file system transaction;
- and
- selectively automatically adjusting the journal impact estimate as a function of a variance between the observed journal usage and the predicted journal usage, where selectively automatically adjusting the journal impact estimate includes adjusting the journal impact estimate at a rate determined as a function of observations of N previous file system transactions, N being an integer greater than one, and the selectively automatically adjusting comprising:
- upon determining that the observed journal usage was less than the predicted journal usage by a first threshold amount, selectively automatically adjusting the journal impact estimate down, where the first threshold amount is less than one standard deviation from the predicted journal usage;
- or
- upon determining that the observed journal usage was greater than the predicted journal usage by a second threshold amount, selectively automatically adjusting the journal impact estimate up at a pre-determined rate, where the second threshold amount is less than one standard deviation from the predicted journal usage.
A system, comprising:
- means for detecting a file system transaction;
- means for accessing a journal impact estimate for the file system transaction;
- means for determining a predicted journal usage for the file system transaction as a function of the journal impact estimate;
- means for allocating storage in a journal as a function of the predicted journal usage, where the storage is configured to accommodate a plurality of atomic operations associated with completing a file system transaction of a first type, where the amount of storage allocated is a function of an existing reservation size associated with the first type;
- and
- means for selectively automatically adjusting the journal impact estimate as a function of a variance between an observed journal usage and the predicted journal usage, where the means for selectively automatically adjusting the journal impact estimate is configured to reduce the existing journal impact estimate upon determining that the actual amount of storage used in the journal by the file system transaction was less than the amount of storage allocated, where the existing journal impact estimate is reduced at a first rate, where the first rate is a function of a decaying rolling average of observed storage used, and a weighted rolling average of observed storage used, a pre-determined reduction amount, a pre-determined reduction factor, a dynamic reduction amount, or a dynamic reduction factor, and
- where the means for selectively automatically adjusting the journal impact estimate as a function of a variance between an observed journal usage and the predicted journal usage is configured to increase the journal impact estimate upon determining that the actual amount of storage used in the journal by the file system transaction caused an overflow condition, where the journal impact estimate is increased at a second rate according to a pre-determined increase factor, where the second rate is at least twice as great as the first rate.
A non-transitory computer-readable storage medium storing instructions that when executed by a computer control the computer to perform a method, the method comprising:
- reserving an amount of storage in a journal, where the amount of storage accommodates a plurality of atomic operations associated with completing a file system transaction of a first type, where the amount of storage reserved is a function of an existing reservation size associated with the first type;
- reserving additional storage in the journal, where the additional storage is configured to accommodate an overflow of the journal;
- observing an actual amount of storage used in the journal by transactions of the type of the file system transaction;
- upon determining that the actual amount of storage used in the journal by the file system transaction was less than the amount of storage reserved:
- reducing the existing reservation size at a first rate;
- upon determining that the actual amount of storage used in the journal by the file system transaction caused an overflow condition:
- increasing the existing reservation size at a second rate.
Dependencies are inferred from the claim text.