CN113253925B - Method and device for optimizing read-write performance - Google Patents

Method and device for optimizing read-write performance Download PDF

Info

Publication number
CN113253925B
CN113253925B CN202110481138.8A CN202110481138A CN113253925B CN 113253925 B CN113253925 B CN 113253925B CN 202110481138 A CN202110481138 A CN 202110481138A CN 113253925 B CN113253925 B CN 113253925B
Authority
CN
China
Prior art keywords
request
map
state
read
write
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110481138.8A
Other languages
Chinese (zh)
Other versions
CN113253925A (en
Inventor
王润强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Big Data Technologies Co Ltd
Original Assignee
New H3C Big Data Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New H3C Big Data Technologies Co Ltd filed Critical New H3C Big Data Technologies Co Ltd
Priority to CN202110481138.8A priority Critical patent/CN113253925B/en
Publication of CN113253925A publication Critical patent/CN113253925A/en
Application granted granted Critical
Publication of CN113253925B publication Critical patent/CN113253925B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0652Erasing, e.g. deleting, data cleaning, moving of data to a wastebasket
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0659Command handling arrangements, e.g. command buffers, queues, command scheduling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]

Abstract

The present application relates to the field of distributed storage technologies, and in particular, to a method and an apparatus for optimizing read/write performance. The method comprises the following steps: receiving a business command sent by a target client, and judging the type of the business command; if the business command is judged to be a read/write request of a target object, performing read/write processing on the target object based on the business command; after the read/write request is executed, if the state of the target object in the object-map is not changed or is adjusted to be a data state by other states, other clients except the target client are not informed to update the object-map; otherwise, the other clients are notified to update the object-map.

Description

