CN109063103A - A kind of non-volatile file system of distribution - Google Patents

A kind of non-volatile file system of distribution Download PDF

Info

Publication number
CN109063103A
CN109063103A CN201810846379.6A CN201810846379A CN109063103A CN 109063103 A CN109063103 A CN 109063103A CN 201810846379 A CN201810846379 A CN 201810846379A CN 109063103 A CN109063103 A CN 109063103A
Authority
CN
China
Prior art keywords
memory space
storage
metadata
volatile
space
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
CN201810846379.6A
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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201810846379.6A priority Critical patent/CN109063103A/en
Publication of CN109063103A publication Critical patent/CN109063103A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a kind of non-volatile file system of distribution, including multiple meta data servers, multiple storage servers, one or more nonvolatile memories are provided in each storage server, all nonvolatile memories are mapped to the memory headroom of an entirety;Wherein, any one meta data server, for when receiving the storage request for file destination, file destination to be divided into multiple bands;According to the size of each band, by search space can allocation table, distribute corresponding memory headroom for each band;Initial address and offset of each band in memory headroom are recorded in the metadata of file destination.Using technical solution provided by the embodiment of the present invention, file storage is carried out using nonvolatile memory, quick metadata access may be implemented, reduce the lookup time of metadata, reduces data copy, reduces read and write access delay.

Description

