# US 2021/0279196 A1 · Dynamic Command Scheduling for Storage System

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

- Number: US 2021/0279196 A1
- Document ID: US20210279196A1
- Status: Published application
- Kind: A1
- Application number: 17/330,286
- Filed: 2021-05-25
- Published: 2021-09-09
- Earliest claimed: 2017-05-19
- Assignees: Western Digital Technologies, Inc.
- Applicants: Western Digital Technologies, Inc.
- Inventors: Scott JINN; Yun-Tzuo LAI; Haining LIU; Yuriy PAVLENKO
- Web page: https://patentgrep.com/patent/US20210279196A1

## CPC

- G06F 13/374: using a self-select method with individual priority code comparator
- G06F 13/26: with priority control
- G06F 9/4843: {by program, e.g. task dispatcher, supervisor, operating system}
- G06F 9/4881: {Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues}
- G06F 9/5038: {considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration (scheduling strategies G06F9/4881 and subgroups)}
- G06F 2209/484: Precedence
- H04W 74/002: {Transmission of channel access control information}
- H04W 74/0875: {with assigned priorities based access}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H04W: WIRELESS COMMUNICATION NETWORKS (broadcast communication H04H; communication systems using wireless links for non-selective communication, e.g. wireless extensions H04M1/72)

## Abstract

The subject technology provides for managing a data storage system. Commands are identified into as a first command type or a second command type. The commands identified as the first command type are assigned to a first queue, and the commands identified as the second command type are assigned to a second queue. After the commands from the first queue and the commands from the second queue are processed based on a scheduling ratio over a predetermined period of time, a write amplification factor, number of host read commands, and number of host write commands during the predetermined period of time are determined. The scheduling ratio is updated based on the write amplification, the number of host read commands, the number of host write commands, and a predetermined scheduling ratio factor. Subsequent commands are processed from the first queue and the second queue based on the updated scheduling ratio.

## Claims

### Claim 1

A storage system, comprising:
memories; and
one or more controllers configured to cause:
receiving a command from a host system;
based on a type of the received command, determining the received command as a high priority command or a low priority command, wherein determining the received command comprises:
when the received command is a host read command or an error correction command, determining the received command as the high priority command and assigning the received command to a high priority queue; and
when the received command is an internal write command, an internal erase command or an internal read command generated by the one or more controllers, determining the received command as the low priority command and assigning the received command to a low priority queue; and
processing commands from the high priority queue and the low priority queue based on a scheduling ratio, wherein the scheduling ratio indicates a ratio between a number of one or more commands from the high priority queue to be processed and a number of one or more commands from the low priority queue to be processed.

### Claim 2 (depends on 1)

The storage system of claim 1, wherein the scheduling ratio is the ratio between:
a number of operation commands from the high priority queue to be processed, and
every predetermined number of operation commands from the low priority queue to be processed.

### Claim 3 (depends on 1)

The storage system of claim 1, wherein:
the scheduling ratio is adjustable;
the scheduling ratio is initially an initial scheduling ratio; and
the initial scheduling ratio is based on an average read latency of host read commands.

### Claim 4 (depends on 1)

The storage system of claim 1, wherein:
the scheduling ratio is initially an initial scheduling ratio; and
the initial scheduling ratio is based on:
an average read latency of host read commands, and
different levels of overprovisioning in the storage system.

### Claim 5 (depends on 1)

The storage system of claim 1, wherein:
the scheduling ratio is adjustable;
the scheduling ratio is initially an initial scheduling ratio;
the initial scheduling ratio is determined by:
processing given operation commands based on a given scheduling ratio;
monitoring an average read latency of host read commands during the processing of the given operation commands; and
determining when the processing of the given operation commands produces a target read latency of host read commands;
the given scheduling ratio is adjusted until the target average read latency of host read commands is produced; and
when the target average read latency of host read commands is produced, the initial scheduling ratio is set using the adjusted given scheduling ratio.

### Claim 6 (depends on 5)

The storage system of claim 5, wherein: the initial scheduling ratio is set using the adjusted given scheduling ratio and based on different levels of overprovisioning in the storage system.

### Claim 7 (depends on 1)

The storage system of claim 1,
wherein the one or more controllers are configured to cause:
determining a write amplification factor of the storage system; and
determining a number of read commands and a number of write commands received during a respective duration;
generating an updated scheduling ratio; and
processing additional commands based on the updated scheduling ratio,
wherein the updated scheduling ratio is based on a representation that is:
proportional to the number of read commands received during the respective duration,
proportional to a scheduling ratio factor that is based on a prior scheduling ratio,
inversely proportional to the number of write commands received during the respective duration, and
inversely proportional to the write amplification factor, and
wherein the write amplification factor corresponds to a number of write operations performed for every host write command received from the host system.

### Claim 8 (depends on 1)

The storage system of claim 1,
wherein the one or more controllers are configured to cause:
generating an updated scheduling ratio; and
processing additional commands based on the updated scheduling ratio,
wherein the updated scheduling ratio is generated based on the following equation:
A
B
·
C
·
D
=
E
wherein:
A is a number of read commands received during a respective duration,
B is a number of write commands received during the respective duration,
C is a write amplification factor,
D is a scheduling ratio factor determined based on the scheduling ratio, A, B, and
C, and
E is the updated scheduling ratio.