Method and device for optimizing read-write performance
Technical Field
The present application relates to the field of distributed storage technologies, and in particular, to a method and an apparatus for optimizing read/write performance.
Background
Ceph is an open-source software defined storage, which has been supported and widely used by many cloud computing vendors over the years of development. Both RedHat and OpenStack may be integrated with Ceph to support backend storage of virtual machine images.
Before the object-map property is supported, the presence state of each data object constituting the image is unknown. When some operations of traversing all the data objects of the image are needed, even if the actually existing data objects forming the image are very sparse, operations similar to clone separation, used capacity calculation and the like are executed, all the data objects of the whole image still need to be traversed, and the execution time is long.
The introduction of the object-map feature can effectively alleviate the above problem, that is, the existence status of all data objects in the image is recorded in an independent metadata object, namely, the rbd _ object _ map object. The state of each data object is represented using two bits.
Although the object-map property is introduced, the time-consuming problem of traversing all data objects of the image is solved. But maintaining object-map also comes at a performance penalty. In practical application, the object-map is modified by the IO request, so that when the IO request is issued in a multi-client scene, the client first needs to compete for an exclusive-lock to issue IO write data, and the concurrent IO request of the multi-client is limited to serial issue. In order to ensure the accuracy of object-map in a multi-client scene, all operations related to the object-map need to acquire exclusive-lock first, and reload the object-map, or send a request to a client with exclusive-lock for execution, and in the multi-client scene, the write IO performance of the image is seriously affected. No effective solution to the above problems has been proposed.
Disclosure of Invention
The application provides a read-write performance optimization method and device, which are used for solving the problem of low IO performance in a multi-client scene in the prior art.
In a first aspect, the present application provides a read/write performance optimization method, which is applied to a distributed storage block device, and the method includes:
receiving a business command sent by a target client, and judging the type of the business command;
if the business command is judged to be a read/write request of a target object, performing read/write processing on the target object based on the business command;
after the read/write request is executed, if the state of the target object in the object-map is not changed or is adjusted to be a data state by other states, other clients except the target client are not informed to update the object-map; otherwise, the other clients are notified to update the object-map.
Optionally, the service command is a management flow request, and the method further includes:
configuring an exclusive lock to the management flow request sent by the target client, executing the management flow request sent by the target client based on the exclusive lock, and adjusting the state of each object in object-map based on the management flow request to obtain updated object-map.
Optionally, the other states include: a no data state, a to-be-deleted state and a snapshot protection state;
the management flow request includes: the method comprises the steps of a capacity expansion request of the distributed storage block device, a metadata setting request, a metadata deleting request, a snapshot creating request of the distributed storage block device, a snapshot deleting request and a snapshot rollback request.
Optionally, after the state of each object in the object-map is adjusted based on the management flow request, the method further includes:
and sending an object-map updating notice to the other clients so that the other clients load the updated object-map after processing the current read/write request and before processing the next read/write request.
Optionally, the service command is a storage space reclamation request, and the method further includes:
determining each object to be recovered based on the storage space recovery request;
respectively adjusting the state of each object to be recovered in the object-map into a no-data state to obtain an updated object-map;
and informing the other clients to adjust the state of each locally maintained object to be recovered into a no-data state.
In a second aspect, the present application provides a device for optimizing read/write performance, which is applied to a distributed storage block device, and the device includes:
the receiving unit is used for receiving the service command sent by the target client;
the judging unit is used for judging the type of the service command;
the processing unit is used for performing read/write processing on the target object based on the service command if the judging unit judges that the service command is a read/write request of the target object;
a notification unit, configured to, after the read/write request is completed, if the state of the target object in the object-map is not changed or is adjusted to a data state from another state, not notify other clients except the target client of updating the object-map; otherwise, the notification unit notifies the other clients to update the object-map.
Optionally, the service command is a management flow request, and the processing unit is further configured to:
and configuring an exclusive lock to the management flow request sent by the target client, executing the management flow request sent by the target client based on the exclusive lock, and adjusting the state of each object in the object-map based on the management flow request to obtain an updated object-map.
Optionally, the other states include: a no data state, a to-be-deleted state and a snapshot protection state;
the management flow request includes: the method comprises the steps of capacity expansion request of the distributed storage block device, metadata setting request, metadata deleting request, snapshot establishing request, snapshot deleting request and snapshot rollback request of the distributed storage block device.
Optionally, after the state of each object in the object-map is adjusted based on the management flow request, the apparatus further includes:
and the sending unit is used for sending an object-map updating notice to the other clients so that the other clients load the updated object-map after processing the current read/write request and before processing the next read/write request.
Optionally, the service command is a storage space reclamation request, and the processing unit is further configured to:
determining each object to be recovered based on the storage space recovery request;
respectively adjusting the state of each object to be recovered in the object-map into a data-free state to obtain an updated object-map;
and informing the other clients to respectively adjust the states of the objects to be recovered, which are maintained locally, to be in a data-free state.
In a third aspect, an embodiment of the present application provides a read-write performance optimization apparatus, where the read-write performance optimization apparatus includes:
a memory for storing program instructions;
a processor for calling program instructions stored in said memory and for executing the steps of the method according to any one of the above first aspects in accordance with the obtained program instructions.
In a fourth aspect, the present application further provides a computer-readable storage medium storing computer-executable instructions for causing a computer to perform the steps of the method according to any one of the above first aspects.
To sum up, the read-write performance optimization method provided by the embodiment of the present application is applied to a distributed storage block device, and the method includes: receiving a service command sent by a target client, and judging the type of the service command; if the business command is judged to be a read/write request of a target object, performing read/write processing on the target object based on the business command; after the read/write request is executed, if the state of the target object in the object-map is not changed or is adjusted to be a data state by other states, other clients except the target client are not informed to update the object-map; otherwise, the other clients are notified to update the object-map.
By adopting the read-write performance optimization method provided by the embodiment of the application, aiming at a multi-client scene, the multi-client can simultaneously process the IO request and the IO request issued by the multi-client without serial processing, so that the IO performance of the image under the multi-client scene is greatly improved. Meanwhile, whether other clients need to be informed to update the object-map is judged according to the specific change of the object-map caused by the current IO processing, and the accuracy and the effectiveness of the object-map are guaranteed.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required to be used in the embodiments of the present application or the technical solutions in the prior art are briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art according to the drawings of the embodiments of the present application.
Fig. 1 is a detailed flowchart of a read/write performance optimization method provided in an embodiment of the present application;
FIG. 2 is a diagram illustrating a state of an object-map according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram of a process of switching lock states according to an embodiment of the present application;
FIG. 4 is a diagram illustrating an object-map refresh process according to an embodiment of the present disclosure;
FIG. 5 is a diagram illustrating an alternative object-map refresh process according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a read/write performance optimization apparatus according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of another read/write performance optimization apparatus according to an embodiment of the present disclosure.
Detailed Description
The terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein is meant to encompass any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, the information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. Depending on the context, moreover, the word "if" as used may be interpreted as "at … …" or "when … …" or "in response to a determination".
Exemplarily, referring to fig. 1, a detailed flowchart of a read/write performance optimization method provided in an embodiment of the present application is shown, where the method is applied to a distributed storage block device, and the method includes the following steps:
step 100: and receiving a service command sent by a target client and judging the type of the service command.
The application takes Ceph distributed storage as an example to illustrate an embodiment of the read-write performance optimization method in the distributed storage system. The Block storage component (RADOS Block Device, RBD) is referred to as Image in Ceph, and each Image volume is composed of a number of objects, each of which is the same size, and is surrogated by 4MB by default. After the object-map property is opened, the Image volume generates object-map objects, records the state of each object included in the Image, and is identified by 2 bits, for example, as shown in fig. 2, which is a schematic diagram of the state of the object-map provided by the embodiment of the present application, wherein,
0x 00: the current object has no data;
0x 01: the current object has data;
0x 10: the current object data is to be cleared;
0x 11: the current object data is protected by the snapshot.
That is, if the state value of a data object in the object-map is 0X00, it indicates that the data object has no data, if the state value is 0X01, it indicates that the data object has data, if the state value is 0X10, the data indicating the data object is to be deleted, and if the state value is 0X11, the data indicating the data object is protected by the snapshot.
In practical applications, the service command sent by the client may be different types of service commands, for example, a read/write request, a management flow request, a storage space reclamation request, and the like.
Then, when receiving a service command sent by a target client, the distributed storage block device first determines the type of the service command.
Step 110: and if the business command is judged to be the read/write request of the target object, performing read/write processing on the target object based on the business command.
And if the service command sent by the target client is judged to be the read/write request of the target object, performing read-write processing on the target object according to the read/write request. For example, if the data is a write data operation, the data to be written is written into the target object, and if the data is a read data operation, the target data is read from the target object.
Step 120: after the read/write request is executed, if the state of the target object in the object-map is not changed or is adjusted to be a data state by other states, other clients except the target client are not informed to update the object-map; otherwise, the other clients are notified to update the object-map.
In the embodiment of the present application, the other states include: no data state, a state to be deleted and a snapshot protection state.
Specifically, the object-map maintains the state of each object included in the image, and the state of the target object may be changed after the read/write operation is performed on the target object. For example, if the target object is in the initial state 0X00 in object-map (the target object has no data), then after the write operation is performed, the target object becomes data, and at this time, the state of the target object needs to be adjusted to 0X01 in object-map. Obviously, if a read operation is performed on a target object, the state of the target object does not need to be adjusted.
In the embodiment of the application, if the state of the target object in the object-map is adjusted from other states (object no data: 0X00, object data to be deleted: 0X10, object data protected by snapshot: 0X11) to object data (0X01), it is not necessary to notify other clients except the target client to update the object-map, and if the state of the target object in the object-map is adjusted from one state (object no data: 0X00, object data: 0X01, object data to be deleted: 0X10, object data protected by snapshot: 0X11) to another state (object no data: 0X00, object data to be deleted: 0X10, object data protected by snapshot: 0X11), it is necessary to notify other clients except the target client to update the local object-map.
Specifically, the object-map can be updated through the watch-notify mechanism to maintain the accuracy of the object-map, and the concurrence of the read/write requests of the multiple clients is realized under the condition that the object-map is accurate.
That is, when executing the read/write request issued by the client, the multiple clients can concurrently issue the read/write request without holding exclusive-lock. And setting a preset rule, and triggering the client to update the local object-map when the update content of the object-map maintained by the OSD meets a preset condition so as to ensure the logic correctness.
Further, if the service command is a management flow request, the read-write performance optimization method may further include the following steps:
and configuring an exclusive lock to the management flow request sent by the target client, executing the management flow request sent by the target client based on the exclusive lock, and adjusting the state of each object in the object-map based on the management flow request to obtain an updated object-map.
Specifically, the management flow request refers to: the method comprises the steps of a capacity expansion request of the distributed storage block device, a metadata setting request, a metadata deleting request, a snapshot creating request of the distributed storage block device, a snapshot deleting request and a snapshot rollback request.
After adjusting the state of each object in object-map based on the management flow request, the read-write performance method further comprises the following steps: and sending an object-map updating notice to the other clients so that the other clients load the updated object-map after processing the current read/write request and before processing the next read/write request.
Specifically, the object-map can be updated by the watch-notify mechanism.
Further, if the service command is a storage space reclamation request, the read-write performance optimization method further includes the following steps:
determining each object to be recovered based on the storage space recovery request; respectively adjusting the state of each object to be recovered in the object-map into a data-free state to obtain an updated object-map; and informing the other clients to respectively adjust the states of the objects to be recovered, which are maintained locally, to be in a data-free state.
In practical applications, when a Discard type IO request for reclaiming storage space is processed, the status of the object to be reclaimed is updated to 0x00 (object no-data status) in the object-map without paying attention to the current object-map status.
The following describes the read-write performance optimization process provided by the embodiment of the present application in detail with reference to specific application scenarios. Exemplarily, referring to fig. 3, a schematic process diagram of lock state transition provided in an embodiment of the present application is specifically:
1. the initial state of the exclusive lock is UNLOCK, when the management flow applies for the lock, the lock information is written into OSD, object-map is initialized, and the lock state is converted into LOCKED, at this time, because the exclusive lock is occupied and written into OSD, other clients can not process the service (management flow and IO flow);
2. when the management flow is processed, releasing the lock, removing the lock information from the OSD, destroying the object-map, and converting the lock state into UNLOCK;
3. after the lock state is converted into UNLOCK, if the lock is applied by the IO stream, object-map is initialized, the lock state is converted into IO-LOCKED, at this time, the lock information is not written into OSD, and other clients can still obtain the lock to perform service processing (IO stream);
4. after the lock state is converted into IO-LOCKED, if the management flow needs to be processed, the management flow applies for a lock, the lock information is written into OSD, object-map is initialized, and the lock state is converted into LOCKED.
In practical application, after a management flow request sent by a client is executed, an object-map in the OSD is refreshed, and at this time, the client needs to be notified to obtain the refreshed object-map, so as to ensure the validity of the object-map maintained locally by the client. Exemplarily, referring to fig. 4, a schematic diagram of an object-map refresh process provided in the embodiment of the present application is shown, after a management flow command modifies the object-map, other image clients are notified of object-map refresh of a memory. The management flow command usually changes the values of all objects of the object-map, after the management flow command is executed, other image clients are notified of the refresh event through a watch-notify mechanism, after the other image clients receive the refresh notification, the new object-map is reloaded from the OSD to the memory before new IO is processed, and the IO request is processed.
Illustratively, referring to fig. 5, which is a schematic diagram of another object-map refresh process provided in the embodiment of the present application, after the object-map is modified by the Discard type IO, other clients are notified to refresh the object-map of the memory. The disc type IO only changes the object-map value of the disc object, after the disc request is completed, the object position processed by the disc of other image clients is notified through a watch-notify mechanism, and after the other image clients acquire the object-map memory lock, the object-map state of the corresponding object is directly modified to 0x00 in the memory.
Based on the same inventive concept as the above-mentioned method applied to the backup server, for example, referring to fig. 6, a schematic structural diagram of a read/write performance optimization apparatus provided in the embodiment of the present application is shown, where the read/write performance optimization apparatus is applied to a distributed storage block device, and the apparatus includes:
a receiving unit 60, configured to receive a service command sent by a target client;
a judging unit 61, configured to judge a type of the service command;
a processing unit 62, if the judging unit 61 judges that the service command is a read/write request of a target object, the processing unit 62 performs read/write processing on the target object based on the service command;
a notification unit 63, configured to, after the read/write request is completed, if the state of the object in the object-map is not changed or is adjusted from another state to a data state, not notify other clients except the object client of updating the object-map; otherwise, the notification unit 63 notifies the other clients to update the object-map.
Optionally, the service command is a management flow request, and the processing unit 62 is further configured to:
configuring an exclusive lock to the management flow request sent by the target client, executing the management flow request sent by the target client based on the exclusive lock, and adjusting the state of each object in object-map based on the management flow request to obtain updated object-map.
Optionally, the other states include: a no data state, a to-be-deleted state and a snapshot protection state;
the management flow request includes: the method comprises the steps of a capacity expansion request of the distributed storage block device, a metadata setting request, a metadata deleting request, a snapshot creating request of the distributed storage block device, a snapshot deleting request and a snapshot rollback request.
Optionally, after adjusting the state of each object in the object-map based on the management flow request, the apparatus further includes:
and the sending unit is used for sending an object-map updating notice to the other clients so that the other clients load the updated object-map after processing the current read/write request and before processing the next read/write request.
Optionally, the service command is a request for recovering storage space, and the processing unit 62 is further configured to:
determining each object to be recovered based on the storage space recovery request;
respectively adjusting the state of each object to be recovered in the object-map into a data-free state to obtain an updated object-map;
and informing the other clients to adjust the state of each locally maintained object to be recovered into a no-data state.
The above units may be one or more integrated circuits configured to implement the above methods, for example: one or more Application Specific Integrated Circuits (ASICs), or one or more microprocessors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs), among others. For another example, when one of the above units is implemented in the form of a Processing element scheduler code, the Processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. For another example, these units may be integrated together and implemented in the form of a system-on-a-chip (SOC).
Further, in the read-write performance optimizing device provided in the embodiment of the present application, from a hardware aspect, a hardware architecture schematic diagram of the read-write performance optimizing device may be shown in fig. 7, where the read-write performance optimizing device may include: a memory 70 and a processor 71, which,
the memory 70 is used to store program instructions; the processor 71 calls the program instructions stored in the memory 70 and executes the above-described method embodiments in accordance with the obtained program instructions. The specific implementation and technical effects are similar, and are not described herein again.
Optionally, the present application also provides a backup server comprising at least one processing element (or chip) for performing the above-mentioned method embodiments applied to the backup server.
Optionally, the present application also provides a program product, such as a computer-readable storage medium, storing computer-executable instructions for causing a computer to perform the above-described method embodiments applied to a backup server.
Here, a machine-readable storage medium may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and so forth. For example, the machine-readable storage medium may be: a RAM (random Access Memory), a volatile Memory, a non-volatile Memory, a flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., an optical disk, a dvd, etc.), or similar storage medium, or a combination thereof.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Furthermore, these computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only a preferred embodiment of the present application and should not be taken as limiting the present application, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (10)