Distributed nonvolatile file system
Technical Field
The invention relates to the technical field of computer application, in particular to a distributed non-volatile file system.
Background
With the rapid development of computer technology, the performance gap between a processor and a memory is getting larger and larger, and particularly, the performance gap between the processor and a memory is particularly obvious, so that the I/O bottleneck problem is getting more and more prominent.
In order to alleviate the problem of the bottleneck of the I/O, the conventional method is to set a disk file cache in the memory, so as to reduce the number of times of accessing the external memory.
However, the demand of data explosion-type growth on the memory capacity is increasing, the benefits brought by increasing the cache capacity in the traditional method are reduced, and the frequent data exchange between the internal memory and the external memory generates larger overhead and larger read-write access delay.
Disclosure of Invention
The invention aims to provide a distributed nonvolatile file system to realize quick metadata access, reduce metadata searching time, reduce data copying and reduce read-write access delay.
In order to solve the technical problems, the invention provides the following technical scheme:
a distributed nonvolatile file system comprises a plurality of metadata servers and a plurality of storage servers, wherein each storage server is provided with one or more nonvolatile memories, and all the nonvolatile memories are mapped into an integral memory space; wherein,
any one metadata server, configured to divide a target file into a plurality of stripes when receiving a storage request for the target file; allocating a corresponding memory space for each strip by inquiring a space allocable table according to the size of each strip; and recording the starting address and the offset of each stripe in the memory space in the metadata of the target file.
In one embodiment of the present invention,
any metadata server is specifically configured to, when the storage request carries storage location information, preferentially allocate, by querying a space allocable table, a corresponding memory space for each stripe in the storage server corresponding to the storage location according to the size of each stripe.
In one embodiment of the present invention,
any metadata server is specifically configured to allocate a corresponding memory space to each stripe by querying a space allocable table according to the size of each stripe and the load degree of the storage server.
In one embodiment of the present invention,
any metadata server is specifically configured to allocate, according to the size of each stripe, a corresponding memory space to each stripe in the memory space of the storage server whose load degree is smaller than the preset threshold by querying the space allocable table.
In one embodiment of the present invention,
and any metadata server is also used for recording the released memory space in the space allocable table when the memory space is monitored to be released.
In one embodiment of the present invention,
any metadata server is further used for mapping the copy file of the target file to the memory space for storage when receiving a storage request for the target file.
In one embodiment of the present invention, all non-volatile memories are mapped to a global shared address of the overall memory space.
In one embodiment of the present invention, the addresses of the entire memory space to which all the nonvolatile memories are mapped include virtual addresses and physical addresses.
In one embodiment of the present invention,
any one metadata server is specifically configured to record, in the metadata of the target file, a starting virtual address and an offset of each stripe in the memory space.
In one embodiment of the present invention,
any metadata server is further configured to, when receiving an access request for the target file, determine a physical start address of the target file by querying a memory mapping table according to a start virtual address and an offset of the target file in a memory space, and read the target file.
By applying the technical scheme provided by the embodiment of the invention, one or more nonvolatile memories are arranged in each storage server in the distributed nonvolatile file system, all the nonvolatile memories are mapped into an integral memory space, the metadata server divides the target file into a plurality of strips when receiving a storage request aiming at the target file, allocates a corresponding memory space for each strip by inquiring a space allocable table according to the size of each strip, and records the initial address and the offset of each strip in the memory space in the metadata of the target file. The file storage is carried out by utilizing the nonvolatile memory, so that the quick metadata access can be realized, the searching time of the metadata is reduced, the data copy is reduced, and the read-write access delay is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic structural diagram of a distributed non-volatile file system according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating an implementation of a file storage method according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the disclosure, the invention will be described in further detail with reference to the accompanying drawings and specific embodiments. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a distributed nonvolatile file system which comprises a plurality of metadata servers and a plurality of storage servers, wherein each storage server is provided with one or more nonvolatile memories, and all the nonvolatile memories are mapped into an integral memory space. The random access performance of the nonvolatile storage device can be better utilized by storing the file by means of the nonvolatile memory. All nonvolatile memories are mapped into the global address sharing of the whole memory space, and all nodes such as a metadata server and a storage server in the distributed nonvolatile file system can see a consistent view. The memory space on each storage server formed by each nonvolatile memory is uniformly managed and mapped into an integral memory space, the same address points to the same position, and the uniform address space can be byte-addressable and is formed by persistent nonvolatile memories.
As shown in fig. 1, the structural diagram of a distributed non-volatile file system is shown, and the structural diagram includes a metadata server 1, a metadata server 2, a metadata server 3, a storage server 1, a storage server 2, and a storage server 3, where each storage server is provided with two non-volatile memories, and all the non-volatile memories are mapped into an integral memory space, and the integral memory space has the characteristics of distribution, high reliability, persistence, uniform address, byte addressing, and the like. The client can store the file into the memory space through the metadata server, and simultaneously can read the file in the memory space and execute corresponding I/O operation. Multi-user, concurrent access is supported.
It should be noted that the numbers of the metadata server, the storage server, and the nonvolatile memory shown in fig. 1 are merely examples, and there may be more metadata servers, storage servers, and nonvolatile memories in practical applications.
As shown in fig. 2, in the distributed nonvolatile file system, any one of the metadata servers performs file storage by:
s210: when a storage request for a target file is received, dividing the target file into a plurality of strips;
s220: allocating a corresponding memory space for each strip by inquiring a space allocable table according to the size of each strip;
s230: and recording the starting address and the offset of each stripe in the memory space in the metadata of the target file.
In the embodiment of the invention, the client can send a storage request aiming at the file to the corresponding metadata server according to actual needs. For any metadata server in the distributed non-volatile file system, the metadata server may divide the target file into a plurality of stripes upon receiving a storage request for the target file.
Specifically, a partition rule may be preset, for example, the partition is performed according to a set size, and the size of the last stripe after the partition is smaller than or equal to the set size, or different size partitions are set according to different types of files. The metadata server may perform stripe division on the target file according to the set rule to obtain a plurality of stripes.
After the target file is divided into a plurality of strips, a corresponding memory space can be further allocated to each strip by querying a space allocable table according to the size of each strip. The space allocable table records the free memory space currently available for allocation. By looking up the space allocable table, the size of each free memory space can be known. The sizes of the stripes may be the same or different, and when the corresponding memory space is allocated to each stripe, the sizes are matched as much as possible, so that the formation of small fragments and holes is avoided.
In a specific embodiment of the present invention, when a storage request carries storage location information, any one metadata server is specifically configured to, according to the size of each stripe, allocate, by querying a space allocable table, a corresponding memory space preferentially to each stripe in a storage server corresponding to the storage location.
In practical application, the client may determine the storage location of the file according to actual conditions, for example, according to the load condition, communication cost, and the like of the storage server, so that the storage location information may be carried in the storage request. When receiving a storage request for a target file, the metadata server may obtain storage location information carried in the storage request. After the target file is divided into a plurality of strips, the memory space of the storage server corresponding to the storage position is preferentially selected for allocation by inquiring the space allocable table according to the size of each strip. When the storage server corresponding to the storage position has no free memory space, the memory space of other storage servers can be allocated according to a default rule.
In another embodiment of the present invention, any one of the metadata servers is specifically configured to allocate a corresponding memory space for each stripe by querying the space allocable table according to the size of each stripe and the load level of the storage server.
Specifically, according to the size of each stripe, a corresponding memory space may be allocated to each stripe in the memory space of the storage server whose load degree is smaller than the preset threshold by querying the space allocable table.
In the embodiment of the present invention, when receiving a storage request for a target file, a metadata server may first obtain a load degree of a storage server, determine, by querying a space allocable table, a free memory space in the storage server whose load degree is smaller than a preset threshold, and adaptively allocate, in accordance with a size of each stripe, a corresponding memory space for each stripe in the memory spaces.
After allocating a corresponding memory space for each stripe, recording the start address and the offset of each stripe in the memory space in the metadata of the target file.
Specifically, the starting virtual address and the offset of each stripe in the memory space may be recorded in the metadata of the target file.
In the embodiment of the present invention, the addresses of the entire memory space into which all the nonvolatile memories are mapped include virtual addresses and physical addresses, that is, the entire memory space into which all the nonvolatile memories are mapped may be divided into a virtual address space and a physical address space. The physical address space refers to a PM (Persistent Memory), and stores include PM metadata information, a Memory mapping table, a file system space, and the like. The PM metadata information includes the PM internal size, the starting location of the metadata partition, the starting location and size of the mapping table, and the starting location and size of the file system space. The memory mapping table maintains a mapping of pages (pages) of the file system space to virtual addresses. The file system space stores data and metadata information of the actual file.
In an embodiment of the present invention, any one of the metadata servers is further configured to, when receiving an access request for a target file, determine a physical start address of the target file by querying a memory mapping table according to a start virtual address and an offset of the target file in a memory space, and read the target file.
After the target file is mapped to the memory space for storage, the client can access the target file. When receiving an access request for a target file, a metadata server can determine a physical start address of the target file by querying a memory mapping table according to a start virtual address and an offset of the target file in a memory space, and can read the target file and respond to the access request based on the physical start address and the offset.
The file is divided into pages and mapped to virtual addresses, and the continuity of the virtual addresses is guaranteed. The access to the file only needs to record the initial virtual address and the offset of the file to find the storage position of the file. The location of the file needs to be recalculated when an offset is added to the start location of the file. And the virtual address is loaded in the memory space, so that the access efficiency of the file system can be improved. The spatial structure of the virtual address includes a superblock, a metadata table inode table, and a file area file region.
In an embodiment of the present invention, any one of the metadata servers is further configured to record the released memory space in the space allocable table when it is monitored that the memory space is released.
Files stored in the memory space may release the memory space due to deletion or the like. When the metadata server monitors that the memory space is released, the metadata server can record the released memory space in the space allocable table, and reallocate the released memory space to realize the recycling of the memory space. The size of the memory space in the space allocable table can be in bytes, so that the waste of the memory space is avoided.
In one embodiment of the present invention, any one of the metadata servers is further configured to map a copy file of the target file to the memory space storage upon receiving a storage request for the target file. The storage mode of the copy file may be consistent with that of the target file, and the embodiment of the present invention is not described herein again.
By applying the technical scheme provided by the embodiment of the invention, one or more nonvolatile memories are arranged in each storage server in the distributed nonvolatile file system, all the nonvolatile memories are mapped into an integral memory space, the metadata server divides the target file into a plurality of strips when receiving a storage request aiming at the target file, allocates a corresponding memory space for each strip by inquiring a space allocable table according to the size of each strip, and records the initial address and the offset of each strip in the memory space in the metadata of the target file. The file storage is carried out by utilizing the nonvolatile memory, so that the quick metadata access can be realized, the searching time of the metadata is reduced, the data copy is reduced, and the read-write access delay is reduced.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The principle and the implementation of the present invention are explained in the present application by using specific examples, and the above description of the embodiments is only used to help understanding the technical solution and the core idea of the present invention. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.

