CN116774925A - Disk storage system, method and server - Google Patents

Disk storage system, method and server Download PDF

Info

Publication number
CN116774925A
CN116774925A CN202310572457.9A CN202310572457A CN116774925A CN 116774925 A CN116774925 A CN 116774925A CN 202310572457 A CN202310572457 A CN 202310572457A CN 116774925 A CN116774925 A CN 116774925A
Authority
CN
China
Prior art keywords
data
buffer
disk
processed
data processing
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.)
Pending
Application number
CN202310572457.9A
Other languages
Chinese (zh)
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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202310572457.9A priority Critical patent/CN116774925A/en
Publication of CN116774925A publication Critical patent/CN116774925A/en
Pending legal-status Critical Current

Links

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/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0656Data buffering arrangements
    • 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/0658Controller construction arrangements
    • 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/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0674Disk device
    • G06F3/0676Magnetic disk device

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

The invention provides a disk storage system, a method and a server, and relates to the technical field of computers, wherein the system comprises: a disk, a buffer of the disk and a main controller chip of the disk; the main controller chip is externally connected with the magnetic disk, and the buffer is integrated in the main controller chip; the main controller chip is used for receiving a data processing instruction, acquiring data to be processed and data processing operation of the data to be processed according to the data processing instruction, and executing the data processing operation on the data to be processed in a buffer and/or the magnetic disk according to the storage information of the buffer; wherein the data processing operation comprises a data read operation and/or a data write operation. The invention not only can reduce the occupation of disk space resources and the wiring cost, but also can reduce the data processing delay time and information loss caused by the remote access of the disk and the buffer of the main controller chip, thereby greatly improving the data read-write performance of the disk.

Description

