CN103577470B - A kind of file system and method for lifting web server performance - Google Patents

A kind of file system and method for lifting web server performance Download PDF

Info

Publication number
CN103577470B
CN103577470B CN201210275779.9A CN201210275779A CN103577470B CN 103577470 B CN103577470 B CN 103577470B CN 201210275779 A CN201210275779 A CN 201210275779A CN 103577470 B CN103577470 B CN 103577470B
Authority
CN
China
Prior art keywords
file
disk
data
request
file system
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.)
Expired - Fee Related
Application number
CN201210275779.9A
Other languages
Chinese (zh)
Other versions
CN103577470A (en
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.)
Shanghai Jiaotong University
Original Assignee
Shanghai Jiaotong University
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 Shanghai Jiaotong University filed Critical Shanghai Jiaotong University
Priority to CN201210275779.9A priority Critical patent/CN103577470B/en
Publication of CN103577470A publication Critical patent/CN103577470A/en
Application granted granted Critical
Publication of CN103577470B publication Critical patent/CN103577470B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/172Caching, prefetching or hoarding of files

Abstract

The present invention provides a kind of file system and method for lifting web server performance, and this document system includes disk space, and disk space includes magnetic disk metadata area and data in magnetic disk area;Magnetic disk metadata area includes file system superblock, file directory item bitmap, volume information array and file directory item;Data in magnetic disk area includes multiple fixed-size volumes;Wherein, each volume includes multiple size identical file disk blocks, and file disk block is used to deposit the small documents in web server.The present invention is directed to the application environment simplification disk space management that large amount of small documents is preserved in web server so that file data is continuously deposited, and avoids disk fragmentses;Disk operating number in reading and writing of files data procedures is reduced, reduces the API interaction times of file system, effectively improves the performance of file system;By Hash linked list arrays, simplify and accelerate document alignment process;The I/O operation of the file system uses asynchronous mode, when eliminating synchronous I/O operation the problem of obstruction application program.

Description