Claims (10)

1. A distributed non-volatile file system is characterized by comprising a plurality of metadata servers and a plurality of storage servers, wherein each storage server is provided with one or more non-volatile memories, and all the non-volatile memories are mapped into an integral memory space; wherein,
any one metadata server, configured to divide a target file into a plurality of stripes when receiving a storage request for the target file; allocating a corresponding memory space for each strip by inquiring a space allocable table according to the size of each strip; and recording the starting address and the offset of each stripe in the memory space in the metadata of the target file.
2. The distributed non-volatile file system of claim 1,
any metadata server is specifically configured to, when the storage request carries storage location information, preferentially allocate, by querying a space allocable table, a corresponding memory space for each stripe in the storage server corresponding to the storage location according to the size of each stripe.
3. The distributed non-volatile file system of claim 1,
any metadata server is specifically configured to allocate a corresponding memory space to each stripe by querying a space allocable table according to the size of each stripe and the load degree of the storage server.
4. The distributed non-volatile file system of claim 3,
any metadata server is specifically configured to allocate, according to the size of each stripe, a corresponding memory space to each stripe in the memory space of the storage server whose load degree is smaller than the preset threshold by querying the space allocable table.
5. The distributed non-volatile file system of any of claims 1 to 4,
and any metadata server is also used for recording the released memory space in the space allocable table when the memory space is monitored to be released.
6. The distributed non-volatile file system of claim 1,
any metadata server is further used for mapping the copy file of the target file to the memory space for storage when receiving a storage request for the target file.
7. The distributed non-volatile file system of claim 1, wherein all non-volatile memory is mapped to a global share of addresses of the overall memory space.
8. The distributed non-volatile file system of claim 7, wherein the addresses of the entire memory space to which all non-volatile memory is mapped comprise virtual addresses and physical addresses.
9. The distributed non-volatile file system of claim 8,
any one metadata server is specifically configured to record, in the metadata of the target file, a starting virtual address and an offset of each stripe in the memory space.
10. The distributed non-volatile file system of claim 9,
any metadata server is further configured to, when receiving an access request for the target file, determine a physical start address of the target file by querying a memory mapping table according to a start virtual address and an offset of the target file in a memory space, and read the target file.
CN201810846379.6A 2018-07-27 2018-07-27 A kind of non-volatile file system of distribution Pending CN109063103A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810846379.6A CN109063103A (en) 2018-07-27 2018-07-27 A kind of non-volatile file system of distribution

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810846379.6A CN109063103A (en) 2018-07-27 2018-07-27 A kind of non-volatile file system of distribution