Disk storage system, method and server
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a disk storage system, a disk storage method, and a server.
Background
The buffer is a place where the disk exchanges data with the external bus. The magnetic disk firstly transmits data to the buffer memory, and then the buffer memory and the external data bus exchange data, wherein the buffer memory is a memory chip on a circuit board of the magnetic disk, and compared with a hard disk, the magnetic disk has extremely high access speed. The size and the speed of the buffer capacity are important factors directly related to the actual transmission speed of the disk, and the large buffer capacity can greatly improve the data hit rate so as to improve the overall performance of the disk. Therefore, how to improve the performance of the buffer is a key factor for improving the overall read-write performance of the disk.
Typically, the disk's cache is implemented primarily as a granule of dynamic random access memory (Dynamic Random Access Memory, DRAM), and one DRAM granule is a 2G or 4G cache. Therefore, in order to improve the performance of the buffer, a large amount of DRAM particles are usually required to be added in a printed circuit board (Printed Circuit Board, PCB) board card of the magnetic disk, but the addition of a large amount of DRAM particles needs to occupy a large position, so that the space resource of the magnetic disk is wasted, the magnetic disk board card is more and more bulky, the data processing time of the magnetic disk and the information loss in the data transmission process are increased, and the read-write performance of the magnetic disk is further restricted.
Disclosure of Invention
The invention provides a disk storage system, a method and a server, which are used for solving the defects that in the prior art, more DRAM particles are distributed in a PCB of a disk, space resources of the disk are wasted because the PCB needs to occupy a large position, and the read-write performance of the disk is restricted, so that the data read-write performance of the disk is improved while the space resources of the disk are reduced.
The invention provides a disk storage system, which comprises a disk, a buffer of the disk and a main controller chip of the disk;
the main controller chip is externally connected with the magnetic disk, and the buffer is integrated in the main controller chip;
the main controller chip is used for receiving a data processing instruction, acquiring data to be processed and data processing operation of the data to be processed according to the data processing instruction, and executing the data processing operation on the data to be processed in the buffer and/or the magnetic disk according to the storage information of the buffer; wherein the data processing operation comprises a data read operation and/or a data write operation.
According to the disk storage system provided by the invention, the buffer comprises a plurality of buffer blocks;
The main controller chip is specifically configured to:
dividing the data to be processed into a plurality of stripes under the condition that the buffer is determined to be a target memory according to the storage information; each of the stripes comprises a plurality of sub-data blocks; the target memory is used for providing a data read-write memory space for the data to be processed;
and based on a plurality of the cache blocks, performing the data processing operation on each sub data block in parallel in the cache.
According to the disk storage system provided by the invention, the set association cache mapping table is prestored in the buffer, and the association relation between each set and each cache block is stored in the set association cache mapping table;
the main controller chip is further configured to:
dividing each sub data block into corresponding sets;
determining a target cache block corresponding to each sub data block in a plurality of cache blocks based on the set identification of the corresponding set and the association relation;
and executing the data processing operation on each sub data block in parallel in the buffer based on the target buffer block corresponding to each sub data block.
According to the disk storage system provided by the invention, the main controller chip is further used for:
Acquiring a target data specification of the data to be processed in the case that the data processing operation comprises a data writing operation;
determining the residual storage space of the buffer according to the storage information;
and executing the data processing operation on the data to be processed in the buffer and/or the magnetic disk according to the residual storage space and the target data specification.
According to the disk storage system provided by the invention, the main controller chip is further used for:
determining the maximum writable data specification of the buffer according to the residual storage space;
determining the buffer and the disk as the target memory when the target data specification is greater than the maximum writable data specification;
according to the target data specification and the maximum writable data specification, dividing the data to be processed into data blocks to obtain a first data block and a second data block;
performing a data write operation on the first data block in the buffer;
performing a data write operation on the second data block in the disk;
wherein the data specification of the first data block is less than or equal to the maximum writable data specification; the second data block is a data block generated according to data except the data in the first data block in the data to be processed.
According to the disk storage system provided by the invention, the main controller chip is further used for:
determining a storage address of the data to be processed in the case where the data processing operation includes a data reading operation;
determining the buffer as the target memory under the condition that the data to be processed are stored in the disk and the buffer according to the storage address and the storage information;
and reading the data to be processed in the buffer according to the storage address.
According to the magnetic disk storage system provided by the invention, the magnetic disk comprises a plurality of hard disks;
and combining a plurality of hard disks to form a disk array.
The invention also provides a disk storage method, which is applied to the disk storage system of any one of the above, and comprises the following steps:
receiving a data processing instruction;
acquiring data to be processed and data processing operation of the data to be processed according to the data processing instruction;
according to the storage information of a buffer memory integrated on a main controller chip of a disk, executing the data processing operation on the data to be processed in the buffer memory and/or the disk;
wherein the data processing operation comprises a data read operation or a data write operation.
According to the disk storage method provided by the invention, the data processing operation is executed on the data to be processed in the buffer and/or the disk according to the storage information of the buffer integrated on the main controller chip of the disk, and the method comprises the following steps:
determining a target memory in the buffer and the disk according to the stored information; the target memory is used for providing a data read-write memory space for the data to be processed;
dividing the data to be processed into a plurality of stripes under the condition that the buffer is determined to be the target memory; each of the stripes comprises a plurality of sub-data blocks;
dividing each sub data block into corresponding sets;
determining a target cache block corresponding to each sub data block in a plurality of cache blocks of the cache based on the set identification of the corresponding set and the association relation between each set and each cache block stored in a set association cache mapping table; the set association cache mapping table is pre-stored in the cache;
and executing the data processing operation on each sub data block in parallel in the buffer based on the target buffer block corresponding to each sub data block.
The invention also provides a server comprising the disk storage system and the processor as described in any one of the above;
the processor is connected with the disk storage system and is used for sending data processing instructions to the disk storage system.
The invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing any of the disk storage methods described above when executing the program.
The present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a disk storage method as described in any of the above.
The invention also provides a computer program product comprising a computer program which when executed by a processor implements a disk storage method as described in any one of the above.
According to the disk storage system, the method and the server provided by the invention, the buffer is integrated in the main controller chip externally connected with the disk, and the data processing operation is directly executed in the buffer and/or the disk through the main controller chip, so that not only can the space resources occupied by arranging a large amount of DRAM particles on the upper part of the PCB of the disk be reduced and the wiring cost be reduced, but also the main controller chip can directly control the buffer at the local end to perform the data processing operation, thereby effectively reducing the data processing delay time and information loss caused by the remote access of the main controller chip to the disk and the buffer, and greatly improving the data reading and writing performance of the disk.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a disk storage system according to the present invention;
FIG. 2 is a schematic flow chart of a disk storage method according to the present invention;
FIG. 3 is a second flow chart of the disk storage method according to the present invention;
fig. 4 is a schematic structural diagram of an electronic device provided by the present invention.
Reference numerals:
1: a disk storage system; 101: a magnetic disk; 102: a buffer; 103: a main controller chip; 2: an external device.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The buffer of the disk is an important part of the improvement of the read-write performance of the disk, most of the disks need to achieve the improvement of the performance through the buffer, but with the upgrading and updating of the disk, such as the upgrading and updating of a high-speed Serial computer expansion bus standard (Peripheral Component Interconnect, PCIE) protocol and a Serial bus-based high-speed interconnection technology (SAS) protocol, the data processing capacity of the whole disk is multiplied, so that the capacity of the existing buffer can hardly support huge data flows, and if the Input Output (I/O) performance advantage of the hardware disk needs to be better maintained, the greater buffer capacity is needed to provide better data processing performance.
Typically, one DRAM grain is a 2G or 4G cache, and the RAID card cache of the GEN4 at the present stage is already up to 32GB; therefore, a large amount of DRAM particles need to be added in the PCB board card of the magnetic disk, so that the DRAM particles used for realizing buffering occupy a large position on the PCB board card to cause the waste of space resources, the magnetic disk board card is more and more bulky, the data processing time of the buffer memory and the information loss in the data transmission process are increased, and the data reading and writing performance of the magnetic disk is further restricted.
In view of the above technical problems, this embodiment provides a disk storage system, a method and a server, in the disk storage system, a main controller chip of a disk is externally connected to the disk, and a buffer of the disk is integrated in the main controller chip, so that data processing operation is directly performed on data to be processed in the buffer and/or the disk by the main controller chip according to a data processing instruction sent by an external device, on one hand, the buffer is integrated in the main controller chip, so that occupation of space resources of a PCB board of the disk can be reduced, and wiring cost is reduced; on the other hand, the main controller chip can directly control the buffer to perform data processing operation at the local end, so that the data access delay caused by the fact that the main controller chip accesses the disk firstly and can perform data processing in the buffer through the disk is effectively reduced, and the data reading and writing performance of the disk is greatly improved.
The disk storage system, method and server of the present invention are described below in conjunction with FIGS. 1-4.
As shown in fig. 1, a schematic structural diagram of a disk storage system provided in this embodiment, where the disk storage system 1 includes at least a disk 101, a buffer 102 of the disk 101, and a main controller chip 103 of the disk 101;
The main controller chip 103 is externally connected with the magnetic disk 101, and the buffer 102 is integrated in the main controller chip 103;
the disk 101 may be constructed of a single hard disk or a plurality of hard disks, and this embodiment is not particularly limited.
In some embodiments, the disk 101 comprises a plurality of hard disks;
and combining a plurality of hard disks to form a disk array.
Alternatively, in the case where the disk 101 includes multiple independent hard disks, the multiple independent hard disks may be combined to form a disk array (Redundant Arrays of Independent Disks, RAID), so that the data throughput of the storage system is greatly improved by simultaneously storing and reading data by the multiple hard disks, thereby improving the read-write performance of the disk.
The master controller chip 103 is referred to as a separate controller chip external to the disk 101 and having an independent bus interconnect with the disk 101, and this embodiment is not specifically limited, as the master controller chip 103 may be a host controller chip or the like. Accordingly, the main controller chip 103 may be connected to the disk 101 via a PCI Express (peripheral component interconnect Express, high speed serial computer expansion bus standard) bus, which may provide high speed data transfer. By this connection, disk 101 is capable of providing high-speed data transfer and processing capabilities, thereby achieving efficient data storage and protection, as well as improving the performance and reliability of the storage system.
The Host controller chip is a control chip for controlling I/O interfaces and devices in a Host or server system, and can be a stand-alone integrated circuit or a modularized chip combination. The Host controller chip is mainly responsible for interaction with a system bus and related equipment, and coordinates data transmission and control signal management. In the disk storage system 1, the Host controller chip is used for communication and control with the disk 101 and the buffer 102 of the disk 101.
The buffer 102 of the disk 101 may be a Cache memory (also referred to as a Cache), which is a location where the disk 101 exchanges data with an external bus, and can implement both data reading and data writing. The buffer 102 includes at least one mirror file to protect the security of data in the buffer 102. The buffer 102 is integrated directly in the main controller chip 103.
The main controller chip 103 is configured to receive a data processing instruction sent by the external device 2, obtain data to be processed and a data processing operation of the data to be processed according to the data processing instruction, and execute the data processing operation on the data to be processed in the buffer 102 and/or the disk 101 according to the storage information of the buffer 102; wherein the data processing operation comprises a data read operation and/or a data write operation.
The data to be processed may be video data, pictures, table data, text data, or the like, which is not particularly limited in this embodiment.
The storage information includes at least the data content stored in the buffer 102 and the storage space occupation.
The external device 2 may be another device such as a central processing unit (Central Processing Unit, CPU) connected to the disk 101.
Optionally, the main controller chip 103 is configured to monitor, in real time, a data processing instruction sent by the external device 2, where the data processing instruction is received, and may parse the data processing instruction to obtain data to be processed and a data processing operation of the data to be processed.
Then, based on the storage information of the buffer 102, a destination memory is determined in the buffer 102 and the disk 101, that is, a memory for providing a storage space for reading and writing data for the data to be processed is determined in the buffer 102 and the disk 101, so that a data processing operation is performed on the data to be processed in the destination memory.
The manner of determining the destination memory may be to obtain different information from the storage information according to different types of data processing operations, that is, obtain historical storage data or storage space occupation, so as to determine the destination memory according to the historical storage data or storage space occupation. For example, in the case where the type of the data processing operation is a data reading operation, history storage data is acquired from the storage information, so that whether to acquire data to be processed from the buffer 102 is preferentially determined according to the history storage data, whether the buffer 102 is a destination storage is preferentially determined, and whether to use the disk 101 as the destination storage is further determined when the buffer 102 is not the destination storage; in the case that the type of the data processing operation is a data writing operation, the storage space occupation condition is acquired from the storage information, so that whether the buffer 102 has sufficient memory space for writing data is preferentially determined according to the storage space occupation condition, whether the buffer 102 is a destination memory is preferentially determined, and whether the disk 101 can be used as the destination memory is further determined when the buffer 102 is not the destination memory.
Compared with the prior art that a large number of DRAMs are additionally arranged in the PCB of the magnetic disk to improve the read-write performance of the magnetic disk, the embodiment directly integrates the buffer in the main controller chip, so that the problems of complex layout of the PCB of the magnetic disk and space resource waste caused by the layout caused by a plurality of DRAMs can be prevented, the resource space of the PCB of the magnetic disk is effectively reduced, the space resource waste of the magnetic disk and the interference caused by the PCB wiring are reduced, the whole portability of the magnetic disk can be ensured, the resource space waste is less, and various problems caused by excessively complex wiring can be prevented; in addition, the buffer memory is directly integrated with the main controller chip, so that the buffer memory of the magnetic disk is physically closer to the main controller chip, the main controller chip can directly access the buffer memory at the local end, the buffer memory is easier to be accessed by the main controller chip, the remote interaction between the main controller chip and the magnetic disk and the buffer memory is reduced, the utilization efficiency of the buffer memory is improved, and the data reading and writing performance of the magnetic disk is further effectively improved; in addition, the problem that data is lost because the super capacitor of the disk cannot provide better data protection due to a large number of DRAMs is avoided, and the safety of the data is effectively ensured.
According to the disk storage system provided by the embodiment, the buffer is integrated in the main controller chip externally connected with the disk, and the data processing operation is directly performed on the data to be processed in the buffer and/or the disk through the main controller chip, so that not only can the space resources occupied by arranging a large amount of DRAM particles on the upper part of the PCB of the disk be reduced and the wiring cost be reduced, but also the main controller chip can directly control the buffer at the local end to perform the data processing operation, thereby effectively reducing the data processing delay time and information loss caused by the remote access of the main controller chip to the disk and the buffer, and greatly improving the data reading and writing performance of the disk.
In some embodiments, the buffer 102 includes a plurality of buffer blocks therein;
the main controller chip 103 is specifically configured to:
dividing the data to be processed into a plurality of stripes under the condition that the buffer 102 is determined to be a target memory according to the storage information; each of the stripes comprises a plurality of sub-data blocks; the target memory is used for providing a data read-write memory space for the data to be processed;
the data processing operations are performed in parallel in the buffer 102 for each of the sub-data blocks based on a plurality of the buffer blocks.
The buffer 102 is preconfigured with a plurality of buffer blocks, and each buffer block has a data reading function and a data writing function.
Optionally, when the main controller chip 103 determines that the buffer 102 is a destination memory according to the storage information, the buffer 102 may be characterized as a storage space for providing data reading and writing for the data to be processed. At this time, the data to be processed may be divided into a plurality of stripes to divide the data to be processed into a plurality of data blocks.
Here, the dividing may be performed according to the data amount of the cache block and the processing performance of each cache block, so that the divided data block is adapted to the processing performance of the cache block; the division may be performed according to a preset data specification, such as 16KB, and the present example is not particularly limited.
Next, the main controller chip 103 performs data reading and data writing operations in parallel on each sub-data block in the buffer 102 in order to divide the processing task of each sub-data block into corresponding buffer blocks so as to be plural.
In the related art, the buffer can only perform a data reading task or a data writing task at the same time, that is, the buffer cannot perform the data reading task when performing the data reading task, so that waiting delay and waste of buffer resources exist in data processing.
In this embodiment, by adopting a plurality of cache blocks to perform data reading or data writing operation on each sub-data block in the data to be processed in parallel, the data reading task is performed on part of the cache blocks in parallel, and in addition, the data writing operation can be performed on part of the cache blocks in parallel in synchronization, so that latency and cache resource waste are effectively reduced, and the reading and writing speed can be improved while the utilization rate of the cache resource is improved.
In some embodiments, the buffer 102 stores a set-associated buffer mapping table in advance, where the set-associated buffer mapping table stores an association relationship between each set and each buffer block;
the main controller chip 103 is further configured to:
dividing each sub data block into corresponding sets;
determining a target cache block corresponding to each sub data block in a plurality of cache blocks based on the set identification of the corresponding set and the association relation;
the data processing operation is performed in parallel on each of the sub data blocks in the buffer 102 based on the target buffer block corresponding to each of the sub data blocks.
Wherein, the cache mapping relationship of the cache 102 is characterized by adopting a set association cache mapping table. The set association cache mapping table is stored in the cache 102 in advance, and is used for representing the association relationship between each set and each cache block. In this cache mapping relationship, cache blocks are grouped to form one set, and a main memory block may enter any cache block of a particular set.
Alternatively, the main controller chip 103 may sequentially divide each sub-data block into corresponding sets according to the number of processable sub-data blocks in each set, or sequentially divide each sub-data block into corresponding sets according to the association relationship between each sub-data block and each set, which is not specifically limited in this embodiment.
Then, the main controller chip 103 determines a target cache block corresponding to each sub data block, that is, a cache block for processing a data processing task of each sub data block, from among the plurality of cache blocks based on the set identification of the corresponding set of each sub data block and the association relationship between each set and each cache block. By the mode, corresponding target cache blocks can be allocated for each sub data block more accurately and conveniently to conduct parallel data processing, and therefore data reading and writing performance is improved.
Next, the main controller chip 103 divides the processing task of each sub data block into respective corresponding target cache blocks so that the target cache block corresponding to each sub data block performs data read and data write operations in parallel for each sub data block in the buffer 102.
In this embodiment, each sub data block is divided into corresponding sets, and corresponding target cache blocks are allocated to each sub data block according to the association relationship between each set and each cache block, so that the target cache blocks corresponding to each sub data block can synchronously and parallelly perform data writing operation, thereby effectively improving the utilization rate of cache resources and simultaneously improving the reading and writing speed.
In some embodiments, the main controller chip 103 is further configured to:
acquiring a target data specification of the data to be processed in the case that the data processing operation comprises a data writing operation;
determining the remaining storage space of the buffer 102 according to the storage information;
the data processing operation is performed on the data to be processed in the buffer 102 and/or the disk 101 according to the remaining storage space and the target data specification.
Alternatively, when the data processing operation includes a data writing operation, the main controller chip 103 needs to acquire a target data specification of the data to be processed; the storage space occupation condition is obtained from the storage information, so that the residual storage space of the buffer 102 is further determined according to the storage space occupation condition, whether the buffer 102 has enough storage space for writing the data to be processed is determined according to the residual storage space and the target data specification, and then the target storage is determined in the buffer 102 and the disk 101 according to the determination result; in the case where the buffer 102 is the target buffer 102, the data processing operation may be performed on the data to be processed in the buffer 102, in the case where the disk 101 is the target buffer 102, the data processing operation may be performed on the data to be processed in the disk 101, and in the case where both the disk 101 and the buffer 102 are the target buffer 102, the data processing operation may be performed on the data to be processed in the disk 101 and the buffer 102 in common.
In this embodiment, according to the remaining storage space of the buffer 102, the data processing operation of the data to be processed in the buffer 102 is preferentially determined, so that when the buffer 102 has sufficient storage space to write the data to be processed, the data processing is preferentially performed in the buffer 102, so as to improve the data writing performance.
In some embodiments, the main controller chip 103 is further configured to:
determining a maximum writable data specification of the buffer 102 according to the remaining storage space;
determining the buffer 102 and the disk 101 as destination storage in the case that the target data size is greater than the maximum writable data size;
according to the target data specification and the maximum writable data specification, dividing the data to be processed into data blocks to obtain a first data block and a second data block;
performing a data write operation on the first data block in the buffer 102;
performing a data write operation on the second data block in the disk 101;
wherein the data specification of the first data block is less than or equal to the maximum writable data specification; the second data block is a data block generated according to data except the data in the first data block in the data to be processed.
Optionally, the main controller chip 103 is further configured to determine a maximum available storage space of the buffer 102 according to the remaining storage space and the safety margin, and further determine a maximum writable data specification of the buffer 102 according to the maximum available storage space of the buffer 102; the safety margin is a storage space required for maintaining the memory to operate correctly, and may be adaptively determined according to the cache performance of the cache, for example, 40% of the storage space of the cache.
Here, the method of determining the maximum available storage space may be to subtract the remaining storage space from the safety margin to obtain the maximum available storage space.
In this embodiment, by determining the maximum available storage space of the buffer 102 based on the remaining storage space and the safety margin, it is possible to use the buffer resource of the buffer to the maximum extent on the premise of ensuring the safe operation of the buffer, thereby effectively improving the data reading performance.
Next, the main controller chip 103 may compare the target data specification with the maximum writable data specification to individually use the buffer 102 as a destination memory to individually perform a data write operation on the data to be processed in the buffer 102 in a case where it is determined that the target data specification is less than or equal to the maximum writable data specification.
Here, when the data write operation is performed on the data to be processed individually in the buffer 102, the data to be processed may be divided into a plurality of stripes; based on a plurality of cache blocks of the buffer, data processing operations are performed in parallel in the buffer for each sub-data block.
When the target data specification is determined to be greater than the maximum writable data specification, the buffer 102 and the disk 101 are used together as a target memory, so that in order to maximally utilize the storage resources of the buffer and improve the data writing performance, the data to be processed can be divided into data blocks according to the target data specification and the maximum writable data specification, so as to obtain a first data block and a second data block; the data specification of the first data block is smaller than or equal to the maximum writable data specification.
Then, a data write operation is performed in parallel on the first data block in the buffer 102, and a data write operation is performed on the second data block in the disk 101.
Here, when the data writing operation is performed on the first data block in the buffer 102, the first data block may be divided into a plurality of stripes to perform the data processing operation in parallel on each sub-data block of the first data block in the buffer based on the plurality of buffer blocks of the buffer.
In general, a disk only requires data to be written into a buffer memory to complete writing operation, so that in order to maximally utilize the storage space of the buffer memory and improve writing speed, when the target data specification is smaller than or equal to the maximum writable data specification, data writing operation is directly performed on data to be processed in the buffer memory independently, and only when the target data specification is greater than the maximum writable data specification, writing operation is performed on the data to be processed in parallel by adopting the buffer memory and the disk, so that efficient writing of the data to be processed is realized.
In some embodiments, the main controller chip 103 is further configured to:
determining a storage address of the data to be processed in the case where the data processing operation includes a data reading operation;
determining the buffer 102 as a target memory when the data to be processed are stored in the disk 101 and the buffer 102 according to the storage address and the storage information;
and according to the storage address, reading the data to be processed in the buffer 102.
Optionally, for the data processing operation including a data reading operation, the main controller chip 103 is further configured to determine a storage address of the data to be processed, and obtain, from the storage information, data content stored in the buffer 102 to determine whether the data to be processed is stored in the buffer 102, and simultaneously determine whether the data to be processed is stored in the disk 101 according to the storage address of the data to be processed and the data content stored in the disk 101;
In the case where it is determined that only any one of the disk 101 and the buffer 102 stores data to be processed, the memory storing the data to be processed is taken as a destination memory, so that the data to be processed is read in the destination memory according to the storage address.
In the case where it is determined that data to be processed is stored in both the disk 101 and the buffer 102, the buffer 102 is preferentially set as a destination memory, so that the data to be processed is read in the buffer 102 according to the storage address.
Since in reading data, the time required for a disk seek will be greatly reduced when the data to be read can hit in the buffer. Therefore, in order to improve the data reading performance, under the condition that the data to be processed are stored in the magnetic disk and the buffer, the data is preferentially read from the buffer, so that the data interaction time and the time required by magnetic disk seek are directly obtained from the buffer in the aspects of repeatedly processing the same data and repeatedly executing the same instruction, the response time of the storage system is greatly reduced, the efficient reading of the data to be processed is realized, and the performance of the storage system is improved.
The disk storage method provided by the invention is described below, and the disk storage method described below and the disk storage system described above can be referred to correspondingly.
As shown in fig. 2, a flow chart of a disk storage method is provided in this embodiment, an execution body of the method is a main controller chip 103 in a disk storage system 1, the system includes a disk 101, a buffer 102 of the disk 101, and the main controller chip 103 of the disk 101, and specific structures are shown in fig. 1 and are not described herein.
As shown in fig. 2, the method includes:
step 201, receiving a data processing instruction sent by an external device;
step 202, obtaining data to be processed and data processing operation of the data to be processed according to the data processing instruction;
step 203, executing the data processing operation on the data to be processed in the buffer and/or the disk according to the storage information of the buffer integrated on the main controller chip of the disk;
wherein the data processing operation comprises a data read operation or a data write operation.
Optionally, the main controller chip is configured to monitor, in real time, a data processing instruction sent by the external device, and under a condition that the data processing instruction is received, analyze the data processing instruction to obtain data to be processed and a data processing operation of the data to be processed.
Then, a destination memory is determined in the buffer and the disk, that is, a memory for providing a storage space for reading and writing data for the data to be processed is determined in the buffer and the disk, based on the storage information of the buffer, so that a data processing operation is performed on the data to be processed in the destination memory.
Here, the manner of determining the destination memory may be to acquire the history storage data or the storage space occupation condition from the storage information according to the type of the data processing operation, so as to determine the destination memory according to the history storage data or the storage space occupation condition. If the type of the data processing operation is a data reading operation, acquiring historical storage data from the storage information, so as to preferentially determine whether to acquire the data to be processed from the buffer according to the historical storage data, preferentially determine whether the buffer is a target memory, and further determine whether to use the disk as the target memory when the buffer is not the target memory; under the condition that the type of the data processing operation is a data writing operation, the storage space occupation condition is acquired from the storage information, so that whether the buffer has enough memory space for data writing is preferentially determined according to the storage space occupation condition, whether the buffer is a target memory is preferentially determined, and whether the disk can be used as the target memory is further determined when the buffer is not the target memory.
According to the disk storage method, the buffer is integrated in the main controller chip externally connected to the disk, and the data processing operation is directly performed on the buffer and/or the disk through the main controller chip, so that space resources occupied by a large amount of DRAM particles arranged on the upper part of the PCB of the disk can be reduced, wiring cost is reduced, the main controller chip can directly control the buffer at the local end to perform the data processing operation, data processing delay time and information loss caused by remote access of the main controller chip to the disk and the buffer are effectively reduced, and data reading and writing performance of the disk is greatly improved.
As shown in fig. 3, in some embodiments, the performing, in the buffer and/or the disk, the data processing operation on the data to be processed according to the storage information of the buffer integrated on the main controller chip of the disk includes:
step 301, determining a destination memory in the buffer and the disk according to the stored information; the target memory is used for providing a data read-write memory space for the data to be processed;
step 302, dividing the data to be processed into a plurality of stripes in the case that the buffer is determined to be a target memory; each of the stripes comprises a plurality of sub-data blocks;
step 303, dividing each sub data block into corresponding sets;
step 304, determining a target cache block corresponding to each sub data block in a plurality of cache blocks of the cache based on the set identifier of the corresponding set and the association relation between each set and each cache block stored in a set association cache mapping table; the set association cache mapping table is pre-stored in the cache;
step 305, based on the target cache block corresponding to each sub data block, executing the data processing operation on each sub data block in parallel in the buffer.
Alternatively, the host controller chip may determine the destination memory in the buffer and disk based on the stored information. When the buffer is determined to be a target memory according to the storage information, the characterization buffer can provide a storage space for data reading and writing for the data to be processed. At this time, the data to be processed may be divided into a plurality of stripes to divide the data to be processed into a plurality of data blocks.
Here, the division may be performed according to the data amount of the cache block and the processing performance of each cache block, or may be performed according to a predetermined data specification, such as 16KB, which is not particularly limited in this example.
Then, the main controller chip may sequentially divide each sub data block into corresponding sets according to the number of processable sub data blocks of each set, or sequentially divide each sub data block into corresponding sets according to the association relationship between each sub data block and each set, which is not specifically limited in this embodiment.
Then, the main controller chip determines a target cache block corresponding to each sub data block, namely a cache block for processing a data processing task of each sub data block, from the plurality of cache blocks based on the set identification of the corresponding set of each sub data block and the association relation between each set and each cache block.
Then, the main controller chip divides the processing task of each sub data block into the corresponding target cache block so that the corresponding target cache block of each sub data block performs data reading and data writing operation on each sub data block in parallel in the cache.
In this embodiment, by adopting a plurality of cache blocks to perform data reading or data writing operation on each sub-data block in the data to be processed in parallel, so as to implement data reading tasks on part of the cache blocks in parallel, and in addition, part of the cache blocks can perform data writing operation in parallel in synchronization, so that latency and cache resource waste are effectively reduced, and the read-write speed can be improved while the utilization rate of the cache resource is improved.
The embodiment also provides a server, which comprises the disk storage system 1 and a processor; the processor is connected with the disk storage system 1, and is used for sending data processing instructions to the disk storage system 1.
The server also includes at least one battery for powering the components in the server while also protecting the security of data in the buffer 102 and disk 101.
The processor may be a CPU or other processor, so as to send a data processing instruction to the disk storage system 1 through the data bus interaction interface, where the main controller chip 103 of the disk 101 receives the data processing instruction, obtains data to be processed according to the data processing instruction, and performs a data processing operation on the data to be processed in the buffer 102 and/or the disk 101 according to the storage information of the buffer 102.
According to the server provided by the embodiment, the buffer is integrated in the main controller chip externally connected to the disk, and the data processing operation is directly performed on the data to be processed in the buffer and/or the disk through the main controller chip, so that not only can the space resources occupied by arranging a large amount of DRAM particles on the upper part of the PCB of the disk be reduced and the wiring cost be reduced, but also the main controller chip can directly control the buffer at the local end to perform the data processing operation, thereby effectively reducing the data processing delay time and information loss caused by the remote access of the main controller chip to the disk and the buffer, and greatly improving the data reading and writing performance of the disk.
Fig. 4 illustrates a physical schematic diagram of an electronic device, as shown in fig. 4, which may include: a processor (processor) 401, a communication interface (Communications Interface) 402, a memory (memory) 403 and a communication bus 404, wherein the processor 401, the communication interface 402 and the memory 403 complete communication with each other through the communication bus 404. The processor 401 may call logic instructions in the memory 403 to perform a disk storage method, the method comprising: receiving a data processing instruction; acquiring data to be processed and data processing operation of the data to be processed according to the data processing instruction; according to the storage information of a buffer memory integrated on a main controller chip of a disk, executing the data processing operation on the data to be processed in the buffer memory and/or the disk; wherein the data processing operation comprises a data read operation or a data write operation.
Further, the logic instructions in the memory 403 may be implemented in the form of software functional units and stored in a computer readable storage medium when sold or used as a stand alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product, the computer program product comprising a computer program, the computer program being storable on a non-transitory computer readable storage medium, the computer program, when executed by a processor, being capable of performing the disk storage method provided by the methods described above, the method comprising: receiving a data processing instruction; acquiring data to be processed and data processing operation of the data to be processed according to the data processing instruction; according to the storage information of a buffer memory integrated on a main controller chip of a disk, executing the data processing operation on the data to be processed in the buffer memory and/or the disk; wherein the data processing operation comprises a data read operation or a data write operation.
In yet another aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform the disk storage method provided by the methods above, the method comprising: receiving a data processing instruction; acquiring data to be processed and data processing operation of the data to be processed according to the data processing instruction; according to the storage information of a buffer memory integrated on a main controller chip of a disk, executing the data processing operation on the data to be processed in the buffer memory and/or the disk; wherein the data processing operation comprises a data read operation or a data write operation.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A magnetic disk storage system is characterized by comprising a magnetic disk, a buffer of the magnetic disk and a main controller chip of the magnetic disk;
the main controller chip is externally connected with the magnetic disk, and the buffer is integrated in the main controller chip;
the main controller chip is used for receiving a data processing instruction, acquiring data to be processed and data processing operation of the data to be processed according to the data processing instruction, and executing the data processing operation on the data to be processed in the buffer and/or the magnetic disk according to the storage information of the buffer; wherein the data processing operation comprises a data read operation and/or a data write operation.
2. The disc storage system of claim 1 wherein the buffer comprises a plurality of buffer blocks;
the main controller chip is specifically configured to:
dividing the data to be processed into a plurality of stripes under the condition that the buffer is determined to be a target memory according to the storage information; each of the stripes comprises a plurality of sub-data blocks; the target memory is used for providing a data read-write memory space for the data to be processed;
And based on a plurality of the cache blocks, performing the data processing operation on each sub data block in parallel in the cache.
3. The disk storage system according to claim 2, wherein a set-associative cache mapping table is stored in the buffer in advance, and an associative relationship between each set and each cache block is stored in the set-associative cache mapping table;
the main controller chip is further configured to:
dividing each sub data block into corresponding sets;
determining a target cache block corresponding to each sub data block in a plurality of cache blocks based on the set identification of the corresponding set and the association relation;
and executing the data processing operation on each sub data block in parallel in the buffer based on the target buffer block corresponding to each sub data block.
4. The disk storage system of claim 2, wherein the master controller chip is further configured to:
acquiring a target data specification of the data to be processed in the case that the data processing operation comprises a data writing operation;
determining the residual storage space of the buffer according to the storage information;
and executing the data processing operation on the data to be processed in the buffer and/or the magnetic disk according to the residual storage space and the target data specification.
5. The disk storage system of claim 4 wherein the master controller chip is further configured to:
determining the maximum writable data specification of the buffer according to the residual storage space;
determining the buffer and the disk as the target memory when the target data specification is greater than the maximum writable data specification;
according to the target data specification and the maximum writable data specification, dividing the data to be processed into data blocks to obtain a first data block and a second data block;
performing a data write operation on the first data block in the buffer;
performing a data write operation on the second data block in the disk;
wherein the data specification of the first data block is less than or equal to the maximum writable data specification; the second data block is a data block generated according to data except the data in the first data block in the data to be processed.
6. The disk storage system of claim 2, wherein the master controller chip is further configured to:
determining a storage address of the data to be processed in the case where the data processing operation includes a data reading operation;
Determining the buffer as the target memory under the condition that the data to be processed are stored in the disk and the buffer according to the storage address and the storage information;
and reading the data to be processed in the buffer according to the storage address.
7. The disc storage system of any one of claims 1-6 wherein the disc comprises a plurality of hard discs;
and combining a plurality of hard disks to form a disk array.
8. A disk storage method applied to the disk storage system according to any one of claims 1 to 7, comprising:
receiving a data processing instruction;
acquiring data to be processed and data processing operation of the data to be processed according to the data processing instruction;
according to the storage information of a buffer memory integrated on a main controller chip of a disk, executing the data processing operation on the data to be processed in the buffer memory and/or the disk;
wherein the data processing operation comprises a data read operation or a data write operation.
9. The disk storage method according to claim 8, wherein the performing the data processing operation on the data to be processed in the buffer and/or the disk according to the storage information of the buffer integrated on a main controller chip of the disk includes:
Determining a target memory in the buffer and the disk according to the stored information; the target memory is used for providing a data read-write memory space for the data to be processed;
dividing the data to be processed into a plurality of stripes under the condition that the buffer is determined to be the target memory; each of the stripes comprises a plurality of sub-data blocks;
dividing each sub data block into corresponding sets;
determining a target cache block corresponding to each sub data block in a plurality of cache blocks of the cache based on the set identification of the corresponding set and the association relation between each set and each cache block stored in a set association cache mapping table; the set association cache mapping table is pre-stored in the cache;
and executing the data processing operation on each sub data block in parallel in the buffer based on the target buffer block corresponding to each sub data block.
10. A server comprising a disk storage system according to any one of claims 1-7 and a processor;
the processor is connected with the disk storage system and is used for sending data processing instructions to the disk storage system.
CN202310572457.9A 2023-05-19 2023-05-19 Disk storage system, method and server Pending CN116774925A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310572457.9A CN116774925A (en) 2023-05-19 2023-05-19 Disk storage system, method and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310572457.9A CN116774925A (en) 2023-05-19 2023-05-19 Disk storage system, method and server