A kind of file system and method for lifting web server performance
Technical field
The invention belongs to computer hardware management domain, is related to a kind of file system and method, is carried more particularly to one kind Rise the file system and method for web server performance.
Background technology
In an operating system, file system is in a critically important status, with computer hardware performance(Such as CPU, Bus bandwidth)Continuous lifting, where hard disk is increasingly becoming systematic function bottleneck.And file system is used for number on hyperdisk According to how efficiently hyperdisk data, the performance for giving full play to disk unit are always the target that file system is pursued.
Earlier such as ext2 file system by disk according to fixed size such as 1024 bytes, 2048 bytes, 4096 bytes Blocking Deng dividing, file data storing so causes the file more than block size not deposit continuously, less than disk block in block The file of size may result in serious disk fragmentses problem.
Processing small documents application ring in the majority is good at by the Hans Reiser and its team Namesys ResierFs developed Border.ResierFs does not distribute some small documents inode, but these small documents are packed, and is stored in same disk piecemeal In.And ReiserFS is searched for based on Fast-Balance tree (balanced tree), balanced tree is very tall and erect on search performance More.
Silicon Graphics are that the high-performance log file system XFS of IRIX operating systems exploitation is good at the big text of processing Part.It provides the method for salary distribution based on extent, and variable block length allows user to specify block big when formatting as needed Small, from 512 bytes to 64KB, it can reduce disk fragmentses problem, delayed allocation machine as far as possible under small documents application environment System can continuously deposit file data to greatest extent, and can reduce disk fragmentses problem while performance is improved.
Above-mentioned traditional file systemses are optimized using various thoughts to file system performance, but due to needing for file The data structure such as inode, dentry is preserved, therefore needs to carry out repeatedly extra disk operating before read-write data every time, this Sample just can not ensure that file data reduces disk fragmentses as far as possible while continuous storage on disk.Traditional file systemses are reading text Firstly the need of the metadata information of locating file before number of packages evidence, and this is generally also to be stored on disk.So, reading effectively Multiple I/O operation is needed before data to position the storage location of file.For small documents, this can exponentially reduce file system System performance.Although can be cached to partial document metadata, because the metadata information of current file system is excessively multiple Miscellaneous, buffer memory should not be excessive.Therefore, the main time consumption of process is read and write in magnetic head position fixing process, so just to small documents IO Performance generates influence.Also conventional I/O operation is simultaneously operating, can block application program in synchronous I/O request implementation procedure, this Sample can influence the performance issue of application program.
The content of the invention
In view of the above the shortcomings that prior art, it is an object of the invention to provide one kind to lift web server performance File system and method, for solve in the prior art large file can not continuously deposit in disk, small documents number The problem of according to disk fragmentses and IO performances and application program capacity can be brought to reduce.
In order to achieve the above objects and other related objects, the present invention provides a kind of file system for lifting web server performance System, the file system, which includes the disk space, includes magnetic disk metadata area and data in magnetic disk area;The magnetic disk metadata area Including file system superblock, file directory item bitmap, volume information array and file directory item;The data in magnetic disk area bag Include multiple fixed-size volumes;Wherein, each volume includes that multiple sizes are identical, continuous file disk block, the file disk Block is used to deposit the small documents in web server.
Preferably, the size of the volume is adjustable to rise to 256MB from 32MB.
Preferably, the size of the file disk block is adjustable, from 4KB by rising to 128KB again.
Preferably, the file directory item includes filename, file disk block number and file size, the file directory Item, which is cached in internal memory, is organized into Hash linked list arrays.
Preferably, the file system also includes the application programming interfaces after simplifying, and the application program after the simplification connects Mouth includes mount application programming interfaces, unmount application programming interfaces, read application programming interfaces, write application programs and connect Mouth, delete application programming interfaces and flush application programming interfaces.
The present invention provides a kind of method for lifting web server performance, it is characterised in that:Methods described includes:
Disk space is divided into magnetic disk metadata area and data in magnetic disk area;
By the magnetic disk metadata Division into file system superblock, file directory item bitmap, label information array, with And file directory item;
The data in magnetic disk zoning is divided into multiple fixed-size volumes;Wherein, each volume is divided into multiple size phases With continuous file disk block.
Preferably, methods described also includes searching the information on meta-data region;Information on the lookup meta-data region Realize that step includes:
Q1, the information on simplified-file meta-data region, a log file name, file disk block number and file size;
Q2, simplify application programming interfaces;
Q3, file directory item is all cached among internal memory;
Q4, Hash lookups are carried out by filename, the file directory necklace is entered in Hash linked list arrays.
Preferably, methods described also includes asynchronous execution application program.
Preferably, when the application program is read application programs, the process of asynchronous execution read application programs includes:
R1, Hash is calculated according to filename;
R2, the file directory item of this document is searched in Hash linked list arrays by Hash;
R3, interpretation search whether success;If searching failure, return, file is not present in this document directory entry;If Search successfully, continue executing with R4;
R4, the information such as the disk block number of file are obtained according to the file directory item found, and created for this read requests I/O request structure, initialize the I/O request structure;The form of I/O request structure is:
I/O request is numbered;
The initial address of the data buffer zone included in I/O request;
The length of data buffer zone in I/O request;
Treat read sector number;
Treat read sector number;
Ask completion status;
R5, I/O request parameter is set, file system initializes the parameter of I/O request according to the disk block number distributed for file, The parameter includes disk block number converting sector number, and read disk block number is converted into sector number;
R6, the I/O request structure created is added in the controller of the disk drive, i.e., inserted I/O request I/O request queue wait IO thread process;Return to success status.
Preferably, when the application program is write application programs, the process bag of asynchronous execution write application programs Include:
R1 ', data space is distributed for file data to be written;
R2 ', judge to distribute whether the data space succeeds;
R3 ', distribute the disk file directory entry;
R4 ', judge to distribute whether the disk file directory entry succeeds;If the space use of file directory item finishes, Return to failure;Disk file directory entry space is distributed for file data to be written, according to disk file directory entry space bit map Information is distributed;For one memory file directory entry of this document data configuration, and initialize the memory file directory entry;By described in In memory file directory entry insertion Hash linked list arrays;Ask to create and initialize I/O request structure for write;The I/O request knot The form of structure is:
I/O request is numbered;
The initial address of the data buffer zone included in I/O request;
The length of data buffer zone in I/O request;
Treat write sector number;
Treat write sector number;
Ask completion status;
R5 ', sets the I/O request parameter, and file system initializes I/O request according to the disk block number distributed for file Parameter, the parameter include disk block number converting sector number, and write disk block number is converted into sector number;
R6 ', the I/O request structure of the initialization of establishment is added in Magnetic Disk Controler, returns to success status.
As described above, a kind of file system and method for lifting web server performance of the present invention, has with following Beneficial effect:
1st, simplify disk space, disk fragmentses are reduced while can continuously depositing file data;
2nd, the time of required I/O operation number and the magnetic head movement during each reading and writing data of reduction, file is improved The IO performances of system;
3rd, eliminate the obstruction of application program under synchronous I/O operation, using asynchronous execution, application program it is more efficient.
Brief description of the drawings
Fig. 1 is shown as the disk space form signal after the file system division of the lifting web server performance of the present invention Figure;
Fig. 2 is shown as Hash linked list array structural representations in the file system of the lifting web server performance of the present invention;
Fig. 3 is shown as searching the flow chart of information on meta-data region in the method for the lifting web server performance of the present invention;
Fig. 4 is shown as the function reading stream of I/O request asynchronous execution in the method for the lifting web server performance of the present invention Cheng Tu;
Fig. 5 is shown as the write-in function flow of I/O request asynchronous execution in the method for the lifting web server performance of the present invention Cheng Tu.
Component label instructions
1 disk space
11 magnetic disk metadata areas
12 data in magnetic disk areas
111 file system superblocks
112 file directory item bitmaps
113 volume information arrays
114 file directory items
Volume 121
1211 file disk blocks
Embodiment
Illustrate embodiments of the present invention below by way of specific instantiation, those skilled in the art can be by this specification Disclosed content understands other advantages and effect of the present invention easily.The present invention can also pass through specific realities different in addition The mode of applying is embodied or practiced, the various details in this specification can also be based on different viewpoints with application, without departing from Various modifications or alterations are carried out under the spirit of the present invention.
Refer to accompanying drawing.It should be noted that only explanation is of the invention in a schematic way for the diagram provided in the present embodiment Basic conception, then in schema only display with relevant component in the present invention rather than according to component count during actual implement, shape Shape and size are drawn, and kenel, quantity and the ratio of each component can be a kind of random change during its actual implementation, and its component cloth Office's kenel may also be increasingly complex.
With reference to embodiment and accompanying drawing, the present invention is described in detail.
Embodiment one
The file system for a kind of lifting web server performance that the present embodiment provides, as shown in figure 1, the file system Including disk space 1.The disk space 1 includes magnetic disk metadata area 11 and data in magnetic disk area 12, the magnetic disk metadata area 11 include file system superblock 111, file directory item bitmap 112, volume information array 113, file directory item 114;Wherein, institute State the information that file system superblock 111 is used to describe file system;The file directory item bitmap 112 is used by bit value To illustrate message bit pattern;The volume information array 113 is used to describe volume information;The file directory item 114 refers to file system File preserve file some information data structure, the information that the file directory item preserves contains<Filename, file Disk block number, file size>Mapping relations, the file directory item 114 is cached in memory organization into Hash linked list arrays, As shown in Fig. 2 the Hash linked list arrays include N number of Hash chained lists, for example, Hash [0], Hash [1] ... Hash [N], often Individual Hash chained lists include file directory item(dentry), the file directory item(dentry)Log file name(fname), file Disk block(blk)Block number and file size(fsize);The form of the file directory item is different from traditional file inode Complex format.
The data in magnetic disk area 12 includes multiple volumes 121, and sizes of these volumes 121 are adjustable, for example, the volume Size rises to 256MB from 32MB;Meanwhile the volume 121 includes that multiple sizes are identical, continuous file disk block(blk) 1211;Wherein, the file disk block(blk)For continuously depositing the small documents in web server, the file disk block (blk)Size be adjustable, for example, from 4KB by times increase up to 128KB.
The file system also includes the application programming interfaces after simplifying(API), the application programming interfaces after the simplification Including mount application programming interfaces, unmount application programming interfaces, read application programming interfaces, write application programming interfaces, Delete application programming interfaces and flush application programming interfaces.The mount application programming interfaces are used for the file system The front mount file system that system uses;The unmount application programming interfaces are used to unload after the file system use File system;The read application programming interfaces are used to read the file data in the file system;The write applications journey Sequence interface is used to write data into disk;The delete application programming interfaces are used to delete specific in the file system File;The flush application programming interfaces are used to internal memory apoplexy involving the solid organs data block being synchronized to disk, and the dirty data block is relative For former data, refer to what is be modified, with the different data of former data.
File system of the present invention, it can greatly lift the performance of web server.The system is directed to web services The application environment simplified-file systems for preserving small documents, simplify disk space, this can ensure that small documents can be continuous more in device Storage;Meanwhile file disk block described in volume(blk)Big I dynamically set on demand according to file size, at utmost Reduce disk fragmentses problem in ground.
Embodiment two
The present invention provides a kind of method for lifting web server performance, and methods described includes:
Disk space 1 is divided into magnetic disk metadata area 11 and data in magnetic disk area 12;
By the magnetic disk metadata Division into file system superblock 111, file directory item bitmap 112, volume information number Group 113, file directory item 114;Wherein, the file system superblock 111 describes the information of file system;The file mesh Record item bitmap 112 illustrates message bit pattern by bit value;The volume information array 113 describes volume information;The file directory Item 114 preserves the data structure of the information of files, and the file directory item 114 is organized into Hash linked list arrays, according to The filename storage location of locating file on disk space in the Hash linked list arrays;
The data in magnetic disk area 12 is divided into multiple fixed-size volumes 121, meanwhile, the volume 121 is divided into more The identical continuous file disk block of individual size(blk)1211;Wherein, the file disk block(blk)Web services can continuously be deposited Small documents in device, for example, the small documents such as storage webpage.
For file system, it is necessary to search the information on meta-data region before reading and writing of files data, usual described information is to protect Exist on disk space, so multiple I/O operation is needed before file data is read to position the storage location of file data, In this way also include search meta-data region on information, as shown in figure 3, realizing that the process specifically includes:
Q1, simplify the information on meta-data region, that is, simplified-file directory entry, a log file name, file disk block Number, and file size;
Q2, simplify application programming interfaces(API), only provide mount application programming interfaces, umount application programming interfaces, Read application programming interfaces, write application programming interfaces, delete application programming interfaces and flush application programming interfaces this Several required application programming interfaces(API);Wherein,
The front mount file system that the mount application programming interfaces use in the file system;
Umount application programming interfaces unloading of file system after the file system use;
The read application programming interfaces read the file data in the file system;
The write application programming interfaces write data into disk;
The delete application programming interfaces delete specific file in the file system;
Internal memory apoplexy involving the solid organs data block is synchronized on disk by the flush application programming interfaces.
Q3, after the file system initialization, by the metadata of All Files, that is, the file directory in metadata Item is all cached among internal memory;
Q4, by carrying out Hash lookups to filename, the file directory necklace is entered in Hash linked list arrays.
By methods described, the prelocalization of each I/O operation and locating file positional information are just very simple, it is only necessary to Quickly searched by Hash linked list arrays in internal memory, without producing extra I/O request;
Conventional I/O operation is synchronous execution, so before I/O operation, application program can be blocked, so the present invention provides The method of lifting web server performance also include asynchronous execution I/O request, call application programming interfaces in file system first Application program needed for execution;
Then, file system is responsible for creating and initializes corresponding I/O request structure;Then, I/O request parameter is set;Most Afterwards, among the I/O request structure of establishment being inserted into the controller of bottom disk drive, file system can apply journey to described Sequence is returned successfully, and after the request is completed, the controller of the disk drive is completed by interrupt notification file system requests, File system and then notify the application requests to complete, wait the application program further to handle.
When required application program is read application programs, as shown in figure 4, the process bag of asynchronous execution read application programs Include:
R1, according to filename(fname)Calculate Hash;
R2, the file directory name of this document is searched in Hash linked list arrays by Hash;
R3, interpretation search whether success;If searching failure, return, file is not present in this document directory name;Meanwhile If searched successfully, R4 is continued executing with;
R4, the information such as file disk block number are obtained according to the file directory item found, and IO is created for this read requests Appealing structure, and initialize the I/O request structure;The form of the I/O request structure is:
{
I/O request is numbered;
The initial address of the data buffer zone included in I/O request;
The length of data buffer zone in I/O request;
Treat read sector number;
Treat read sector number;
Ask completion status;
};
R5, I/O request parameter is set, file system initializes the parameter of I/O request according to the disk block number distributed for file, The parameter includes disk block number converting sector number, and read disk block number is converted into sector number;
R6, the I/O request structure of establishment is added in the controller of the disk drive, will ask the IO of insertion please Queue is asked to wait IO thread process;Return to success status.
Embodiment three
The present invention provides a kind of method for lifting web server performance, and methods described includes:
Disk space 1 is divided into magnetic disk metadata area 11 and data in magnetic disk area 12;
By the magnetic disk metadata Division into file system superblock 111, file directory item bitmap 112, volume information number Group 113, file directory item 114;Wherein, the file system superblock 111 describes the information of file system;The file mesh Record item bitmap 112 illustrates message bit pattern by bit value;The volume information array 113 describes volume information;The file directory Item 114 preserves the data structure of the information of files, and the file directory item 114 is organized into Hash linked list arrays, according to The filename storage location of locating file on disk space in the Hash linked list arrays;
The data in magnetic disk area 12 is divided into multiple fixed-size volumes 121, meanwhile, the volume 121 is divided into more The identical continuous file disk block of individual size(blk)1211;Wherein, the file disk block(blk)Web services can continuously be deposited Small documents in device, for example, the small documents such as storage webpage.
For file system, it is necessary to search the information on meta-data region before reading and writing of files data, usual described information is to protect Exist on disk space, so multiple I/O operation is needed before file data is read to position the storage location of file data, In this way also include search meta-data region on information, realize that the process specifically includes:
Q1, simplify the information on meta-data region, that is, simplified-file directory entry, a log file name, file disk block Number, and file size;
Q2, simplify application programming interfaces(API), only provide mount application programming interfaces, umount application programming interfaces, Read application programming interfaces, write application programming interfaces, delete application programming interfaces and flush application programming interfaces this Several required application programming interfaces(API);Wherein,
The front mount file system that the mount application programming interfaces use in the file system;
Umount application programming interfaces unloading of file system after the file system use;
The read application programming interfaces read the file data in the file system;
The write application programming interfaces write data into disk;
The delete application programming interfaces delete specific file in the file system;
Internal memory apoplexy involving the solid organs data block is synchronized on disk by the flush application programming interfaces.
Q3, after the file system initialization, by the metadata of All Files, that is, the file directory in metadata Item is all cached among internal memory;
Q4, by carrying out Hash lookups to filename, the file directory necklace is entered in Hash linked list arrays.
By methods described, the prelocalization of each I/O operation and locating file positional information are just very simple, it is only necessary to Quickly searched by Hash linked list arrays in internal memory, without producing extra I/O request;
Conventional I/O operation is synchronous execution, so before I/O operation, application program can be blocked, so the present invention provides The method of lifting web server performance also include asynchronous execution I/O request, call application programming interfaces in file system first Application program needed for execution;
Then file system is responsible for creating corresponding I/O request structure, and initializes the I/O request structure;
Then, I/O request parameter is set;
Finally, among the I/O request structure being inserted into the controller of bottom disk drive, file system can be to described Application program returns successfully, and after the request is completed, the controller of the disk drive please by interrupt notification file system Ask completion, file system and then notify the application requests to complete, wait the application program further to handle.
When required application program is write application programs, as shown in figure 5, the process of asynchronous execution write application programs Including:
R1 ', data space is distributed for file data to be written;
R2 ', judge to distribute whether the data space succeeds;Search currently whether have suitable block size in internal memory Volume, such as the volume of the file distribution 4KB block sizes of 3KB sizes, if so, distributing a block in the volume for this document;Such as Fruit does not have the volume, then obtains one in being rolled up from the free time, and its block size is set into suitable size, for example, 3KB file then will The volume(volume)Block size is set to 4KB, and distributes a block to deposit this document, if without the sky from the volume Spare time volume, then fail, and disk space is full;
R3 ', distribute the disk file directory entry;
R4 ', judge to distribute whether the disk file directory entry succeeds;If the space use of file directory item finishes, Return to failure;Meanwhile disk file directory entry space is distributed for file data to be written, according to disk file directory entry space Message bit pattern distributes;For one memory file directory entry of this document data configuration, and initialize the memory file directory entry;Will In the memory file directory entry insertion Hash linked list arrays;Ask to create and initialize I/O request structure, the IO for write The form of appealing structure is:
{
I/O request is numbered;
The initial address of the data buffer zone included in I/O request;
The length of data buffer zone in I/O request;
Treat write sector number;
Treat write sector number;
Ask completion status;
};
R5 ', sets the I/O request parameter, and file system initializes I/O request according to the disk block number distributed for file Parameter, the parameter include disk block number converting sector number, and write disk block number is converted into sector number;
R6 ', the I/O request structure of establishment is added in Magnetic Disk Controler, will the I/O request of the initialization be inserted into In I0 request queues;Return to success status.
Protection scope of the present invention is not limited to the sequencing of step listed above, as long as according to system energy of the present invention It is enough to solve the problems, such as that reduction disk fragmentses, IO performances, application program capacity are equal while small file is continuously deposited in the prior art Belong to protection scope of the present invention.
The disk space management of web server File system design of the present invention, reduce and read needed for file data IO number and I/O request asynchronous execution can ensure to the greatest extent may be used while file data is continuously deposited under small documents application environment Energy reduces disk fragmentses, and delayed allocation mechanism causes file data continuously to deposit to greatest extent, i.e., improving performance is same When can reduce disk fragmentses;Secondly, removing to take place frequently during small documents IO reads and writes calls the systems such as open/close to call, and reduces Required IO number during reading and writing data, the APL of file system is greatly decreased, improves the performance of file system;Finally disappear Except under synchronous I/O mode application program obstruction, application program it is more efficient..
In summary, the present invention effectively overcomes various shortcoming of the prior art and has high industrial utilization.
The above-described embodiments merely illustrate the principles and effects of the present invention, not for the limitation present invention.It is any ripe Know the personage of this technology all can carry out modifications and changes under the spirit and scope without prejudice to the present invention to above-described embodiment.Cause This, those of ordinary skill in the art is complete without departing from disclosed spirit and institute under technological thought such as Into all equivalent modifications or change, should by the present invention claim be covered.