Publications (1)

Publication Number Publication Date
CN109063103A true CN109063103A (en) 2018-12-21

Family

ID=64835788

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810846379.6A Pending CN109063103A (en) 2018-07-27 2018-07-27 A kind of non-volatile file system of distribution

Country Status (1)

Country Link
CN (1) CN109063103A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110221779A (en) * 2019-05-29 2019-09-10 清华大学 The construction method of distributed persistence memory storage system
CN110474992A (en) * 2019-09-25 2019-11-19 苏州浪潮智能科技有限公司 A kind of document transmission method, device, equipment and storage medium
CN110807125A (en) * 2019-08-03 2020-02-18 北京达佳互联信息技术有限公司 Recommendation system, data access method and device, server and storage medium
CN111061652A (en) * 2019-12-18 2020-04-24 中山大学 Nonvolatile memory management method and system based on MPI-IO middleware
CN111367863A (en) * 2018-12-25 2020-07-03 深圳市茁壮网络股份有限公司 Method and system for partially modifying file
CN111435342A (en) * 2019-01-14 2020-07-21 深圳市茁壮网络股份有限公司 Poster updating method, poster updating system and poster management system
CN112114738A (en) * 2019-06-20 2020-12-22 杭州海康威视数字技术股份有限公司 Data storage method and storage device
CN112667577A (en) * 2020-12-25 2021-04-16 浙江大华技术股份有限公司 Metadata management method, metadata management system and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101997918A (en) * 2010-11-11 2011-03-30 清华大学 Method for allocating mass storage resources according to needs in heterogeneous SAN (Storage Area Network) environment
CN104144150A (en) * 2013-05-10 2014-11-12 中国电信股份有限公司 Method, device and system for having access to information through metadata
CN104348793A (en) * 2013-07-30 2015-02-11 阿里巴巴集团控股有限公司 Storage server system and storage method for data information
CN107967124A (en) * 2017-12-14 2018-04-27 南京云创大数据科技股份有限公司 A kind of distribution persistence memory storage system and method
CN108268208A (en) * 2016-12-30 2018-07-10 清华大学 A kind of distributed memory file system based on RDMA

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101997918A (en) * 2010-11-11 2011-03-30 清华大学 Method for allocating mass storage resources according to needs in heterogeneous SAN (Storage Area Network) environment
CN104144150A (en) * 2013-05-10 2014-11-12 中国电信股份有限公司 Method, device and system for having access to information through metadata
CN104348793A (en) * 2013-07-30 2015-02-11 阿里巴巴集团控股有限公司 Storage server system and storage method for data information
CN108268208A (en) * 2016-12-30 2018-07-10 清华大学 A kind of distributed memory file system based on RDMA
CN107967124A (en) * 2017-12-14 2018-04-27 南京云创大数据科技股份有限公司 A kind of distribution persistence memory storage system and method

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111367863A (en) * 2018-12-25 2020-07-03 深圳市茁壮网络股份有限公司 Method and system for partially modifying file
CN111435342A (en) * 2019-01-14 2020-07-21 深圳市茁壮网络股份有限公司 Poster updating method, poster updating system and poster management system
CN111435342B (en) * 2019-01-14 2023-12-05 深圳市茁壮网络股份有限公司 Poster updating method, poster updating system and poster management system
CN110221779A (en) * 2019-05-29 2019-09-10 清华大学 The construction method of distributed persistence memory storage system
CN110221779B (en) * 2019-05-29 2020-06-19 清华大学 Construction method of distributed persistent memory storage system
CN112114738A (en) * 2019-06-20 2020-12-22 杭州海康威视数字技术股份有限公司 Data storage method and storage device
CN112114738B (en) * 2019-06-20 2024-02-20 杭州海康威视数字技术股份有限公司 Method for storing data and storage device
CN110807125A (en) * 2019-08-03 2020-02-18 北京达佳互联信息技术有限公司 Recommendation system, data access method and device, server and storage medium
CN110474992B (en) * 2019-09-25 2022-07-22 苏州浪潮智能科技有限公司 File transmission method, device, equipment and storage medium
CN110474992A (en) * 2019-09-25 2019-11-19 苏州浪潮智能科技有限公司 A kind of document transmission method, device, equipment and storage medium
CN111061652A (en) * 2019-12-18 2020-04-24 中山大学 Nonvolatile memory management method and system based on MPI-IO middleware
CN111061652B (en) * 2019-12-18 2021-12-31 中山大学 Nonvolatile memory management method and system based on MPI-IO middleware
CN112667577A (en) * 2020-12-25 2021-04-16 浙江大华技术股份有限公司 Metadata management method, metadata management system and storage medium