1. A read-write performance optimization method is applied to distributed storage block equipment, and comprises the following steps:
receiving a service command sent by a target client, and judging the type of the service command;
if the business command is judged to be a read/write request of a target object, performing read/write processing on the target object based on the business command, and when the read/write request is executed, an exclusive lock is not required to be held;
after the read/write request is executed, if the state of the target object in the object-map is not changed or is adjusted to be a data state by other states, other clients except the target client are not informed to update the object-map; otherwise, the other clients are notified to update the object-map.
2. The method of claim 1, wherein the traffic command is a management flow request, the method further comprising:
configuring an exclusive lock to the management flow request sent by the target client, executing the management flow request sent by the target client based on the exclusive lock, and adjusting the state of each object in object-map based on the management flow request to obtain updated object-map.
3. The method of claim 2, wherein the other states comprise: a no data state, a to-be-deleted state and a snapshot protection state;
the management flow request includes: the method comprises the steps of a capacity expansion request of the distributed storage block device, a metadata setting request, a metadata deleting request, a snapshot creating request of the distributed storage block device, a snapshot deleting request and a snapshot rollback request.
4. The method of claim 2 or 3, wherein after adjusting the state of each object in object-map based on the management flow request, the method further comprises:
and sending an object-map updating notice to the other clients so that the other clients load the updated object-map after processing the current read/write request and before processing the next read/write request.
5. The method of claim 1, wherein the business command is a memory space reclamation request, the method further comprising:
determining each object to be recovered based on the storage space recovery request;
respectively adjusting the state of each object to be recovered in the object-map into a data-free state to obtain an updated object-map;
and informing the other clients to adjust the state of each locally maintained object to be recovered into a no-data state.
6. An apparatus for optimizing read/write performance, applied to a distributed storage block device, the apparatus comprising:
the receiving unit is used for receiving the service command sent by the target client;
the judging unit is used for judging the type of the service command;
the processing unit is used for performing read/write processing on the target object based on the service command if the judging unit judges that the service command is the read/write request of the target object, and does not need to hold an exclusive lock when executing the read/write request;
a notification unit, configured to, after the read/write request is completed, if the state of the target object in the object-map is not changed or is adjusted to a data state from another state, not notify other clients except the target client of updating the object-map; otherwise, the notification unit notifies the other clients to update the object-map.
7. The apparatus of claim 6, wherein the traffic command is a management flow request, the processing unit further to:
and configuring an exclusive lock to the management flow request sent by the target client, executing the management flow request sent by the target client based on the exclusive lock, and adjusting the state of each object in the object-map based on the management flow request to obtain an updated object-map.
8. The apparatus of claim 7, wherein the other states comprise: a no data state, a to-be-deleted state and a snapshot protection state;
the management flow request includes: the method comprises the steps of capacity expansion request of the distributed storage block device, metadata setting request, metadata deleting request, snapshot establishing request, snapshot deleting request and snapshot rollback request of the distributed storage block device.
9. The apparatus of claim 7 or 8, wherein after adjusting the state of each object in object-map based on the management flow request, the apparatus further comprises:
and the sending unit is used for sending an object-map updating notice to the other clients so that the other clients load the updated object-map after processing the current read/write request and before processing the next read/write request.
10. The apparatus of claim 6, wherein the business command is a memory space reclamation request, the processing unit further to:
determining each object to be recovered based on the storage space recovery request;
respectively adjusting the state of each object to be recovered in the object-map into a data-free state to obtain an updated object-map;
and informing the other clients to respectively adjust the states of the objects to be recovered, which are maintained locally, to be in a data-free state.
CN202110481138.8A 2021-04-30 2021-04-30 Method and device for optimizing read-write performance Active CN113253925B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110481138.8A CN113253925B (en) 2021-04-30 2021-04-30 Method and device for optimizing read-write performance

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110481138.8A CN113253925B (en) 2021-04-30 2021-04-30 Method and device for optimizing read-write performance