Publications (1)

Publication Number Publication Date
CN116774925A true CN116774925A (en) 2023-09-19

Family

ID=87993931

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310572457.9A Pending CN116774925A (en) 2023-05-19 2023-05-19 Disk storage system, method and server

Country Status (1)

Country Link
CN (1) CN116774925A (en)

Similar Documents

Publication Publication Date Title
US6523088B2 (en) Disk array controller with connection path formed on connection request queue basis
US20140104967A1 (en) Inter-memory data transfer control unit
US7774575B2 (en) Integrated circuit capable of mapping logical block address data across multiple domains
US20030093604A1 (en) Method of error isolation for shared PCI slots
CN115543894B (en) Storage system, data processing method and device, storage medium and electronic equipment
US20060212762A1 (en) Error management topologies
JP3266470B2 (en) Data processing system with per-request write-through cache in forced order
CN112417802B (en) Method, system, equipment and storage medium for simulating storage chip
JPH08227381A (en) Memory system and method for access to said system
US7412619B2 (en) Integrated circuit capable of error management
CN117135055A (en) Bandwidth resource control method and device, storage medium and electronic device
US8688889B2 (en) Virtual USB key for blade server
CN116774925A (en) Disk storage system, method and server
US20060277326A1 (en) Data transfer system and method
US7418545B2 (en) Integrated circuit capable of persistent reservations
CN115061958A (en) Hard disk identification method, identification system, storage medium and computer equipment
US20060047934A1 (en) Integrated circuit capable of memory access control
US7051175B2 (en) Techniques for improved transaction processing
CN117591037B (en) Virtualized data access system, method, device and server
CN117393013B (en) Efficient DDR control method and related device in statistical application
JP2018113075A (en) Information processing device
JP4737702B2 (en) Disk array controller
EP4102372A1 (en) Artificial intelligence chip and data operation method
US7512730B2 (en) Method for dynamically allocating interrupt pins
TWI591532B (en) Computer system and disk access method of the same

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