IP Library Granted Patent US 12693788
Granted Patent B2
US 12693788 · App. 18/929,838 · Granted Jul 28, 2026

Method, device, and computer program product for wear leveling

Inventors: Hailan Dong (Chengdu, CN); Chi Chen (Chengdu, CN); Huijuan Fan (Chengdu, CN)
Assignee: Dell Products L.P.
G06F3/0616G06F3/0653G06F3/0659G06F3/0689
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12693788
App. No.
18/929,838
Granted
Jul 28, 2026
Kind
B2
Abstract

Techniques are directed to wear leveling. Such techniques involve: determining, at least based on the type information of each redundant array of independent disks (RAID) group in a plurality of RAID groups, the write loss of each of the RAID groups. Such techniques further involve: determining the wear status of each of the RAID groups according to the status information and write loss of each of the RAID groups. Such techniques further involve: transferring at least a portion of data and/or a write task of a first RAID group to a second RAID group based on the write loss and the wear status of each of the RAID groups. With such wear leveling techniques, wear caused by write tasks can be evenly distributed among the RAID groups, so that the degree of wear among the RAID groups is more leveled.

Claims (88)

1 . A method for wear leveling, comprising:

determining, at least based on type information of each RAID group in a plurality of RAID groups, write loss of each of the RAID groups;

determining wear status of each of the RAID groups according to status information and the write loss of each of the RAID groups; and

transferring at least a portion of data and/or a write task of a first RAID group to a second RAID group based on the write loss and the wear status of each of the RAID groups;

wherein transferring at least the portion of data and/or the write task of the first RAID group to the second RAID group comprises:

determining a global wear status according to the wear status of each of the RAID groups;

detecting whether the global wear status meets a leveling condition; and

in response to the global wear status meeting the leveling condition, transferring at least the portion of data and/or the write task of the first RAID group to the second RAID group based on the write loss and the wear status of each of the RAID groups.

2 . The method according to claim 1 , wherein determining, at least based on the type information of each RAID group in the plurality of RAID groups, the write loss of each of the RAID groups comprises:

determining a type weight according to the type information, wherein the type weight indicates a number of actual write operations that occur while test data is written; and

determining the write loss at least based on the type weight.

3 . The method according to claim 2 , wherein determining the type weight according to the type information comprises:

recording the number of actual write operations that occur while the test data is written, wherein the test data comprises a plurality of pieces of data; and

determining the type weight according to a quantity of the test data and the number of actual writes.

4 . The method according to claim 2 , wherein determining the write loss at least based on the type weight comprises:

dividing a unit size of the written test data by a size of a data block to obtain a block weight;

rounding the block weight to an integer to indicate a number of data blocks involved in each write operation, the integer being considered a range weight; and

determining the write loss according to the type weight and the range weight.

5 . The method according to claim 1 , wherein each of the RAID groups is associated with a plurality of storage devices, and determining the wear status of each of the RAID groups according to the status information and the write loss of each of the RAID groups comprises:

performing on each of the RAID groups:

determining, based on the write loss, a service life of the RAID group according to a cumulative number of writes and a total number of writes of the plurality of storage devices associated with the RAID group;

determining usage of the RAID group according to write capacity and total capacity of the plurality of storage devices; and

determining the wear status of the RAID group according to the service life and the usage.

6 . The method according to claim 1 , wherein determining a global wear status according to each wear status comprises:

determining an average wear status according to the wear status of each of the RAID groups;

determining a wear standard deviation according to the wear status of each of the RAID groups and the average wear status; and

determining the global wear leveling according to the wear standard deviation and the average wear status.

7 . The method according to claim 1 , wherein determining a global wear status according to each wear status comprises:

determining the difference between the wear status of the first RAID group and the wear status of the second RAID group as the global wear status.

8 . The method according to claim 1 , wherein each of the RAID groups comprises a plurality of relocation units, each relocation unit is associated with a data block set, each relocation unit records the number of writes, and transferring at least the portion of data and/or the write task of the first RAID group to the second RAID group comprises:

determining a write popularity of each relocation unit of the first RAID group according to a write loss of the first RAID group and a number of historical writes of each relocation unit of the first RAID group;

determining a relocation unit with a maximum write popularity as a source relocation unit;

determining a write popularity of each relocation unit of the second RAID group according to a write loss of the second RAID group and a number of writes of each relocation unit of the second RAID group;

determining a relocation unit with a minimum write popularity as a destination relocation unit; and

transferring data and/or a write task of a source relocation unit to a destination relocation unit.

9 . The method according to claim 8 , wherein determining the write popularity of each relocation unit of the first RAID group comprises:

taking a product of the write loss of the first RAID group and the number of writes of each relocation unit of the first RAID group as the write popularity of each relocation unit of the first RAID group.

10 . An electronic device, comprising:

at least one processor; and