Similar Documents

Publication Publication Date Title
CN109063103A (en) A kind of non-volatile file system of distribution
EP3869316B1 (en) Hybrid storage
US11861204B2 (en) Storage system, memory management method, and management node
KR101726824B1 (en) Efficient Use of Hybrid Media in Cache Architectures
KR102061079B1 (en) File accessing method and related device
CN108021513B (en) Data storage method and device
JP2019008729A (en) Memory system and control method
US9355121B1 (en) Segregating data and metadata in a file system
US10824555B2 (en) Method and system for flash-aware heap memory management wherein responsive to a page fault, mapping a physical page (of a logical segment) that was previously reserved in response to another page fault for another page in the first logical segment
CN112241320B (en) Resource allocation method, storage device and storage system
CN103116552A (en) Method and device for distributing storage space in distributed type storage system
CN111930643B (en) Data processing method and related equipment
CN107817946B (en) Method and device for reading and writing data of hybrid storage device
US11119657B2 (en) Dynamic access in flash system
CN115599544A (en) Memory management method and device, computer equipment and storage medium
CN110955488A (en) Virtualization method and system for persistent memory
US20050169058A1 (en) Data management apparatus and method used for flash memory
US10387043B2 (en) Writing target file including determination of whether to apply duplication elimination
CN110674051A (en) Data storage method and device
US20050108269A1 (en) Device for storing data and method for dividing space for data storing
KR20110070656A (en) Method and apparatus for processing data of flash memory
US20060139786A1 (en) Method and apparatus for exchanging data with a hard disk
CN111722802B (en) Storage space allocation method, device and equipment for metadata LSA volume
CN114610228A (en) File management system and file management method and device thereof
CN107608636B (en) Design method based on FAT file system and data acquisition device applied by 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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20181221