Disk space allocation method and device
A disk space and allocation method technology, applied in the electronic field, can solve the problems affecting the performance of the whole system, affect the efficient access of disk space, etc., achieve the effect of continuous allocation of space, ensure read and write performance, and reduce the amount of fragmented space
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0044] Such as figure 2 As shown, a method for allocating disk space provided by the embodiment of the present invention, the specific implementation steps include:
[0045] Step 201, when receiving a request to allocate a small block space grain from the disk, determine the number of complete large block space extents that do not store data in the free space of the disk;
[0046] In this embodiment, in order to ensure the read and write performance while taking into account the read and write balance of the disk, it is detected whether there is a complete extent without any data written in the free space, and if there is, the space is directly allocated from the complete extent .
[0047] Step 202, if the number of extents of the complete large block space is not less than the set threshold, allocate grains from the entire large block space extent to the request; otherwise, allocate grains from the fragmented space in the free space Allocate grains to the request.
[0048] ...
Embodiment 2
[0061] The method provided by the embodiment of the present invention is described in further detail below in conjunction with specific examples, specifically including:
[0062] For a file system or LUN, the total space size is A; after reading and writing to the file system or LUN for a period of time, the used space increases and the free space (F) decreases gradually. F consists of two parts of space, full extent space (E) and fragmented space (G). In this embodiment, the setting threshold corresponding to the ratio of free space can be set to 30%, then the specific implementation of the method can be:
[0063] A. When receiving a request to allocate a small space grain from the disk, determine the number of complete extents in F, and if the number of complete extents is greater than 1, allocate grains from the E space to the request.
[0064] Because the allocated space is continuous, the read and write performance is high; on the other hand, because different extents ar...
Embodiment 3
[0074] Such as Figure 5 As shown, the embodiment of the present invention also provides a disk space allocation device, which specifically includes:
[0075] A statistics module 501, configured to determine the number of complete large block space extents that do not store data in the free space of the disk when receiving a request for allocating small block space grains from the disk;
[0076] An allocation module 502, configured to allocate a grain from the complete large space extent to the request if the quantity of the complete large space extent is not less than a set threshold; otherwise, allocate a grain from the free space to the request; Allocate grains in the localization space to the request.
[0077] Optionally, the allocation module 502 is specifically configured to determine an internal discrete value of each extent; wherein, the internal discrete value is used to represent the degree of fragmentation of the internal free space of each extent; according to the...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com