memory coupled to the at least one processor and having instructions stored thereon, wherein the instructions, when executed by the at least one processor, cause the electronic device to perform actions comprising:

determining, at least based on type information of each RAID group in a plurality of RAID groups, write loss of each of the RAID groups;

determining wear status of each of the RAID groups according to status information and the write loss of each of the RAID groups; and

transferring at least a portion of data and/or a write task of a first RAID group to a second RAID group based on the write loss and the wear status of each of the RAID groups;

wherein transferring at least a portion of data and/or a write task of a first RAID group to a second RAID group comprises:

determining a global wear status according to each wear status;

detecting whether the global wear status meets a leveling condition; and

in response to the global wear status meeting the leveling condition, transferring at least a portion of data and/or a write task of the first RAID group to the second RAID group based on the write loss and the wear status of each of the RAID groups.

11 . The electronic device according to claim 10 , wherein determining, at least based on the type information of each RAID group in the plurality of RAID groups, the write loss of each of the RAID groups comprises:

determining a type weight according to the type information, wherein the type weight indicates a number of actual write operations that occur while test data is written; and

determining the write loss at least based on the type weight.

12 . The electronic device according to claim 11 , wherein determining the type weight according to the type information comprises:

recording the number of actual write operations that occur while the test data is written, wherein the test data comprises a plurality of pieces of data; and

determining the type weight according to a quantity of the test data and the number of actual writes.

13 . The electronic device according to claim 11 , wherein determining the write loss at least based on the type weight comprises:

dividing a unit size of the written test data by a size of a data block to obtain a block weight;

rounding the block weight to an integer to indicate a number of data blocks involved in each write operation, the integer being considered a range weight; and

determining the write loss according to the type weight and the range weight.

14 . The electronic device according to claim 10 , wherein each of the RAID groups is associated with a plurality of storage devices, and determining the wear status of each of the RAID groups according to the status information and the write loss of each of the RAID groups comprises:

performing on each of the RAID groups:

determining, based on the write loss, a service life of the RAID group according to a cumulative number of writes and a total number of writes of the plurality of storage devices associated with the RAID group;

determining usage of the RAID group according to write capacity and total capacity of the plurality of storage devices; and

determining the wear status of the RAID group according to the service life and the usage.

15 . The electronic device according to claim 10 , wherein determining a global wear status according to each wear status comprises:

determining an average wear status according to the wear status of each of the RAID groups;

determining a wear standard deviation according to the wear status of each of the RAID groups and the average wear status; and

determining the global wear leveling according to the wear standard deviation and the average wear status.

16 . The electronic device according to claim 10 , wherein determining a global wear status according to each wear status comprises:

determining the difference between the wear status of the first RAID group and the wear status of the second RAID group as the global wear status.

17 . The electronic device according to claim 10 , wherein each of the RAID groups comprises a plurality of relocation units, each relocation unit is associated with a data block set, each relocation unit records the number of writes, and transferring at least the portion of data and/or the write task of the first RAID group to the second RAID group comprises:

determining a write popularity of each relocation unit of the first RAID group according to a write loss of the first RAID group and a number of historical writes of each relocation unit of the first RAID group;

determining a relocation unit with a maximum write popularity as a source relocation unit;

determining a write popularity of each relocation unit of the second RAID group according to a write loss of the second RAID group and a number of writes of each relocation unit of the first RAID group;

determining a relocation unit with a minimum write popularity as a destination relocation unit; and

transferring data and/or a write task of a source relocation unit to a destination relocation unit.

18 . A computer program product having a non-transitory computer readable medium which stores a set of instructions to perform wear leveling; the set of instructions, when carried out by computerized circuitry, causing the computerized circuitry to perform a method of:

determining, at least based on type information of each RAID group in a plurality of RAID groups, write loss of each of the RAID groups;

determining wear status of each of the RAID groups according to status information and the write loss of each of the RAID groups; and

transferring at least a portion of data and/or a write task of a first RAID group to a second RAID group based on the write loss and the wear status of each of the RAID groups;

wherein transferring at least a portion of data and/or a write task of a first RAID group to a second RAID group comprises:

determining a global wear status according to the wear status of each of the RAID groups;

detecting whether the global wear status meets a leveling condition; and

in response to the global wear status meeting the leveling condition, transferring at least a portion of data and/or a write task of the first RAID group to the second RAID group based on the write loss and the wear status of each of the RAID groups.

19 . The computer program product according to claim 18 , wherein determining a global wear status according to each wear status comprises:

determining an average wear status according to the wear status of each of the RAID groups;

determining a wear standard deviation according to the wear status of each of the RAID groups and the average wear status; and

determining the global wear leveling according to the wear standard deviation and the average wear status.

20 . The computer program product according to claim 18 , wherein determining a global wear status according to each wear status comprises:

determining the difference between the wear status of the first RAID group and the wear status of the second RAID group as the global wear status.