Claims (9)

  1. A kind of 1. file system for lifting web server performance, it is characterised in that:The file system includes disk space;
    The disk space includes magnetic disk metadata area and data in magnetic disk area;
    The magnetic disk metadata area includes file system superblock, file directory item bitmap, volume information array and file directory ;The file system superblock is used for the information for describing file system;The volume information array is used to describe volume information;It is described File directory item refers to the data structure for the information for preserving file, and the information that the file directory item preserves contains<Filename, text Part disk block number, file size>Mapping relations;The file directory item 114 is cached in memory organization into Hash chained list numbers Group, each Hash chained lists include file directory item, the file directory item log file name, file disk block block number and File size;
    The data in magnetic disk area includes multiple fixed-size volumes;Wherein, each volume includes that multiple sizes are identical, continuous file Disk block, the file disk block are used to deposit the small documents in web server.
  2. 2. the file system of lifting web server performance according to claim 1, it is characterised in that:The size of the volume It is adjustable, 256MB is risen to from 32MB.
  3. 3. the file system of lifting web server performance according to claim 2, it is characterised in that:The file disk The size of block is adjustable, from 4KB by rising to 128KB again.
  4. 4. the file system of lifting web server performance according to claim 1, it is characterised in that:The file system Also include the application programming interfaces after simplifying, application programming interfaces after the simplification include mount application programming interfaces, Unmount application programming interfaces, read application programming interfaces, write application programming interfaces, delete application programming interfaces, with And flush application programming interfaces.
  5. A kind of 5. method for lifting web server performance, it is characterised in that:Methods described includes:
    Disk space is divided into magnetic disk metadata area and data in magnetic disk area;
    By the magnetic disk metadata Division into file system superblock, file directory item bitmap, label information array, Yi Jiwen Part directory entry;The file system superblock is used for the information for describing file system;The volume information array is used to describe volume letter Breath;The file directory item refers to the data structure for the information for preserving file, and the information that the file directory item preserves contains<Text Part name, file disk block number, file size>Mapping relations;The file directory item 114 is cached in memory organization into Hash Linked list array, each Hash chained lists include file directory item, the file directory item log file name, the block of file disk block Number and file size;
    The data in magnetic disk zoning is divided into multiple fixed-size volumes;Wherein, each volume is divided into the identical company of multiple sizes Continuous file disk block.
  6. 6. the method for lifting web server performance according to claim 5, it is characterised in that:Methods described also includes looking into The information looked on meta-data region;Information on the lookup meta-data region realizes that step includes:
    Q1, the information on simplified-file meta-data region, a log file name, file disk block number and file size;
    Q2, simplify application programming interfaces;
    Q3, file directory item is all cached among internal memory;
    Q4, Hash lookups are carried out by filename, the file directory necklace is entered in Hash linked list arrays.
  7. 7. the method for lifting web server performance according to claim 5, it is characterised in that:Methods described also includes different Step performs application program.
  8. 8. the method for lifting web server performance according to claim 7, it is characterised in that:When the application program is During read application programs, the process of asynchronous execution read application programs includes:
    R1, Hash is calculated according to filename;
    R2, the file directory item of this document is searched in Hash linked list arrays by Hash;
    R3, interpretation search whether success;If searching failure, return, file is not present in this document directory entry;If search Success, continues executing with R4;
    R4, the information of file is obtained according to the file directory item found, and I/O request structure is created for this read requests, initially Change the I/O request structure;The form of I/O request structure is:
    I/O request is numbered;
    The initial address of the data buffer zone included in I/O request;
    The length of data buffer zone in I/O request;
    Treat read sector number;
    Treat read sector number;
    Ask completion status;
    R5, I/O request parameter is set, and file system initializes the parameter of I/O request according to the disk block number distributed for file, described Parameter includes disk block number converting sector number, and read disk block number is converted into sector number;
    R6, the I/O request structure created is added in the controller of disk drive, i.e., the I/O request inserted I/O request Queue waits IO thread process;Return to success status.
  9. 9. the method for lifting web server performance according to claim 7, it is characterised in that:When the application program is During write application programs, the process of asynchronous execution write application programs includes:
    R1 ', data space is distributed for file data to be written;
    R2 ', judge to distribute whether the data space succeeds;
    R3 ', distribute the disk file directory entry;
    R4 ', judge to distribute whether the disk file directory entry succeeds;If the space use of file directory item finishes, return Failure;Disk file directory entry space is distributed for file data to be written, according to disk file directory entry space bitmap information Distribution;For one memory file directory entry of this document data configuration, and initialize the memory file directory entry;By the internal memory In file directory item insertion Hash linked list arrays;Ask to create and initialize I/O request structure for write;The I/O request structure Form is:
    I/O request is numbered;
    The initial address of the data buffer zone included in I/O request;
    The length of data buffer zone in I/O request;
    Treat write sector number;
    Treat write sector number;
    Ask completion status;
    R5 ', sets the I/O request parameter, and file system initializes the ginseng of I/O request according to the disk block number distributed for file Number, the parameter include disk block number converting sector number, and write disk block number is converted into sector number;
    R6 ', the I/O request structure of the initialization of establishment is added in Magnetic Disk Controler, returns to success status.
CN201210275779.9A 2012-08-03 2012-08-03 A kind of file system and method for lifting web server performance Expired - Fee Related CN103577470B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210275779.9A CN103577470B (en) 2012-08-03 2012-08-03 A kind of file system and method for lifting web server performance

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210275779.9A CN103577470B (en) 2012-08-03 2012-08-03 A kind of file system and method for lifting web server performance

Publications (2)

Publication Number Publication Date
CN103577470A CN103577470A (en) 2014-02-12
CN103577470B true CN103577470B (en) 2017-11-21

Family

ID=50049268

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210275779.9A Expired - Fee Related CN103577470B (en) 2012-08-03 2012-08-03 A kind of file system and method for lifting web server performance

Country Status (1)

Country Link
CN (1) CN103577470B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105549903B (en) * 2015-12-07 2019-06-25 上海斐讯数据通信技术有限公司 The file system for being easy to transplant and its management method to external memory data
CN105573678B (en) * 2015-12-17 2018-11-09 深圳市华讯方舟软件技术有限公司 A kind of PostgreSQL blocks
CN106126555B (en) * 2016-06-16 2019-03-26 北京翼辉信息技术有限公司 A kind of file management method and file system
CN107357869A (en) * 2017-07-03 2017-11-17 张宇 A kind of file operation method suitable for cloud storage
US11106588B2 (en) 2017-11-28 2021-08-31 International Business Machines Corporation Deferred method of allocating disk space for lightning segments
CN109144420B (en) * 2018-08-22 2021-07-13 深圳忆联信息系统有限公司 Multi-particle self-adaptive initialization method and device, computer equipment and storage medium
CN111221472B (en) * 2019-12-26 2023-08-25 天津中科曙光存储科技有限公司 Multi-block allocation strategy optimization method and system for disk space allocation
CN111400247B (en) * 2020-04-13 2023-08-01 杭州九州方园科技有限公司 User behavior auditing method and file storage method
CN114546248A (en) * 2020-11-26 2022-05-27 中移物联网有限公司 Memory file system and processing method of storage block
CN112800005B (en) * 2021-01-22 2023-01-03 中孚安全技术有限公司 Deep inspection method, system, terminal and storage medium for file system
CN113296700A (en) * 2021-04-20 2021-08-24 新华三信息技术有限公司 Storage space management method and device and server

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5129088A (en) * 1987-11-30 1992-07-07 International Business Machines Corporation Data processing method to create virtual disks from non-contiguous groups of logically contiguous addressable blocks of direct access storage device
CN1471082A (en) * 2002-07-25 2004-01-28 深圳易拓科技有限公司 Variable zoning method for disc drive
CN1661568A (en) * 2004-02-24 2005-08-31 中国科学院声学研究所 File system in device of recording and playing back sounds and images under embedded type environment
CN102012866A (en) * 2009-09-07 2011-04-13 英业达股份有限公司 A storage server and the method thereof for dynamically adjusting its storage space size
CN102096722A (en) * 2011-03-21 2011-06-15 成都市华为赛门铁克科技有限公司 File storage method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101446976A (en) * 2008-12-26 2009-06-03 中兴通讯股份有限公司 File storage method in distributed file system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5129088A (en) * 1987-11-30 1992-07-07 International Business Machines Corporation Data processing method to create virtual disks from non-contiguous groups of logically contiguous addressable blocks of direct access storage device
CN1471082A (en) * 2002-07-25 2004-01-28 深圳易拓科技有限公司 Variable zoning method for disc drive
CN1661568A (en) * 2004-02-24 2005-08-31 中国科学院声学研究所 File system in device of recording and playing back sounds and images under embedded type environment
CN102012866A (en) * 2009-09-07 2011-04-13 英业达股份有限公司 A storage server and the method thereof for dynamically adjusting its storage space size
CN102096722A (en) * 2011-03-21 2011-06-15 成都市华为赛门铁克科技有限公司 File storage method and device