Publications (2)

Publication Number Publication Date
CN113253925A CN113253925A (en) 2021-08-13
CN113253925B true CN113253925B (en) 2022-08-30

Family

ID=77223682

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110481138.8A Active CN113253925B (en) 2021-04-30 2021-04-30 Method and device for optimizing read-write performance

Country Status (1)

Country Link
CN (1) CN113253925B (en)

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20100055201A (en) * 2008-11-17 2010-05-26 엘지전자 주식회사 Data programming device, and data programming method
CN110231913A (en) * 2018-03-05 2019-09-13 中兴通讯股份有限公司 Data processing method, device and equipment, computer readable storage medium
US11178246B2 (en) * 2018-08-25 2021-11-16 Panzura, Llc Managing cloud-based storage using a time-series database
CN111858402A (en) * 2020-06-12 2020-10-30 苏州浪潮智能科技有限公司 Read-write data processing method and system based on cache
CN111857602B (en) * 2020-07-31 2022-10-28 重庆紫光华山智安科技有限公司 Data processing method, data processing device, data node and storage medium
CN112596960B (en) * 2020-11-25 2023-06-13 新华三云计算技术有限公司 Distributed storage service switching method and device
CN112612791B (en) * 2020-12-22 2022-05-27 新华三大数据技术有限公司 Data processing method and device

