# US 2014/0156610 A1 · Self-governed contention-aware approach to scheduling file defragmentation

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2014/0156610 A1
- Document ID: US20140156610A1
- Status: Published application
- Kind: A1
- Application number: 13/691,599
- Filed: 2012-11-30
- Published: 2014-06-05
- Earliest claimed: 2012-11-30
- Assignees: Oracle International Corporation
- Applicants: Oracle International Corporation
- Inventors: David AKERS; Diane LEBEL
- Web page: https://patentgrep.com/patent/US20140156610A1

## CPC

- G06F 16/1724: {Details of de-fragmentation performed by the file system (saving storage space on storage systems G06F3/0608; management of blocks in storage devices G06F3/064)}
- G06F 2206/1004: Defragmentation
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method, system, and computer program product for file storage defragmentation on a cluster of nodes. The method for self-governed, contention-aware scheduling of file defragmentation operations commences by calculating a score for candidate files of a storage volume, where the score is based on a fragmentation severity value. The process proceeds to determine an amount of contention for access to a candidate file (e.g., by accessing the candidate file to record the amount of time it takes to obtain access). If the fragmentation severity value and the amount of contention suggestion a benefit from defragmentation, then the method initiating defragmentation operations on the candidate file. The method delays for a calculated wait time before performing a second defragmentation operation. Real-time monitors are used to determine when the contention is too high or when system utilization is too high. Only files that have ever been opened are considered candidates for defragmentation.

## Claims

### Claim 1

A computer implemented method for self-governed, contention-aware scheduling of file defragmentation, comprising:
selecting a plurality of files of a storage volume using a score, at least some of the files to initiate a defragmentation operation, the score based at least in part on a fragmentation severity value of a respective candidate file;
executing, by a computer, a process to determine an amount of contention of access to a candidate file;
initiating a first defragmentation operation on the candidate file when the contention is determined to be below a contention threshold value; and
delaying, for a calculated wait time, a second defragmentation operation on the candidate file upon occurrence of at least one of:
determination that a second contention amount is above a contention threshold value or
determination that a system utilization value is above a headroom threshold value.

### Claim 2 (depends on 1)

The method of claim 1, wherein the candidate files are files selected using at least one of, an aspect of volume metadata, an open flag, or monitoring of a file open command.

### Claim 3 (depends on 1)

The method of claim 1, wherein the amount of contention of access to the candidate file is determined based at least in part on accessing the candidate file to record the amount of time it takes to obtain access.

### Claim 4 (depends on 1)

The method of claim 1, wherein the amount of contention of access to the candidate file is determined based at least in part on a measure that predicts a likelihood of future contention.

### Claim 5 (depends on 1)

The method of claim 1, wherein the calculated wait time is based at least in part on a value from a performance meter.

### Claim 6 (depends on 1)

The method of claim 1, wherein the calculated wait time is zero when a respective node of the cluster is deemed idle.

### Claim 7 (depends on 1)

The method of claim 1, wherein calculating the score of the plurality of candidate files is based at least in part on an ever opened flag.

### Claim 8

A computer system for self-governed, contention-aware scheduling of file defragmentation, comprising:
a computer processor to execute a set of program code instructions; and
a memory to hold the program code instructions, in which the program code instructions comprises program code to perform,
selecting a plurality of files of a storage volume using a score, at least some of the files to initiate a defragmentation operation, the score based at least in part on a fragmentation severity value of a respective candidate file;
executing a process to determine an amount of contention of access to a candidate file;
initiating a first defragmentation operation on the candidate file when the contention is determined to be below a contention threshold value; and
delaying, for a calculated wait time, a second defragmentation operation on the candidate file upon occurrence of at least one of:
determination that a second contention amount is above a contention threshold value or
determination that a system utilization value is above a headroom threshold value.

### Claim 9 (depends on 8)

The computer system of claim 8, wherein the candidate files are files selected using at least one of, an aspect of volume metadata, an open flag, or monitoring of a file open command.

### Claim 10 (depends on 8)

The computer system of claim 8, wherein the amount of contention of access to the candidate file is determined based at least in part on accessing the candidate file to record the amount of time it takes to obtain access.

### Claim 11 (depends on 8)

The computer system of claim 8, wherein the amount of contention for access to the candidate file is determined based at least in part on a measure that predicts a likelihood of future contention.

### Claim 12 (depends on 8)

The computer system of claim 8, wherein the calculated wait time is based at least in part on a value from a performance meter.

### Claim 13 (depends on 8)

The computer system of claim 8, wherein the calculated wait time is zero when a respective node of the cluster is deemed idle.

### Claim 14 (depends on 8)

The computer system of claim 8, wherein calculating the score of the plurality of candidate files is based at least in part on an ever opened flag.

### Claim 15

A computer program product embodied in a non-transitory computer readable medium, the computer readable medium having stored thereon a sequence of instructions which, when executed by a processor causes the processor to execute self-governed, contention-aware scheduling of file defragmentation, the process comprising:
selecting a plurality of files of a storage volume using a score, at least some of the files to initiate a defragmentation operation, the score based at least in part on a fragmentation severity value of a respective candidate file;
executing a process to determine an amount of contention of access to a candidate file;
initiating a first defragmentation operation on the candidate file when the contention is determined to be below a contention threshold value; and
delaying, for a calculated wait time, a second defragmentation operation on the candidate file upon occurrence of at least one of:
determination that a second contention amount is above a contention threshold value or
determination that a system utilization value is above a headroom threshold value.

### Claim 16 (depends on 15)

The computer program product of claim 15, wherein the candidate files are files selected using at least one of, an aspect of volume metadata, an open flag, or monitoring of a file open command.

### Claim 17 (depends on 15)

The computer program product of claim 15, wherein the amount of contention of access to the candidate file is determined based at least in part on accessing the candidate file to record the amount of time it takes to obtain access.

### Claim 18 (depends on 15)

The computer program product of claim 15, wherein the amount of contention of access to the candidate file is determined based at least in part on a measure that predicts a likelihood of future contention.

### Claim 19 (depends on 15)

The computer program product of claim 15, wherein the calculated wait time is based at least in part on a value from a performance meter.

### Claim 20 (depends on 15)

The computer program product of claim 15, wherein the calculated wait time is zero when a respective node of the cluster is deemed idle.

### Claim 21

A computer implemented method for self-governed, contention-aware scheduling of file defragmentation, comprising:
selecting a plurality of files suitable to initiate at least one defragmentation operation;
initiating a first defragmentation operation on a candidate file, the candidate file selected from plurality of files,
delaying, for a calculated wait time, a second defragmentation operation on the candidate file upon occurrence of at least one of:
determination that a second contention amount is above a contention threshold value or
determination that a system utilization value is above a headroom threshold value.

### Claim 22 (depends on 21)

The method of claim 21, wherein the candidate file is selected using at least one of, an aspect of volume metadata, an open flag, or monitoring of a file open command.

### Claim 23 (depends on 21)

The method of claim 21, wherein the amount of contention of access to the candidate file is determined based at least in part on accessing the candidate file to record the amount of time it takes to obtain access.

### Claim 24 (depends on 21)

The method of claim 21, wherein the amount of contention of access to the candidate file is determined based at least in part on a measure that predicts a likelihood of future contention.

### Claim 25 (depends on 21)

The method of claim 21, wherein the calculated wait time is based at least in part on a value from a performance meter.