Also Published As

Publication number Publication date
CN103577470A (en) 2014-02-12

Similar Documents

Publication Publication Date Title
CN103577470B (en) A kind of file system and method for lifting web server performance
US11036540B2 (en) Transaction commit operations with thread decoupling and grouping of I/O requests
CN104881466B (en) The processing of data fragmentation and the delet method of garbage files and device
US8364751B2 (en) Automated client/server operation partitioning
CN104765575B (en) information storage processing method
CN104580437A (en) Cloud storage client and high-efficiency data access method thereof
CN108763508B (en) Data page access method, storage engines and computer readable storage medium
CN104881248B (en) The adaptive directly IO accelerated methods towards in the file system of SSD
CN104995608A (en) Method, apparatus and program product to save and restore system memory management unit (mmu) contexts
CN102810050A (en) Log data writing method and log system
US20120290595A1 (en) Super-records
CN103605630B (en) Virtual server system and data reading-writing method thereof
CN102541985A (en) Organization method of client directory cache in distributed file system
CN106503051A (en) A kind of greediness based on meta data category prefetches type data recovery system and restoration methods
CN102521330A (en) Mirror distributed storage method under desktop virtual environment
CN103380417A (en) Techniques to request stored data from a memory
CN102915340A (en) Expanded B+ tree-based object file system
CN104765574A (en) Data cloud storage method
CN103399823A (en) Method, equipment and system for storing service data
US10877848B2 (en) Processing I/O operations in parallel while maintaining read/write consistency using range and priority queues in a data protection system
CN109388590A (en) Promote the dynamic buffering block management method and device of multi-channel DMA access performance
CN103942301B (en) Distributed file system oriented to access and application of multiple data types
CN103049224A (en) Method, device and system for importing data into physical tape
CN103473258A (en) Cloud storage file system
CN102355502A (en) Remote access method for remotely accessing storage system into desktop operation system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20171121

Termination date: 20200803

CF01 Termination of patent right due to non-payment of annual fee