CN104216663A - Method for increasing file-writing speed - Google Patents
Method for increasing file-writing speed Download PDFInfo
- Publication number
- CN104216663A CN104216663A CN201410427048.0A CN201410427048A CN104216663A CN 104216663 A CN104216663 A CN 104216663A CN 201410427048 A CN201410427048 A CN 201410427048A CN 104216663 A CN104216663 A CN 104216663A
- Authority
- CN
- China
- Prior art keywords
- file
- writing
- random
- request
- blocksize
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 19
- 230000003750 conditioning effect Effects 0.000 claims description 2
- 230000029087 digestion Effects 0.000 description 4
- 238000005457 optimization Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention provides a method for increasing a file-writing speed. The file-writing speed is optimized on a file system layer for a file-writing operation in a fileIO mode, and the default block size of a file system is dynamically adjusted according to IO request types, so that the aim of increasing the file-writing speed of a user is achieved. The method comprises the following specific steps: firstly, pre-testing a random writing optimum block size value random_blocksize and a sequence writing optimum block size value sequence_blocksize of disk equipment into which files are to be written; secondly, classifying the IO request types into a continuous IO writing request and random IO writing requests according to the file number of the files to be written in the system, if only a single file-writing request exists, regarding the single file-writing request as the continuous IO writing request, and if a plurality of file-writing requests exist, regarding the file-writing requests as the random IO writing requests; finally, adjusting the default block size of the system as the corresponding sequence_blocksize and the corresponding random_blocksize according to the IO request types.
Description
Technical field
The present invention relates to a kind of computer utility, specifically a kind of method improving file writing speed.
Background technology
When current system writes file, the block size of setting is fixing, and the write operation of reality has multiple situation, and such as a large amount of IO continuously writes, and random IO writes.To when having a large amount of write request continuously, if still adopt less block the plenty of time can be wasted in I/O request repeatedly and response, obviously affect file writing speed.
An I/O request is from proposing to receive response, need through many levels such as user application layer, file system, volume management layer, disk drive, relate to the many aspects such as file system IO management, queue, IO scheduling, device map, there is oneself processing power each level and aspect, in order to allow I/O request obtain the fastest response, need to coordinate processing power at all levels.
The instruction that Magnetic Disk Controller is initiated to disk unit, be not that order sends one by one, but send a collection ofly, disk unit batch performs IO, then data and result is returned controller.As long as disk unit digestion power is enough, when IO is fewer, processes an instruction and process many instructions simultaneously and will consume the almost identical time.The maximum number of the batch instruction that controller sends, is determined by the queue depth on controller.
No matter disk unit digestion power is how many, file system adopts the block size 4KB of acquiescence to read and write all the time, if now disk unit digestion power is enough, suitably can increase block size to fill the digestion power of full disk unit, save instruction process elapsed time.
Summary of the invention
The object of this invention is to provide a kind of method improving file writing speed.
The object of the invention is to realize in the following manner, for the file write operations of fileIO pattern, at file system layer, file writing speed is optimized, according to I/O request type, dynamic conditioning file system default tile size, thus reaching the object improving user file writing speed, concrete steps first test out the random writing optimical block sizes values random_blocksize of disk unit to be written in advance by IOmeter and are sequentially written in optimical block sizes values squence_blocksize; Secondly according to wanting the file number of writing in files by I/O request classification of type in system, one is continuous IO write request, one is random IO write request, if only have Single document write request to be namely regarded as continuous IO to write, if have multiple file write request to be namely regarded as random IO to write, finally according to I/O request type, system default block size is adjusted to corresponding squence_blocksize and random_blocksize.
Object beneficial effect of the present invention is: the method is carried out write operation at the same time judge that current is order IO write or random IO write by being carved with how many files time a certain in detection system, and the default tile size of current file system is revised according to judged result, this block size is that the disk tested out by IOmeter is in advance sequentially written in and optimical block sizes values during random writing.Method effectively improves the restriction of file system fixed block size to file writing speed, has obvious castering action to file writing speed.
Accompanying drawing explanation
Fig. 1 is file writing speed optimization method hierarchy chart;
Fig. 2 is file writing speed optimization method process flow diagram.
Embodiment
With reference to Figure of description, method of the present invention is described in detail below.
As shown in Fig. 2 file writing speed optimization method process flow diagram, implementation process is as follows:
(1) Iometer is used to test out order optimical block sizes values squence_blocksize and the random write optimical block sizes values random_blocksize of equipment to be written;
(2) select to want writing in files source address and destination address;
(3) the current number being about to writing in files in judgement system;
(4) write if only have Single document write request to be namely regarded as continuous IO, system default block size is modified as squence_blocksize;
(5) write if there is multiple file write request to be namely regarded as random IO, system default block size is modified as random_blocksize;
(6), after configuring file system block size, the write operation of file is started.
Except the technical characteristic described in instructions, be the known technology of those skilled in the art.
Claims (1)
1. one kind is improved the method for file writing speed, it is characterized in that the file write operations for fileIO pattern, at file system layer, file writing speed is optimized, according to I/O request type, dynamic conditioning file system default tile size, thus reaching the object improving user file writing speed, concrete steps first test out the random writing optimical block sizes values random_blocksize of disk unit to be written in advance by IOmeter and are sequentially written in optimical block sizes values squence_blocksize; Secondly according to wanting the file number of writing in files by I/O request classification of type in system, one is continuous IO write request, one is random IO write request, if only have Single document write request to be namely regarded as continuous IO to write, if have multiple file write request to be namely regarded as random IO to write, finally according to I/O request type, system default block size is adjusted to corresponding squence_blocksize and random_blocksize.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410427048.0A CN104216663A (en) | 2014-08-27 | 2014-08-27 | Method for increasing file-writing speed |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410427048.0A CN104216663A (en) | 2014-08-27 | 2014-08-27 | Method for increasing file-writing speed |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN104216663A true CN104216663A (en) | 2014-12-17 |
Family
ID=52098209
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201410427048.0A Pending CN104216663A (en) | 2014-08-27 | 2014-08-27 | Method for increasing file-writing speed |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN104216663A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108399118A (en) * | 2018-03-20 | 2018-08-14 | 广东欧珀移动通信有限公司 | file system test data processing method, device, storage medium and terminal |
| CN110347339A (en) * | 2019-06-28 | 2019-10-18 | 华中科技大学 | A kind of controllable continuous write method, scheduler and storage system for mechanical hard disk |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20090006789A1 (en) * | 2005-11-18 | 2009-01-01 | International Business Machines Corporation | Computer program product and a system for a priority scheme for transmitting blocks of data |
| CN101616077A (en) * | 2009-07-29 | 2009-12-30 | 武汉大学 | A method for fast transmission of large files on the Internet |
| CN102298556A (en) * | 2011-08-26 | 2011-12-28 | 成都市华为赛门铁克科技有限公司 | Data stream recognition method and device |
-
2014
- 2014-08-27 CN CN201410427048.0A patent/CN104216663A/en active Pending
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20090006789A1 (en) * | 2005-11-18 | 2009-01-01 | International Business Machines Corporation | Computer program product and a system for a priority scheme for transmitting blocks of data |
| CN101616077A (en) * | 2009-07-29 | 2009-12-30 | 武汉大学 | A method for fast transmission of large files on the Internet |
| CN102298556A (en) * | 2011-08-26 | 2011-12-28 | 成都市华为赛门铁克科技有限公司 | Data stream recognition method and device |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108399118A (en) * | 2018-03-20 | 2018-08-14 | 广东欧珀移动通信有限公司 | file system test data processing method, device, storage medium and terminal |
| CN108399118B (en) * | 2018-03-20 | 2021-11-26 | Oppo广东移动通信有限公司 | File system test data processing method and device, storage medium and terminal |
| CN110347339A (en) * | 2019-06-28 | 2019-10-18 | 华中科技大学 | A kind of controllable continuous write method, scheduler and storage system for mechanical hard disk |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Jung et al. | HIOS: A host interface I/O scheduler for solid state disks | |
| KR20160049200A (en) | Method for operating data storage device, mobile computing device having the same, and method of the mobile computing device | |
| WO2013160958A1 (en) | Information storage system and method of controlling information storage system | |
| CN105468291B (en) | Dynamic and static wear balance control method and device | |
| JP2014164769A5 (en) | ||
| US10146783B2 (en) | Using file element accesses to select file elements in a file system to defragment | |
| CN104731515B (en) | Control the method and apparatus of storage device group of planes abrasion equilibrium | |
| CN104216774A (en) | Multi-core equipment and job scheduling method thereof | |
| CN105701029B (en) | A kind of isomery storage optimization method and device | |
| JP2023518242A (en) | Setting the power mode based on the workload level on the memory subsystem | |
| CN120104521B (en) | Partition method, device, equipment, medium and product of cache region | |
| CN108170789A (en) | A kind of classification storage method and relevant apparatus based on distributed file system | |
| CN104216663A (en) | Method for increasing file-writing speed | |
| CN104991874A (en) | SCST (SCSI target subsystem for Linux) based multi-controller storage device ALUA (asymmetrical logical unit access) configuration method | |
| CN103186636A (en) | Method and system for loading readable file in mobile equipment | |
| JP2012173814A5 (en) | Information processing apparatus and control method and program for controlling information processing apparatus | |
| KR102634776B1 (en) | Data storage device and operating method thereof | |
| CN106469020B (en) | Cache element and control method and application system thereof | |
| CN106202262A (en) | A kind of information processing method and electronic equipment | |
| US9921747B2 (en) | Unifying memory controller | |
| CN117667901A (en) | CEPH parameter recommendation method, device, equipment and storage medium | |
| CN105868121A (en) | Information processing method and electronic equipment | |
| CN109032965B (en) | Data reading method, host and storage device | |
| CN105204775B (en) | Electronic device and data writing method | |
| CN109144911A (en) | Scheduling method, PCIe controller and related electronic system thereof |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| WD01 | Invention patent application deemed withdrawn after publication | ||
| WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20141217 |