Also Published As

Publication number Publication date
CN113253925A (en) 2021-08-13

Similar Documents

Publication Publication Date Title
US9003228B2 (en) Consistency of data in persistent memory
US10127114B2 (en) Method of file system design and failure recovery with non-volatile memory
CN109614055B (en) Snapshot creating method and device, electronic equipment and machine-readable storage medium
CN112783831B (en) File migration method and device
CN112000426B (en) Data processing method and device
CN113204407A (en) Memory over-allocation management method and device
CN111737265B (en) Block data access method, block data storage method and device
CN114265670B (en) Memory block sorting method, medium and computing device
CN114721594A (en) Distributed storage method, device, equipment and machine readable storage medium
CN112925606A (en) Memory management method, device and equipment
CN113672255A (en) Distributed storage software upgrading method and device
US10282371B1 (en) Object storage device with probabilistic data structure
CN113253925B (en) Method and device for optimizing read-write performance
CN113467719A (en) Data writing method and device
CN115421856A (en) Data recovery method and device
CN112800057B (en) Fingerprint table management method and device
CN114647658A (en) Data retrieval method, device, equipment and machine-readable storage medium
CN111984554B (en) Data processing method and device
CN111399753A (en) Method and device for writing pictures
CN116204124B (en) Data processing method and system based on conflict lock and electronic equipment
CN112988460B (en) Data backup method and device for virtual machine
CN113704189A (en) File management method and device
CN113703666A (en) Data reading and writing method and device
KR101887663B1 (en) Method and apparatus for processing data using dummy page
CN117149255A (en) Data source configuration method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant