# US 2021/0334011 A1 · Read/write request processing method and apparatus, electronic device, and storage medium

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

- Number: US 2021/0334011 A1
- Document ID: US20210334011A1
- Status: Published application
- Kind: A1
- Application number: 17/372,250
- Filed: 2021-07-09
- Published: 2021-10-28
- Earliest claimed: 2019-01-10
- Assignees: Huawei Technologies Co., Ltd.; Tsinghua University
- Applicants: Huawei Technologies Co., Ltd.; Tsinghua University
- Inventors: Jiwu SHU; Youmin CHEN; Youyou LU; Wenlin CUI
- Web page: https://patentgrep.com/patent/US20210334011A1

## CPC

- G06F 3/0613: {in relation to throughput}
- G06F 9/5061: {Partitioning or combining of resources}
- G06F 3/0604: {Improving or facilitating administration, e.g. storage management}
- G06F 3/061: {Improving I/O performance}
- G06F 3/0659: {Command handling arrangements, e.g. command buffers, queues, command scheduling}
- G06F 3/067: {Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]}
- G06F 9/4881: {Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues}
- G06F 3/0637: {Permissions}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A read/write request processing method and server are provided. In this method, each terminal is grouped, and different service durations are assigned for all terminal groups, so that a server can process, within any service duration, only a read/write request sent by a terminal in a terminal group corresponding to the service duration. According to the application, a cache area of a network interface card of the server is enabled to store only limited quantities of queue pairs (QPs) and work queue elements (WQEs), thereby preventing uneven resource distribution in the cache area of the network interface card.

## Claims

### Claim 1

A read/write request processing method, wherein the method is performed by a server and comprises:
receiving, within a service duration, a read/write request sent by a terminal in a terminal group corresponding to the service duration, wherein each terminal group comprises at least one terminal; and
processing the read/write request sent by the terminal in the terminal group corresponding to the service duration, and skipping processing a read/write request sent by a terminal in a terminal group corresponding to another service duration.

### Claim 2 (depends on 1)

The method according to claim 1, further comprising:
determining priorities of a plurality of terminals; and
assigning terminals having a same priority into one terminal group, wherein each terminal group corresponds to one priority.

### Claim 3 (depends on 2)

The method according to claim 2, wherein the determining the priorities of the plurality of terminals comprises:
obtaining throughputs of the plurality of terminals within a preset time and an average data volume of read/write requests of each terminal; and
determining a priority of each terminal based on the throughput of the terminal and the average data volume of the read/write requests of the terminal.

### Claim 4 (depends on 3)

The method according to claim 3, wherein the determining the priority of each terminal based on the throughput of the terminal and the average data volume of the read/write requests of the terminal comprises:
determining the priority of the terminal based on a weight parameter of the terminal, the throughput of the terminal, and the average data volume of the read/write requests of the terminal.

### Claim 5 (depends on 2)

The method according to claim 2, further comprising:
determining a preset quantity of terminals of each terminal group based on a priority of the terminal group;
splitting the terminal group into a plurality of terminal groups in response to a quantity of terminals in the terminal group being greater than the preset quantity of terminals of the terminal group; and
combining at least one first terminal group with the terminal group, to obtain a second terminal group, in response to a quantity of terminals in the terminal group being less than the preset quantity of terminals of the terminal group, wherein a quantity of terminals in the second terminal group is not greater than a preset quantity of terminals of the second terminal group, a priority of the second terminal group depends on priorities of most terminals in the second terminal group, and a priority of the first terminal group is the same as the priority of the terminal group or a difference between the priority of the first terminal group and the priority of the terminal group is less than a preset value.

### Claim 6 (depends on 2)

The method according to claim 2, further comprising:
determining a maximum quantity of terminals of each terminal group based on a processing capacity of the server and a priority of the terminal group;
splitting the terminal group into a plurality of terminal groups in response to a quantity of terminals in the terminal group being greater than the maximum quantity of terminals of the terminal group; and
combining at least one third terminal group with the terminal group, to obtain a fourth terminal group in response to a quantity of terminals in the terminal group being less than the maximum quantity of terminals of the terminal group, wherein a quantity of terminals in the fourth terminal group is not greater than a maximum quantity of terminals of the fourth terminal group, a priority of the fourth terminal group depends on priorities of most terminals in the fourth terminal group, and a priority of the third terminal group is the same as the priority of the terminal group or a difference between the priority of the third terminal group and the priority of the terminal group is less than a preset value.

### Claim 7 (depends on 2)

The method according to claim 2, further comprising:
assigning different service durations for the terminal groups based on priorities of the terminal groups by using a first preset service duration as a reference duration, wherein the assigned service durations fall within a present range of the first preset service duration.

### Claim 8 (depends on 1)

The method according to claim 1, wherein the processing, within any service duration, the read/write request sent by the terminal in the terminal group corresponding to the service duration comprises:
obtaining a to-be-processed terminal group from a wait queue based on a storage sequence in the wait queue, wherein the wait queue is used to store the terminal groups;
each time a terminal group is obtained, processing a read/write request sent by a terminal in the terminal group within a service duration corresponding to the terminal group; and
stopping processing a read/write request sent by the terminal in the terminal group after the service duration corresponding to the terminal group elapses, and storing the terminal group at an end of the wait queue.

### Claim 9 (depends on 8)

The method according to claim 8, wherein the wait queue is used to store each terminal group based on the priority of the terminal group.

### Claim 10 (depends on 1)

The method according to claim 1, further comprising:
reducing the service duration corresponding to the terminal group in response to the service duration corresponding to the terminal group satisfying a service processing requirement of the terminal in the terminal group and there being still a remaining duration; and
increasing the service duration corresponding to the terminal group in response to the service duration corresponding to the terminal group not satisfying a service processing requirement of the terminal in the terminal group.

### Claim 11 (depends on 1)

The method according to claim 1, wherein before the processing, within any service duration, the read/write request sent by the terminal in the terminal group corresponding to the service duration, the method further comprises:
sending a response to the terminal in the terminal group corresponding to the service duration, wherein the response instructs the terminal to send a read/write request to the server.

### Claim 12 (depends on 1)

The method according to claim 1, further comprising:
storing information about a terminal in each terminal group; and
processing a read/write request sent by the terminal in the terminal group based on the stored information about the terminal in the terminal group after the server is restarted.

### Claim 13 (depends on 1)

The method according to claim 1, further comprising:
storing a priority of each terminal; and
grouping the terminal based on the stored priority of the terminal after the server is restarted.

### Claim 14

A server, comprising:
a network interface card (NIC); and
a processor coupled to the NIC;
at least one of the processor and the NIC configured to:
receive, within a service duration, a read/write request sent by a terminal in a terminal group corresponding to the service duration, wherein each terminal group comprises at least one terminal; and
process the read/write request sent by the terminal in the terminal group corresponding to the service duration, and skip processing a read/write request sent by a terminal in a terminal group corresponding to another service duration.

### Claim 15 (depends on 14)

The server according to claim 14, wherein the at least one of the processor and the NIC is further configured to:
determine priorities of a plurality of terminals; and
assign terminals having a same priority into one terminal group, wherein each terminal group corresponds to one priority.

### Claim 16 (depends on 14)

The server according to claim 14, wherein the at least one of the processor and the NIC is further configured to:
obtain a to-be-processed terminal group from a wait queue based on a storage sequence in the wait queue, wherein the wait queue is used to store the terminal groups;
each time a terminal group is obtained, process a read/write request sent by a terminal in the terminal group within a service duration corresponding to the terminal group; and
stop processing a read/write request sent by the terminal in the terminal group after the service duration corresponding to the terminal group elapses, and store the terminal group at an end of the wait queue.

### Claim 17 (depends on 14)

The server according to claim 14, wherein the at least one of the processor and the NIC is further configured to:
a reduce the service duration corresponding to the terminal group when the service duration corresponding to the terminal group satisfies a service processing requirement of the terminal in the terminal group and there is still a remaining duration; and
increase the service duration corresponding to the terminal group when the service duration corresponding to the terminal group does not satisfy a service processing requirement of the terminal in the terminal group.

### Claim 18 (depends on 14)

The server according to claim 14, wherein the at least one of the processor and the NIC is further configured to:
store a priority of each terminal; wherein
group the terminal based on the stored priority of the terminal after the server is restarted.
