Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

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

Inactive Publication Date: 2016-01-27
CHENGDU HUAWEI TECH
View PDF4 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0009] Embodiments of the present invention provide a disk space allocation method and device, which are used to solve the problem that the existing management mechanism and allocation strategy of free disk space directly affect the efficient access to disk space, and further affect the performance of the entire system

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Disk space allocation method and device
  • Disk space allocation method and device
  • Disk space allocation method and device

Examples

Experimental program
Comparison scheme
Effect test

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...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a disk space allocation method and device. The method comprises the following steps: when receiving a request allocating a small space grain from a disk, determining the number of complete large spaces extent with no data stored in an idle space of the disk; if the number of the complete large spaces extent are not less than a set threshold, allocating the grain to the request from the complete large spaces extent; and otherwise, allocating the grain to the request from a fragmented space of the idle space. The method and the device disclosed by the invention are used for solving the problem that a management mechanism and an allocation policy of the idle space of the disk in the prior art directly affect the high efficiency access of the disk space to affect the performance of the entire system.

Description

technical field [0001] The invention relates to the field of electronic technology, in particular to a disk space allocation method and device. Background technique [0002] In the existing disk space management mechanism, the common allocation strategy is to first divide the disk space into fixed-length large blocks of space (extents), and then the allocator divides the extent into variable-length small blocks of space (grains) for use By. [0003] After a long period of use, the free disk space will gradually become fragmented. At this time, the space allocation mechanism has the problem that performance and management efficiency cannot be balanced. [0004] If the fragmented space is used first, the amount of fragmented space that the allocator needs to manage can be effectively reduced, but it will cause discontinuous allocation of space, resulting in discontinuous writing to the disk and affecting read and write performance; [0005] If the continuous space is used pr...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F12/02
Inventor 黄焰
Owner CHENGDU HUAWEI TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products