### Claim 9 (depends on 8)

The storage system of claim 8, wherein the write amplification factor corresponds to a number of write operations performed for every host write command received from the host system.

### Claim 10

A method for a storage system, comprising:
receiving a command from a host system;
based on a type of the received command, determining the received command as a high priority command or a low priority command, wherein determining the received command comprises:
when the received command is a host read command or an error correction command, determining the received command as the high priority command and assigning the received command to a high priority queue; and
when the received command is an internal write command, an internal erase command or an internal read command, determining the received command as the low priority command and assigning the received command to a low priority queue; and
processing commands from the high priority queue and the low priority queue based on a scheduling ratio, wherein the scheduling ratio indicates a ratio between a number of one or more commands from the high priority queue to be processed and a number of one or more commands from the low priority queue to be processed.

### Claim 11 (depends on 10)

The method of claim 10, wherein the scheduling ratio is the ratio between:
a number of operation commands from the high priority queue to be processed, and
every predetermined number of operation commands from the low priority queue to be processed.

### Claim 12 (depends on 10)

The method of claim 10, wherein:
the scheduling ratio is adjustable;
the scheduling ratio is initially an initial scheduling ratio; and
the initial scheduling ratio is based on an average read latency of host read commands.

### Claim 13 (depends on 10)

The method of claim 10, wherein:
the scheduling ratio is initially an initial scheduling ratio; and
the initial scheduling ratio is based on:
an average read latency of host read commands, and
different levels of overprovisioning in the storage system.

### Claim 14 (depends on 10)

The method of claim 10, wherein:
the scheduling ratio is initially an initial scheduling ratio;
the initial scheduling ratio is determined based on:
processing given operation commands based on a given scheduling ratio; and
monitoring an average read latency of host read commands during the processing of the given operation commands;
the given scheduling ratio is adjusted until a target average read latency of host read commands is produced; and
when the target average read latency of host read commands is produced, the initial scheduling ratio is set using the adjusted given scheduling ratio.

### Claim 15 (depends on 14)

The method claim 14, wherein: the initial scheduling ratio is set using the adjusted given scheduling ratio and based on different levels of overprovisioning in the storage system.

### Claim 16 (depends on 10)

The method of claim 10, comprising:
determining a write amplification factor of the storage system; and
determining a number of read commands and a number of write commands received during a respective duration;
generating an updated scheduling ratio; and
processing additional commands based on the updated scheduling ratio,
wherein the updated scheduling ratio is based on a representation that is:
proportional to the number of read commands received during the respective duration,
proportional to a scheduling ratio factor that is based on a prior scheduling ratio,
inversely proportional to the number of write commands received during the respective duration, and
inversely proportional to the write amplification factor, and
wherein the write amplification factor corresponds to a number of write operations performed for every host write command received from the host system.

### Claim 17 (depends on 10)

The method of claim 10, comprising:
generating an updated scheduling ratio; and
processing additional commands based on the updated scheduling ratio,
wherein the updated scheduling ratio is generated based on the following equation:
A
B
·
C
·
D
=
E
wherein:
A is a number of read commands received during a respective duration,
B is a number of write commands received during the respective duration,
C is a write amplification factor,
D is a scheduling ratio factor determined based on the scheduling ratio, A, B, and
C, and
E is the updated scheduling ratio.

### Claim 18

A storage apparatus, comprising:
means for receiving a command from a host system;
means for, based on a type of the received command, determining the received command as a high priority command or a low priority command, wherein the means for determining the received command comprises:
when the received command is a host read command or an error correction command, means for determining the received command as the high priority command and assigning the received command to a high priority queue; and
when the received command is an internal write command, an internal erase command or an internal read command, means for determining the received command as the low priority command and assigning the received command to a low priority queue; and
means for processing commands from the high priority queue and the low priority queue based on a scheduling ratio, wherein the scheduling ratio indicates a ratio between a number of one or more commands from the high priority queue to be processed and a number of one or more commands from the low priority queue to be processed.

### Claim 19 (depends on 18)

The storage apparatus of claim 18, comprising:
means for generating an updated scheduling ratio; and
means for processing additional commands based on the updated scheduling ratio,
wherein the means for generating the updated scheduling ratio is based on the following equation:
A
B
·
C
·
D
=
E
wherein:
A is a number of read commands received during a respective duration,
B is a number of write commands received during the respective duration,
C is a write amplification factor,
D is a scheduling ratio factor determined based on the scheduling ratio, A, B, and
C, and
E is the updated scheduling ratio.

### Claim 20 (depends on 18)

The storage apparatus of claim 18, comprising:
means for determining a write amplification factor of the storage apparatus; and
means for determining a number of read commands and a number of write commands received during a respective duration;
means for generating an updated scheduling ratio; and
means for processing additional commands based on the updated scheduling ratio,
wherein the means for generating the updated scheduling ratio is based on a representation that is:
proportional to the number of read commands received during the respective duration,
proportional to a scheduling ratio factor that is based on a prior scheduling ratio,
inversely proportional to the number of write commands received during the respective duration, and
inversely proportional to the write amplification factor, and
wherein the write amplification factor corresponds to a number of write operations performed for every host write command received from the host system.
