Grouping Data to Save Storage Space
By grouping metadata and data structures in fixed block size file systems and employing deduplication, the inefficiencies in storage capacity are addressed, resulting in improved performance and reduced waste.
Patent Information
- Application Number
- JP2023537291
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-01-12
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2041-01-12
AI Technical Summary
Fixed block size file systems waste storage space when storing files or metadata smaller than the fixed block size, leading to inefficiencies in data storage capacity.
Grouping root metadata data structures together in a file system block and using reference counts to manage storage, allowing data and metadata from multiple files to be combined into a single block, while also performing deduplication to reduce redundancy.
This approach reduces wasted storage capacity, improves data density, enhances file system performance by reducing the number of blocks needed, and decreases the workload for block allocation, thereby improving throughput and latency.
Smart Images

Figure 0007569939000001 
Figure 0007569939000002 
Figure 0007569939000003
Abstract
Description
[Technical field]
[0001] This disclosure relates generally to data storage, and more specifically to reducing wasted storage capacity in data storage systems. [Background technology]
[0002] Objects, such as files and the like, may typically include object data and object metadata. For example, object data may include the contents of an object, while object metadata may include information about the object data and the location of the object data within the file system. Furthermore, in a file system, object data and metadata may typically be stored in fixed-size file system blocks. Object data for objects larger than a single file system block may be split and stored across multiple file system blocks. The location of the file system block (i.e., data block) containing the object data for a particular object may be indicated by the type of file system metadata created for the object. File system metadata for an object may also be stored in one or more of the fixed block size file system blocks. Accordingly, a file system with a fixed block size may waste storage space whenever a file smaller than the fixed block size is stored in the file system. Similarly, a file system with a fixed block size may waste space whenever a metadata data structure smaller than the fixed block size is stored in a separate metadata file system block. Summary of the Invention [Means for solving the problem]
[0003] Some examples herein include a computing device that may collectively store root metadata data structures (DS) in a group root metadata file system block, and may store at least a first file data referenced by a first root metadata DS and a second file data referenced by a second root metadata DS in a data file system block. The computing device may determine a reference count of the data file system block based on the first file data referenced by the first root metadata DS and the second file data referenced by the second root metadata DS. In addition, the computing device may determine a third file data having content consistent with the first file data and referenced by a third root metadata DS. The computing device may update the third root metadata DS to reference the first file data, and update the reference count of the data file system block based on the update of the third root metadata DS. [Brief description of the drawings]
[0004] The detailed description is set forth with reference to the accompanying drawings, in which the leftmost digit(s) of a reference number identifies the figure in which the reference number first appears. Use of the same reference number in different figures indicates similar or identical items or features.
[0005] [Figure 1] FIG. 1 illustrates an example architecture of a metadata data structure (Metadata DS) and a system configured to enable grouping of object data while also enabling deduplication according to some implementations.
[0006] [Diagram 2] FIG. 2 illustrates an example format of an object tree according to some implementations.
[0007] [Diagram 3]FIG. 3 is a flow diagram illustrating an example process for allocating storage according to some implementations.
[0008] [Figure 4] FIG. 4 illustrates an example process for freeing up storage according to some implementations.
[0009] [Diagram 5] FIG. 5 illustrates an example of saving storage capacity based on grouping of stored data according to some implementations.
[0010] [Figure 6] FIG. 6 illustrates an example of saving storage capacity based on metadata DS and data grouping according to some implementations.
[0011] [Figure 7] FIG. 7 illustrates an example including deduplication of grouped data according to some implementations.
[0012] [Figure 8] FIG. 8 illustrates an example of saving storage capacity based on grouping of stored data according to some implementations. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0013] Some implementations herein can reduce wasted storage capacity in fixed block size file systems. For example, a file system may employ reference counting in a file system free space bitmap to allow data from multiple different small data files to be grouped into a single file system block. Similarly, multiple different small metadata data structures (metadata DS) may be grouped into a single file system block. In addition, some examples may group file data with other unrelated file data into a single file system block, and may also group metadata with other unrelated metadata into a single file system block. Thus, implementations herein can achieve higher data density than conventional solutions while deduplicating grouped file data to achieve additional storage capacity savings.
[0014] Examples herein can reduce the amount of wasted space in a file system, and therefore use less storage capacity overall for storing the same amount of data. Moreover, because fewer file system blocks are used, the amount of work the file system performs to find free blocks can be reduced, thereby improving the file serving performance of the file system, e.g., effectively improving throughput and reducing latency. In addition, because the amount of file system space used is reduced, less data can be written to the underlying storage system used to store the file system, thereby reducing the load on the storage system, and thereby improving the performance of the storage system.
[0015] For purposes of illustration, some example implementations are described in the context of one or more computing devices in communication with one or more storage and one or more client devices, but implementations herein are not limited to the specific examples provided and may be extended to other types of computing systems, other types of storage environments, other system architectures, etc., as would be apparent to one of ordinary skill in the art in light of the disclosure herein.
[0016] FIG. 1 illustrates an exemplary architecture of a system 100 configured to enable grouping of metadata data structures (metadata DS) and object data according to some implementations while also enabling deduplication. The system 100 includes one or more service computing devices 102 that can communicate with one or more storages 108. The service computing devices 102 may provide processing power and storage access to one or more client devices 114. In the case of multiple service computing devices 102, the service computing devices 102 may typically be connected to each other via a private network, a high-speed interconnect, and / or other suitable high-speed network connection technology (not shown in FIG. 1). For example, the system 100 may be accessible externally via various front-end protocols that may run on the service computing devices 102. The type of access may be via NAS protocols, block protocols, object-based protocols, and / or other standard and / or proprietary protocols.
[0017] 1, the service computing device 102 may be in communication with or connected to storage 108 via one or more storage networks 110. Additionally, the service computing device 102 may be capable of communicating over one or more client side networks 112 with one or more client devices 114, such as, for example, user devices or other devices that may access the service computing device 102. Thus, the service computing device 102 may store and manage data for the client devices 114 and may appear to the client devices 114 as a unified storage service.
[0018] In some examples, the service computing device 102 may include multiple physical servers or other types of computing devices, which may be embodied in numerous ways. For example, in the case of a server, portions of the modules, programs, other functional components, and data storage may be implemented on a server, such as, for example, a server farm or a cluster of servers, a data center, a cloud-hosted computing service, etc., although other computer architectures may additionally or alternatively be used. In the illustrated example, each service computing device 102 may include or be associated with one or more processors 116, one or more communication interfaces 118, and one or more computer-readable media 120. Additionally, although a description of one service computing device 102 is provided, if other service computing devices 102 are included, the other service computing devices 102 may have the same or similar hardware and software configurations and components.
[0019] Each processor 116 may be a single processing unit or many processing units and may include a single or multiple computing units or multiple processing cores. The processor 116 may be implemented as one or more central processing units, microprocessors, microcomputers, microcontrollers, digital signal processors, state machines, logic circuits, and / or any device that manipulates signals based on operational instructions. For example, the processor 116 may be one or more hardware processors and / or any suitable type of logic circuitry specifically programmed or configured to execute the algorithms and processes described herein. The processor 116 may be configured to fetch and execute computer readable instructions stored on the computer readable medium 120, which may program the processor 116 to perform the functions described herein.
[0020] The computer readable medium 120 may include volatile and non-volatile memory and / or removable and non-removable media implemented in any type of technology for storage of information such as computer readable instructions, data structures, program modules, or other data. For example, the computer readable medium 120 may include, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, optical storage, solid state storage, magnetic tape, magnetic disk storage, RAID storage systems, storage arrays, network attached storage, storage area networks, cloud storage, or any other medium that can be used to store the desired information and that can be accessed by a computing device. Depending on the configuration of the service computing device 102, the computer readable medium 120 may be a tangible non-transitory medium, insofar as non-transitory computer readable media when referred to excludes media such as energy, carrier signals, electromagnetic waves, and / or signals themselves. In some instances, the computer readable medium 120 may be co-located with the service computing device 102, while in other instances, the computer readable medium 120 may be separate or partially remote from the service computing device 102.
[0021] The computer-readable medium 120 may be used to store a number of functional components executable by the processor 116. In many implementations, these functional components include instructions, modules, or programs executable by the processor 116 that, when executed, specifically program the processor 116 to perform actions that pertain to the service computing device 102 herein. The functional components stored on the computer-readable medium 120 may include a service application 122, an operating system (OS) 124, and a software file system manager 126, each of which may include one or more computer programs, applications, executable code, computer readable instructions, or portions thereof. For example, the software file system manager 126 may be a module of the OS 124, a module of the service application 122, or may run independently on the OS 124. Additionally, service applications 122 may be executed by processor 116 to perform various data processing tasks, such as to interact with client devices 114, to store data for client devices 114 in storage 108, and / or to provide client devices 114 with access to data stored in storage 108. For example, service applications 122 may configure service computing device 102 to provide one or more services, which may include namespace management, process management, range allocation management, lock management, replication / data migration session management, and load balancing. Additionally, OS 124 may control and manage various functions of service computing device 102. Additionally, service computing device may include hardware file system manager 128 that interacts with software file system manager 126, which is described further below.
[0022] In addition, the computer-readable medium 120 may store data and data structures used to perform the functions and services described herein. For example, the computer-readable medium 120 may store data, metadata, data structures, and / or other information used by the software file system manager 126, the service applications 122, and / or the OS 124. The service computing device 102 may also include and maintain other functional components and data, which may include programs, drivers, etc., and other data used or generated by the functional components. Moreover, the service computing device 102 may include many other logical, programmatic, and physical components, of which the ones described above are merely examples relevant to the discussion herein.
[0023] The communication interface 118 may include one or more interfaces and hardware components to enable communication with various other devices, such as over the networks 110, 112. Thus, the communication interface 118 may include or connect to one or more ports that provide a connection to other service computing devices 102, a connection to the storage network 110 for communication with the storage 108, and a connection to the client-side network 112 for communication with the client devices 114. For example, the communication interface 118 may be capable of communication via one or more of a LAN (local area network), a WAN (wide area network), the Internet, a cable network, a cellular network, a wireless network (e.g., Wi-Fi), a wired network (e.g., Fibre Channel, Fiber Optic, Ethernet), a direct connection, short-range communication such as BLUETOOTH, and the like, as additionally enumerated elsewhere herein.
[0024] The storage network 110 and the client-side network 112 may include any suitable communication technology, including a WAN such as the Internet, a LAN such as an intranet, a cellular network, a wireless network such as a local wireless network such as Wi-Fi and / or a short-range wireless communication such as BLUETOOTH, a wired network including a direct wired connection, Fibre Channel, optical fiber, Ethernet, or any other such network, or any combination thereof. By way of example, the storage network 110 may employ Fibre Channel technology or other suitable storage network connection technology. Further, by way of example, the client-side network 112 may include the Internet, a LAN, a WAN, or a combination thereof. However, implementations herein are not limited to any particular network connection technology. Thus, the networks 110, 112 may include wired and / or wireless communication technologies. Additionally, the networks 110 and / or 112 may include a storage support network that allows for external management access to the service computing device 102 via a management computer system, such as may be implemented using one of the client devices 114 and other suitable computing devices.
[0025] The components used for the networks 110, 112 may depend at least in part on the type of network, the selected environment, the desired performance, and the like. For example, one or more of the networks 110 and / or 112 may include forwarding devices such as a switch or set of switches. By way of example, these switches may be Ethernet switches or any other suitable type of switch capable of 1 Gb / s, 10 Gb / s, 40 Gb / s, 100 Gb / s, or greater data rates. Thus, the service computing devices 102 may communicate with each other, with the storage 108 over the storage network 110, and with the client devices 114 over the client-side network 112 using wired and / or wireless connections, and combinations thereof. Additionally, in some examples, some or all of the networks 110, 112 may be the same network.
[0026] Each client device 114 may be any suitable type of computing device, such as a desktop, workstation, server, laptop, tablet computing device, mobile device, smartphone, wearable computing device, or any other type of computing device capable of transmitting data over a network. For example, the client devices 114 may generate or provide data that is transmitted to the service computing device 102 for data storage, backup storage, long-term remote storage, or any other type of data storage. In some cases, the client devices 114 may include a hardware configuration similar to that described for the service computing device 102, but have different data and functional components to enable the client devices 114 to perform the various functions discussed herein. In some cases, a user may be associated with each client device 114 via a user account, user login credentials, or the like.
[0027] Each client device 114(1)-114(M) may access one or more of the service computing devices 102 through a respective instance of a client application 131(1)-131(M), such as a browser or other application executing on the client device 114. For example, the client application 131 may provide a graphic user interface (GUI) and a command line interface and / or employ an application programming interface (API) for communicating with the service application 122 on the service computing device 102. Additionally, while an example client / server configuration is described herein, many other possible variations and applications for the computing system 100 herein will be apparent to those of ordinary skill in the art having the benefit of the disclosure herein.
[0028] Storage 108 may provide storage capacity for the service computing devices 102 for storage of data, such as file data or other object data, which may include data content and metadata about the content. Storage 108 may include a storage array, such as a network attached storage (NAS) system, a storage area network (SAN) system, or a storage virtualization system. Additionally, storage 108 may be co-located with one or more of the service computing devices 102, or may be located remotely or externally from the service computing devices 102.
[0029] In the illustrated example, storage 108 includes one or more storage computing devices referred to as storage controllers 132, which may include one or more servers (such as any of the examples discussed above with respect to service computing device 102) or any other suitable computing device. Each of storage controllers 132 may include one or more processors 134, one or more computer-readable media 136, and one or more communication interfaces 138. For example, processor 134 may correspond to any of the examples discussed above with respect to processor 116, computer-readable medium 136 may correspond to any of the examples discussed above with respect to computer-readable medium 120, and communication interface 138 may correspond to any of the examples discussed above with respect to communication interface 118.
[0030] Additionally, the computer-readable medium 136 of the storage controller 132 may be used to store a number of functional components executable by the processor 134. In many implementations, these functional components include instructions, modules, or programs executable by the processor 134 and that, when executed, specifically program the processor 134 to perform actions attributed to the storage controller 132 herein. The functional components stored on the computer-readable medium 136 may include a storage manager 140 and an OS 142, each of which may include one or more computer programs, applications, executable code, computer readable instructions, or portions thereof. For example, the storage manager 140 may control or manage the storage of data in a number of storage devices 144 connected to the storage controller 132. The OS 142 may control and manage various functions of the storage controller 132.
[0031] Additionally, the storage 144 may include one or more arrays 146(1)-146(L) of physical storage devices 148 in some instances. For example, the storage controller 132 may control the one or more arrays 146, such as to configure the arrays in a redundant array of independent disks (RAID) configuration or other desired storage configuration. The storage controller 132 may present logical units based on the physical devices to the service computing device 102 and may manage the data stored in the underlying physical devices 148. The physical devices 148 may be any type of storage device, such as hard disk drives, solid state devices, optical devices, magnetic tapes, etc., or combinations thereof. In some examples, the storage 108 may include thin provisioning capabilities configured to provide on-demand storage capacity and may also include failover protection, automatic replication, backup, archiving, etc. Alternatively, in other examples, one or more of the service computing devices 102 may act as storage controllers and the storage controller 132 may be eliminated.
[0032] In the illustrated example, the service computing device 102 and the storage 108 are configured to act as a data storage system 150 for the client devices 114. Each of the file system blocks herein may be a unit of storage corresponding to a portion of the physical storage of the storage 108. The service applications 122 on the service computing device 102 may execute to receive data from the client devices 114 and store the data in the storage 108 and / or subsequently retrieve data from the storage 108 and provide the data to the client devices 114. The data storage system 150 may be scalable to increase or decrease the number of service computing devices 102 and / or storage 108 as desired to provide a particular operating environment. For example, the performance of the storage system 150 may be scaled substantially linearly with the addition of service computing devices 102. The storage capacity included in the storage 108 may also be scaled as desired. In some implementations, the storage 108 may be scaled to petabytes or more of data storage space.
[0033] Additionally, the service computing device 102 and the client devices 114 may include any number of different computer systems, and the implementations disclosed herein are not limited to any particular number of computer systems or to any particular hardware configuration. Additionally, to increase fault tolerance, the communication interface 118 of the service computing device 102 may include redundant network connections to each of the networks to which the service computing device 102 is connected. Additionally, in some cases, the multi-file server architecture of the data storage system 150 may provide fault tolerance and file server failover. For example, if one of the service computing devices 102 were to fail, one or more of the other service computing devices 102 may be configured to detect the failure and automatically execute one or more processes previously executed by the failed service computing device 102 until a suitable replacement is deployed and operational. Additionally, at least some of the components disclosed herein may continue to function uninterrupted despite the failure of other of the service computing devices 102.
[0034] In some examples, each of the service computing devices 102 includes a service application 122, a software file system manager 126, a hardware file system manager 128, and / or other executable code and data structures configured to cause the data storage system 150 to perform the storage allocation and deduplication described herein. For example, the hardware file system manager 128 may include a free space allocator 152 and a memory 154. For example, the memory 154 may typically include a free space bitmap 156 and at least a portion of a file system 158. For example, the file system 158 may be persistently stored on the computer-readable medium 120 and loaded into a cache of the memory 154 during operation of the hardware file system manager 128. The free space bitmap 156 may be a series of bits, with each respective bit set in the bitmap 156 corresponding to a particular respective file system block in the file system 158. As an example, bitmap 156 may include a set of 8 bits per file system block, which may be used to indicate how many metadata DS are grouped together and stored in the same particular file system block, or how many small (i.e., smaller than a fixed block size) data files are stored in a particular file system block.
[0035] Also, because the number of bits in the free space bitmap 156 is finite, there is a maximum number of references that a block can have. If deduplication is performed and then data is to be grouped into blocks, the deduplication process may cause the reference count to reach its maximum value, which would mean that the file system block cannot be grouped into anything else and data grouping would fail. Similarly, if the deduplication process causes the reference count to be very close to its maximum value, there will not be much else that can be grouped into the file system block and data grouping will only be partially successful. However, some implementations herein may always perform grouping into file system blocks first, so that grouping will always be successful and deduplication will always be successful.
[0036] As an example, the free space allocator 152 may include one or more hardware components, such as one or more field programmable gate arrays (FPGAs). For example, the FPGA may be configured to perform the operations described herein using a hardware description language (HDL). In some examples, the FPGA may include an array of programmable logic blocks configured by the HDL to cooperate with the software file system manager 126 to perform at least a portion of the algorithms detailed herein. Accordingly, the service computing device 102 may perform space allocation through a division of processing between the software file system manager 126 and the hardware file system manager 128. The software file system manager 126 includes various software components that run under the operating system 124. The hardware file system manager 128 includes the free space allocator 152 configured to use the free space bitmap 156 to allocate file system blocks for storage of metadata and file data. A hardware / software interface 160 may be provided to enable communication between the software file system manager 126 and the hardware file system manager 128.
[0037] Software file system manager 126 may direct block allocation and deduplication functions in the background to control the impact of block allocation and deduplication on the performance of hardware file system manager 128. Both software file system manager 126 and hardware file system manager 128 may include various optimizations to reduce the amount of processing and communication required to perform block allocation and deduplication, which are described in detail below. In some examples, file system 158 may be configured to include reference counts in free space bitmap 156 to allow data from multiple different small (e.g., smaller than a fixed size of a file system block) data files to be grouped into a single file system block. Similarly, multiple different metadata data structures (metadata DS) may be grouped into a single file system block. Additionally, some examples may group file data with other unrelated file data into a single file system block, and may also group metadata with other unrelated metadata into a single file system block. For example, reference counts in file system free space bitmap 156 may be used to allow data from multiple different small files to be grouped into a single file system block.
[0038] Similarly, multiple different metadata structures (e.g., root metadata DS and intermediate metadata DS) may be grouped into a single file system block. Additionally, file data may be grouped together with file data of the same type, and metadata may be grouped together with metadata of the same type, thereby providing higher block storage density and enabling deduplication of the grouped file data using reference counting. As a result, as explained in further detail below, the techniques and arrangements herein may achieve substantial savings in storage capacity.
[0039] The data storage system 150 is not limited to the particular configuration shown in FIG. 1. This configuration is included for illustrative purposes only. Various examples herein utilize a variety of hardware components, software components, and combinations of hardware and software components configured to perform the processes and functions described herein. Furthermore, in some examples, some of the hardware components described above may be virtualized. For example, some or all of the service computing device 102 may include virtual machines running on one or more hardware processors 116 or portions thereof. Many other hardware and software configurations will be apparent to one of ordinary skill in the art having the benefit of the disclosure herein. Thus, the scope of the examples disclosed herein is not limited to any particular set of hardware, software, or combination thereof.
[0040] FIG. 2 illustrates an exemplary format of an object tree structure 200 according to some implementations. The service computing device 102 may store various types of objects in the file system 158. The objects may generally be classified as file objects and system objects. File objects may be created to store user data and associated attributes, such as text files, image files, multimedia files, etc. System objects may be created to manage information for the file system 158. In the examples herein, the file system 158 may be managed using a tree structure 200 created for each storage object. For example, the root metadata DS 202 (which may also be referred to as the “root node”) may include a pointer that points directly to a file data block or to one or more intermediate metadata DSs 203, at least one of which may point directly to a file data block.
[0041] Each object stored in file system 158 may be stored using a separate tree structure 200 that includes a separate root metadata DS 202. In the example of Figure 2, root metadata DS202 points to intermediate metadata DS203, which may be indirect metadata DS204 or direct metadata DS206. In this example, root metadata DS202 points to one or more indirect metadata DS204, each of which may point to one or more direct metadata DS206. The direct metadata DS206 directly point to data blocks 208 that store the object data.
[0042] For example, depending on the size of the stored data, the tree structure 200 may include one or more intermediate metadata DS203, which may be direct metadata DS206 that points directly to file data blocks 208, or indirect metadata DS204 that points to direct metadata DS206 or other indirect metadata DS204. If indirect metadata DS204 is used, the root metadata DS202 includes a pointer to the indirect metadata DS204. The indirect metadata DS204 may include a pointer to another indirect metadata DS204 or a pointer to the direct metadata DS206.
[0043] Direct metadata DS 206 points to multiple data blocks 208. In practice, object tree 200 may vary widely depending on the size of the objects being stored. Also, the tree 200 for a particular object may vary over time as data is added to or removed from the object. For example, intermediate metadata DS 203 and data blocks 208 may be dynamically added to tree 200 as more storage space is used for storing object data, and multiple levels of indirect metadata DS 204 may be used as needed as tree 200 grows.
[0044] As an example, assume that the root metadata DS 202 has a predefined size, such as a fixed number of bytes (e.g., 256, 512, 1024, etc.). The root metadata DS 202 may include various metadata, such as information about objects, and may also include file system storage location information. In this example, assume that the fixed size of the root metadata DS 202 allows the root metadata DS 202 to point to up to 16 data blocks 208 of object data.
[0045] When the object data for an object includes more than 16 data blocks, one or more direct metadata DS206 may be used to directly point to the data blocks 208, and if indirect metadata DS204 is used, the root metadata DS202 may point to the direct metadata DS206 or the indirect metadata DS204. In some cases, the direct DS206 and the indirect DS204 may be of a fixed size that is larger than the size of the root metadata DS202. For example, if the root metadata DS is 512 bytes, the direct metadata DS206 and the indirect metadata DS204 may be 1024 bytes, and thus the direct metadata DS206 may be able to point to more data blocks 208 than the root metadata DS202. As an example, each direct metadata DS may point to, for example, 60 data blocks 208, and each indirect metadata DS204 may point to, for example, 60 direct metadata DS206 or a combination of direct metadata DS206 and data blocks 208 totaling 60. For example, the root metadata DS may contain additional metadata not included in the direct and indirect metadata DS, and thus the direct and indirect metadata DS that are twice the size of the root metadata DS may store more than twice as many pointers as the root metadata DS. Thus, the file system 158 herein may use metadata DS of different fixed sizes that together form the metadata tree 200 to provide storage location information for the storage of data objects.
[0046] When an object is to be stored, a root metadata DS202 is first created for the object. The root metadata DS202 of such an "empty" object has no pointers to any intermediate metadata DS203 (i.e., indirect metadata DS204 or direct metadata DS206) or to data blocks 208. As file data is stored for an object, the file data may first be placed in file data blocks 208 pointed to directly by the root metadata DS202. Once all direct block pointers in the root metadata DS202 have been filled, if there is still data to store, one or more intermediate metadata DS203 may be generated using pointers from the root metadata DS202 to the intermediate metadata DS203.
[0047] A conventional fixed block size file system may waste storage space whenever file data smaller than the fixed block size is stored in the file system. Similarly, a conventional fixed block size file system may waste space whenever metadata DS of an object is stored in the file system if the metadata DS is smaller than the fixed block size. Accordingly, implementations herein include arrangements and methods for reducing the amount of this wasted space. As an example, the metadata DS (i.e., root metadata DS202 and intermediate metadata DS203) herein may be of different fixed sizes, where the fixed block size of the file system 158 is selected to be a multiple of the metadata DS, i.e., where the fixed block size of the file system is a multiple of the root metadata DS size and a different multiple of the intermediate metadata DS size. For example, as an example, if the root metadata DS202 is half the size of the intermediate metadata DS203, then twice the root metadata DS202 may fit into a single file system block as the intermediate metadata DS203.
[0048] In some instances, both the root metadata DS202 and the intermediate metadata DS203 may be sized such that a particular number of each metadata DS202, 203 fits into a fixed size file system block without wasting space. For example, if the file system block size is 32 KiB, the root metadata DS200 may be sized such that 64 root metadata DSs fit into a file system block without wasting space, and the intermediate metadata DS203 may be sized larger than the root metadata DS, such that, for example, 32 intermediate metadata DSs fit into a single file system block without wasting space. Furthermore, in some instances, the indirect metadata DS204 may be sized differently than the direct metadata DS206, but both may be sized such that the total fixed block size is a multiple of the size of the indirect metadata DS and the direct metadata DS.
[0049] In the example of Figure 2, the root metadata DS 202 may be grouped with other root metadata DSs (not shown in Figure 2) in a first file system block, such as a 32 kilobyte block, as shown at 210. Additionally, the indirect metadata data structure 204 and the direct metadata data structure 206 may be grouped with other intermediate metadata DSs (not shown in Figure 2) in a second file system block, as shown at 212 and 214, respectively. Additionally, in this example, the object data is spread across multiple file system data blocks 208, as shown at 216, and is divided among multiple data blocks such that each of the data blocks 208 corresponds to a file system block, with the last data block 208 likely to be only partially filled with data.
[0050] 3 and 4 are flow diagrams illustrating an exemplary process according to some implementations. The process is illustrated as a collection of logical flow diagram blocks representing a sequence of operations, some or all of which may be implemented in hardware, software, or a combination thereof. In the context of software, the blocks may represent computer-executable instructions stored on one or more computer-readable media, which, when executed by one or more processors, programs the processors to perform the recited operations. Generally, computer-executable instructions include routines, programs, objects, components, data structures, etc., that perform a particular function or implement a particular data type. The order in which the blocks are described should not be construed as limiting. The various blocks described can be combined in any order and / or in parallel to perform the process or alternative processes, and not all blocks need to be performed. For illustrative purposes, the process is described with reference to the environments, systems, and devices described in the examples herein, but the process may be implemented in a wide variety of other environments, systems, and devices.
[0051] 3 is a flow diagram illustrating an example process 300 for allocating storage according to some implementations. In some examples, the process may be performed at least in part by a free space allocator 152 or the like of a hardware file system manager 128 in communication with a software file system manager 126 executed by one or more processors 116 of the service computing device 102.
[0052] At 302, free space allocator 152 may search for free space in the file system to store data. For example, process 300 may be executed upon receiving a write request to search for space to store the received data. For example, metadata data structures and / or file data may need to be stored in file system 158. Alternatively, the process may be initiated manually by an administrator or automatically, such as periodically, to determine whether space can be freed up. To execute process 300, free space allocator 152 may traverse free space bitmap 156, discussed in detail above with respect to FIG. 1.
[0053] At 304, the free space allocator 152 may determine whether a process is running to store root metadata DS. If so, the process proceeds to 306. If not, the process proceeds to 312.
[0054] In 306, if the process is performed for the root metadata DS, the free space allocator 152 may determine whether the space for the root metadata DS is in an existing group root metadata DS (MDDS) file system block, i.e., in an existing file system block in which one or more root metadata DS are already stored. If so, the process proceeds to 308. If not, the process proceeds to 310.
[0055] At 308, if there is an existing group root metadata DS filesystem block with enough space, the computing device stores the root metadata DS in the existing root metadata DS filesystem block and increments the reference count of the existing group root metadata DS filesystem block by one. As mentioned above, the reference count may be determined from and incremented in free space bitmap 156 to indicate how much root metadata DS is stored in the existing group root metadata DS filesystem block, up to a maximum value based on a default size of the root metadata DS and a fixed size of a filesystem block.
[0056] On the other hand, if there is no existing group root metadata DS file system block with enough space at 310, free space allocator 152 may obtain a free file system block to create a new group root metadata DS file system block, store the root metadata DS in the new group root metadata DS file system block, and set the reference count for that block to one.
[0057] At 312, if the process is not being performed on the root metadata DS, the free space allocator 152 may determine whether the process is being performed on the intermediate metadata DS.
[0058] In 314, if the process is being performed on the intermediate metadata DS, the free space allocator 152 may check the free space bitmap 156 to determine whether there is space for the intermediate metadata DS in an existing group intermediate metadata DS file system block, i.e., an existing file system block that has one or more direct / indirect metadata DS.
[0059] At 316, if there is an existing group intermediate metadata DS file system block with sufficient space, the computing device stores the intermediate metadata DS in the existing group intermediate metadata DS file system block and increments the reference count of the existing group intermediate metadata DS file system block by one.
[0060] On the other hand, if there is no existing group intermediate metadata DS file system block with enough space at 318, the computing device obtains a free block to create a new group intermediate metadata DS file system block, stores the intermediate metadata DS in the new free intermediate metadata DS file system block, and sets a reference count for the block to one.
[0061] At 320, if the process is not being performed on the root metadata DS or on the intermediate metadata DS, the free space allocator 152 may determine whether the process is being performed on file data that does not exceed a threshold size. For example, the threshold size may be at least less than a fixed block size of a file system block. The determination of whether the file data is of a predefined size may be based on a preset size threshold that is less than the fixed block size of a file system block, such as half the size of a file system block, or small enough that it becomes worthwhile to group file data from multiple different files in the same file system block. If so, the process proceeds to 322. If not, the process proceeds to 328.
[0062] In 322, if the file data size is less than the threshold, free space allocator 152 may determine whether there is space for the file data in existing group file data file system blocks, i.e., existing file system blocks that have data for one or more other files stored therein.
[0063] At 324, if there is an existing group file data file system block with sufficient space, the free space allocator 152 may store the file data in the existing group file data file system block and increment the reference count of the existing file data file system block by one.
[0064] On the other hand, if there is no group file data file system block with enough space at 326, free space allocator 152 may obtain a free file system block to create a new group file data file system block, store the file data in the new group file data file system block, and set the reference count for that block to one.
[0065] On the other hand, if the file data is not less than the threshold size, at 328, the free space allocator 152 may obtain free file system blocks for use in storing the file data.
[0066] 4 shows an example process 400 for freeing up storage according to some implementations. In some examples, process 400 may be performed at least in part by free space allocator 152 of a hardware file system manager 128, or the like, in communication with a software file system manager 126 executed by one or more processors 116 of the service computing device 102.
[0067] At 402, the free space allocator 152 may begin a process to determine whether space can be freed, such as based on deleting a file from the file system.
[0068] In 404, after initiating the process to free up space, the free space allocator 152 may decrement the reference count of a particular file system block, such as because it is no longer pointed to by another block, such as by deleting the root metadata DS and / or intermediate metadata DS.
[0069] At 406, free space allocator 152 may determine whether the reference count for the particular file system block is currently zero. If so, the process proceeds to 410. If not, the process proceeds to 408.
[0070] At 408, if the reference count is not zero, the block is still in use and therefore is not marked as free.
[0071] At 410, if the reference count is zero, the block is marked as free, such as by updating the free space bitmap for the particular block and / or adding the block to a free block list and / or adding the block to the pool of available file system blocks.
[0072] As mentioned above, to manage free space, the file system may use a free space bitmap 156. In some examples, the file system herein may use 8 bits to represent the state of each file system block and may also use 8 bits for deduplication of file data. A particular value of the 8 bits may be used to indicate how many references exist for a block containing data that has been deduplicated, i.e., all duplicates of the data have been disposed of and a single common block remains. This is known as a reference count. The reference count for a block containing data may be between 1 (i.e., there is one reference to the file system block) and some maximum value. Attempts to deduplicate a block that exceeds the maximum value may result in a new block being used and then deduplication may be performed on the new block.
[0073] In the implementation herein, the same 8-bit value is also used to indicate how many metadata DS are grouped together in a group root metadata DS filesystem block and / or group intermediate metadata DS filesystem block. For example, if the root metadata DS is 512 bytes, then up to 64 root metadata DS may be grouped together in a single 32kB filesystem block. Similarly, for example, if the intermediate metadata DS is 1024 bytes, then up to 32 intermediate metadata DS may be grouped together in a single 32kB filesystem block.
[0074] FIG. 5 illustrates an example 500 of saving storage capacity based on grouping of stored data according to some implementations. In FIG. 5, a number of file system blocks 502-514 are illustrated. The file system block 502 includes six root metadata DS A, B, C, D, E, and F that are grouped together and stored in the same group file system block 502. The root metadata DS correspond to six different file objects A, B, C, D, E, and F that include six different file data, namely, file data A, file data B, file data C, file data E, and file data F, respectively. The reference count for the file system block 502 is six. Each of the file system blocks 504-514 stores one file data pointed to or referenced by each of the six root metadata DS A-F stored in the file system block 502. Since each of the file system blocks 504-514 stores only one file data, the reference count for each of the file system blocks 504-514 is one, as illustrated. For example, file system block 504 stores file data A pointed to by root metadata DS A of file system block 502, file system block 506 stores file data B pointed to by root metadata DS B of file system block 502, file system block 508 stores file data C pointed to by root metadata DS C of file system block 502, file system block 510 stores file data D pointed to by root metadata DS D of file system block 502, file system block 512 stores file data E pointed to by root metadata DS E of file system block 502, and file system block 514 stores file data F pointed to by root metadata DS F of file system block 502.
[0075] As detailed above, in some implementations, the 8-bit value of the free space bitmap 156 may be used to indicate for each file system block how many pieces of data are grouped together in that file system block. For example, if the file system block pointers have a granularity of 512 bytes, the pointers are sized to be able to point to blocks with a resolution / granularity of 512 bytes. For example, the smaller the block granularity, the larger the size of the pointers required, which will take up more space in each root or intermediate metadata DS. Furthermore, if the block pointer granularity is 512 bytes and the file system block size is 32 kB, then up to 64 pieces of data (each up to 512 bytes in size) may be grouped together in a single file system block. These pieces of data may be for up to 64 files (each file data up to 512 bytes in length), for a smaller number of larger files (each less than the file system block size), or for any combination totaling up to 32 kB.
[0076] Since data may be grouped together with the allocation of file system blocks, deduplication may be performed after allocation, independent of data grouping. Alternatively, deduplication may be performed before allocation, as discussed below, which means that duplicate data need not be grouped with other data. Alternatively, even if deduplication is not performed, storage space savings are still realized by grouping data into a smaller number of file system blocks.
[0077] FIG. 6 shows an example 600 of saving storage capacity based on grouping of metadata DS and data according to some implementations. In FIG. 6, a file system block 602 has six root metadata DS A-F grouped together for six different file data A-F, similar to the example of FIG. 5 detailed above. Meanwhile, a file system block 604 has six different corresponding file data A-F grouped together and pointed to by respective root metadata DS A-F. In this example, by grouping the root metadata DS with other root metadata DS, no space is wasted by the root metadata DS when the file system block 602 is completely filled with the root metadata DS, provided that the file system fixed block size is a multiple of the fixed size of the root metadata DS.
[0078] Further, in this example, each of the file data A-F is smaller than the threshold size detailed above with respect to 320 of FIG. 3, and each of the file data A-F is small enough that at least these six file data A-F can be accommodated in a single file system block 604. Thus, the reference count for the file system block 604 is six. The file data A-F may be of variable size. Thus, the process of FIG. 3 may be performed to determine whether additional file data can be added to the file system block 604.
[0079] In this example, it is assumed that block 604 is only partially filled. Thus, if storage of file data that fits within the remaining space of block 604 is required, the system may add additional file data to block 604. For example, based on process 300 of FIG. 3 detailed above, if the new piece of file data does not fit within the remaining space of block 604, a new block is used since the new piece of file data is not "split" in the implementations herein. Nevertheless, if the new piece of file data is of a size that is smaller than the file system block size, the partially filled block 604 may be left as is and the new block may be used instead to attempt to store subsequent file data until the new block is filled and cannot accommodate the new data segment. Alternatively, the new block may be used for the new piece of file data but not to group subsequent file data, and instead the existing partially filled block 604 may continue to be used. As yet another example, the system may attempt to fill both block 604 and the new block depending on the amount of available space in each of block 604 and the new block. Thus, implementations herein may dynamically determine which option to use for each and every data segment based on which option saves the most space in order to most efficiently group file data.
[0080] FIG. 7 illustrates an example 700 including deduplication of grouped data according to some implementations. In FIG. 7, a file system block 702 has six root metadata DS A-F grouped together for six different objects and six corresponding different file data A-F, similar to the example of FIG. 6 detailed above. Furthermore, a file system block 704(1) has six different corresponding file data A-F grouped together and pointed to by respective root metadata DS A-F at a first point in time. In this example, by grouping the root metadata DS with other root metadata DS, no space is wasted by the root metadata DS once the file system block 702 is completely filled with the root metadata DS, provided that the file system fixed block size is a multiple of the fixed size of the root metadata DS.
[0081] In this example, file system block 704(1) at a first point in time has a reference count of 6. Assume that at a second point in time, as indicated at 704(2), file data A is identical to file data G contained in another object G stored in another file system block (not shown in FIG. 7) and pointed to by another root metadata DS G. Thus, rather than maintaining identical data in the other file system block, file data G can be deduplicated such that file data A in file system block 704(2) is also pointed to by root metadata DS G. Based on this additional pointer, the reference count of file system block 704(2) is increased to 7 at the second point in time.
[0082] Similarly, assuming that at a third point in time as shown at 704(3), the file data A is identical to the file data H contained in another object H stored in another file system block (not shown in FIG. 7) and pointed to by another root metadata DS H, the reference count may again be incremented. Furthermore, assume that the file data F is identical to the file data J contained in another object J stored in another file system block (not shown in FIG. 7) and pointed to by another root metadata DS J. Thus, at the third point in time as shown for file system block 704(3), the reference count may be incremented to 9. The reference count of file system block 704 may continue to be incremented or decremented depending on the number of root metadata DSs (or intermediate metadata DSs (not shown in FIG. 7)) that point to the file data contained in file system block 704.
[0083] FIG. 8 illustrates an example 800 of saving storage capacity based on grouping of stored data according to some implementations. In FIG. 8, a file system block 802 has six root metadata DS A-F grouped together for six different file data A-F, and in this example, only a portion of the file data A for an object A is shown. Specifically, in this example, it is assumed that the file data A for an object A is larger than three file system blocks, and thus the first three portions of the file data A are shown as being contained in file system blocks 806, 808, and 810, respectively. Specifically, file data A(1) is stored in file system block 806, file data A(2) is stored in file system block 808, file data A(3) is stored in file system block 810, and so on.
[0084] Moreover, in this example, multiple intermediate metadata data structures are stored together in a group intermediate metadata DS file system block 804. By grouping the intermediate metadata DS with other intermediate metadata DS, no space is wasted by the intermediate metadata DS as soon as it completely fills the group file system block 804, provided that the fixed file system block size is a multiple of the intermediate metadata DS size. In this example, it is assumed that the root metadata DS A stored in block 802 points to the intermediate metadata DS A(1) stored in block 804. Similarly, the root metadata DS B stored in block 802 points to the intermediate metadata DS B stored in block 804, and the root metadata DS C stored in block 802 points to the intermediate metadata DS C stored in block 804. Furthermore, in this example, the intermediate metadata DS A(1) points to another intermediate metadata DS A(2) also stored in block 804. Intermediate metadata DS A(2) points to file data A(1) stored in file system block 806, file data A(2) stored in file system block 808, and file data A(3) stored in file system block 810. Thus, as explained in detail above with respect to Figure 2, intermediate metadata DS A(1) is indirect metadata DS, while intermediate metadata DS A(2) is direct metadata DS.
[0085] As an example, assume that when object A is first stored, intermediate metadata DS a(1) initially points to file data A(1), A(2), A(3), ..., but as more data is added to object A, intermediate metadata DS A(2) is added to point to data blocks 806-810 which contain file data A(1), A(2), A(3), ..., and intermediate metadata data structure A(1) is modified to reference intermediate metadata data structure A(2) rather than data blocks 806, 808, 810, ....
[0086] The exemplary processes described herein are merely examples of processes provided for illustrative purposes. Many other variations will be apparent to those skilled in the art in light of the disclosure herein. Furthermore, although the disclosure herein describes some examples of suitable frameworks, architectures and environments for carrying out the processes, the implementations herein are not limited to the specific examples shown and illustrated. Moreover, the disclosure provides various exemplary implementations as described and illustrated in the drawings. However, the disclosure is not limited to the implementations described and illustrated herein, and may extend to other implementations, as known or to become known to those skilled in the art.
[0087] Various instructions, methods, and techniques described herein may be considered in the general context of computer-executable instructions, such as computer programs and applications stored on a computer-readable medium and executed by a processor herein. In general, the terms programs and applications may be used interchangeably and may include instructions, routines, modules, objects, components, data structures, executable code, and the like, for performing particular tasks or implementing particular data types. These programs, applications, and the like may be executed as native code or downloaded and executed in a virtual machine or other just-in-time compilation execution environment. Typically, the functionality of the programs and applications may be combined or distributed as desired in various implementations. Implementations of these programs, applications, and techniques may be stored on computer storage media or transmitted over some form of communication medium.
[0088] Although the subject matter has been described in language specific to structural features and / or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described. Rather, the specific features and acts are disclosed as example forms of implementing the claims.
Claims
1. 1. A system including at least one computing device including one or more processors configured to perform operations for storing file data and metadata of the file data, the metadata including a root metadata data structure (DS), the operations comprising: storing a plurality of root metadata DS together in a group root metadata DS file system block, the plurality of root metadata DS including a first root metadata DS; storing at least first file data referenced by the first root metadata DS and second file data referenced by a second root metadata DS in a data file system block, the second root metadata DS being stored in the group root metadata DS or another group root metadata DS; determining a reference count of the data file system block based on at least the first file data referenced by the first root metadata DS and the second file data referenced by the second root metadata DS; determining third file data having content consistent with the first file data, the third file data being referenced by a third root metadata DS; updating the third root metadata DS to reference the first file data; updating the reference counts of the data file system blocks based on the updates to the third root metadata DS; Including, the system.
2. The operation includes: determining whether the group root metadata DS file system block has sufficient storage space for the new root metadata DS when storing the new root metadata DS; storing the new root metadata DS in the group root metadata DS file system block when the group root metadata DS file system block has sufficient storage space; storing the new root metadata DS in a new group root metadata DS file system block when the group root metadata DS file system block has insufficient storage space; The system of claim 1 further comprising:
3. 3. The system of claim 2, wherein the operation of determining whether the group root metadata DS file system block has sufficient storage space for the new root metadata DS includes accessing a bitmap to determine a reference count for the group root metadata DS file system block.
4. The system of claim 1 , wherein the action is performed automatically in response to a write request.
5. The system of claim 1 , wherein the first root metadata DS and the second root metadata DS are included in a same group root metadata DS file system block.
6. 2. The system of claim 1, wherein the reference count of a data file system block is incremented when another root metadata DS of another root metadata DS file system block references file data of the data file system block.
7. The system of claim 1 , further comprising storing the intermediate metadata DS with other intermediate metadata DS in a group intermediate metadata DS file system block.
8. The operation includes: determining whether the group intermediate metadata DS file system block has sufficient storage space for the new intermediate metadata DS when storing the new intermediate metadata DS; storing the intermediate metadata DS in an existing group intermediate metadata DS file system block when the group intermediate metadata DS file system block has sufficient storage space; storing the intermediate metadata DS in a new group intermediate metadata DS file system block when the group intermediate metadata DS file system block has insufficient storage space; The system of claim 7 further comprising:
9. 8. The system of claim 7, wherein a first intermediate metadata DS of the group intermediate metadata DS file system block references a second intermediate metadata DS of the group intermediate metadata DS file system block.
10. The system of claim 9 , wherein the first intermediate metadata DS is referenced by each of the plurality of root metadata DS of the group root metadata DS file system block.
11. The system of claim 10 , wherein the second intermediate metadata DS references data file system blocks.
12. storing, by the computing device, a plurality of root metadata DS together in a group root metadata DS file system block, the plurality of root metadata DS including a first root metadata DS; storing at least first file data referenced by the first root metadata DS and second file data referenced by a second root metadata DS in a data file system block, the second root metadata DS being stored in the group root metadata DS or another group root metadata DS; determining a reference count of the data file system block based on at least the first file data referenced by the first root metadata DS and the second file data referenced by the second root metadata DS; determining third file data having content consistent with the first file data, the third file data being referenced by a third root metadata DS; updating the third root metadata DS to reference the first file data; updating the reference counts of the data file system blocks based on the updates to the third root metadata DS; A method comprising:
13. determining whether the group root metadata DS file system block has sufficient storage space for the new root metadata DS when storing the new root metadata DS; storing the new root metadata DS in the group root metadata DS file system block when the group root metadata DS file system block has sufficient storage space; storing the new root metadata DS in a new group root metadata DS file system block when the group root metadata DS file system block has insufficient storage space; The method of claim 12 further comprising:
14. One or more non-transitory computer-readable media storing instructions executable by one or more processors for configuring the one or more processors to perform operations, the operations including: storing a plurality of root metadata DS together in a group root metadata DS file system block, the plurality of root metadata DS including a first root metadata DS; storing at least first file data referenced by the first root metadata DS and second file data referenced by a second root metadata DS in a data file system block, the second root metadata DS being stored in the group root metadata DS or another group root metadata DS; determining a reference count of the data file system block based on at least the first file data referenced by the first root metadata DS and the second file data referenced by the second root metadata DS; determining third file data having content consistent with the first file data, the third file data being referenced by a third root metadata DS; updating the third root metadata DS to reference the first file data; updating the reference counts of the data file system blocks based on the updates to the third root metadata DS; 1. One or more non-transitory computer-readable media.
15. The operation includes: determining whether the group root metadata DS file system block has sufficient storage space for the new root metadata DS when storing the new root metadata DS; storing the new root metadata DS in the group root metadata DS file system block when the group root metadata DS file system block has sufficient storage space; storing the new root metadata DS in a new group root metadata DS file system block when the group root metadata DS file system block has insufficient storage space; 15. The one or more non-transitory computer readable media of claim 14, further comprising:
Citation Information
Patent Citations
Apparatus and method for hardware-based file system
JP2006505069A
Hybrid storage ensemble replication
JP2015511037A
File Reading Method, Storage Device, and Reading System
JP2016526718A
File system with internal deduplication and management of data blocks
US20100121825A1
