CN106155931A - The method and apparatus of speed limit read by a kind of disk - Google Patents

The method and apparatus of speed limit read by a kind of disk Download PDF

Info

Publication number
CN106155931A
CN106155931A CN201610509871.5A CN201610509871A CN106155931A CN 106155931 A CN106155931 A CN 106155931A CN 201610509871 A CN201610509871 A CN 201610509871A CN 106155931 A CN106155931 A CN 106155931A
Authority
CN
China
Prior art keywords
disk
described
reading
device
duty
Prior art date
Application number
CN201610509871.5A
Other languages
Chinese (zh)
Other versions
CN106155931B (en
Inventor
王芮
Original Assignee
百度在线网络技术(北京)有限公司
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 百度在线网络技术(北京)有限公司 filed Critical 百度在线网络技术(北京)有限公司
Priority to CN201610509871.5A priority Critical patent/CN106155931B/en
Priority claimed from CN201610509871.5A external-priority patent/CN106155931B/en
Publication of CN106155931A publication Critical patent/CN106155931A/en
Application granted granted Critical
Publication of CN106155931B publication Critical patent/CN106155931B/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B19/00Driving, starting, stopping record carriers not specifically of filamentary or web form, or of supports therefor; Control thereof; Control of operating function ; Driving both disc and head
    • G11B19/20Driving; Starting; Stopping; Control thereof
    • G11B19/28Speed controlling, regulating, or indicating

Abstract

The invention provides the method and apparatus that speed limit read by a kind of disk, it is spaced to schedule, obtain the reading percentage ratio of disk in the current device of execution current process, percentage ratio of reading according to described disk judges the duty of described current device, duty according to described current device, dynamically adjust current process and read the reading rate threshold value of described disk, thus dynamically adjust the reading data speed of disk, when disk performance is poor, reading disk data while guarantee machine is properly functioning, when disk performance is preferable, the resource of current device can be made full use of, improve the stability that equipment runs, making full use of of device resource is achieved on the premise of guarantee equipment is properly functioning, improve the experience of user.

Description

The method and apparatus of speed limit read by a kind of disk

Technical field

The present invention relates to field of computer technology, particularly relate to a kind of disk and read speed limit technology.

Background technology

During application process uploads data procedures in equipment, first disk file is read in internal memory, pass through institute the most again Stating device operating system networking component and be sent to server, upload data instance with Dropbox series products, existing full speed reads magnetic The method of dish, reading disk data are until the end of file at full speed, and this reading manner can cause disk resource extremely to consume, easily Described equipment card is caused to pause, and cisco unity malfunction;The existing method with fixing speed limit reading disk, omnidistance with fixing speed limit Reading disk data, when described disk reading rate is less than particular value, sleeps in current thread, use this reading manner, When disk performance is preferable, it is impossible to make full use of the resource of described equipment, cause the wasting of resources.

Therefore, how to provide a kind of and be both avoided that process quickly read the Caton phenomenon caused, can sufficiently utilize again and set Speed limit technology read by the disk of standby resource, becomes one of those skilled in the art's problem needing solution badly.

Summary of the invention

It is an object of the invention to provide the method and apparatus that speed limit read by a kind of disk.

According to an aspect of the invention, it is provided a kind of method that speed limit read by disk, wherein, the method includes following step Rapid:

It is spaced to schedule, obtains the reading percentage ratio of disk in the current device performing current process;

Percentage ratio of reading according to described disk judges the duty of described current device;

According to the duty of described current device, dynamically adjust current process and read the reading rate threshold value of described disk.

Preferably, the described percentage ratio of reading according to described disk judges the step bag of duty of described current device Include:

When the reading percentage ratio of described disk is more than or equal to the first reading percentage threshold, it is judged that the work shape of described current device State is busy;

When the reading percentage ratio of described disk is less than or equal to the second reading percentage threshold, it is judged that the work shape of described current device State is idle.

Preferably, the described duty according to described current device, dynamically adjust current process and read described disk The step of reading rate threshold value includes:

If the duty of described current device is busy, reduce the reading rate threshold value of described disk;

If the duty of described current device is idle, increase the reading rate threshold value of described disk.

Preferably, the described duty according to described current device, dynamically adjust current process and read described disk The step of reading rate threshold value includes:

If the duty of described current device is busy, reduce the reading rate threshold of described disk with the first predetermined value Value;

If the duty of described current device is idle, increase the reading rate threshold of described disk with the second predetermined value Value;

Wherein, described first predetermined value and the second predetermined value are arranged according to type and the performance of described disk.

Preferably, the method also includes:

When described current process initializes, according to type and the performance of described disk, the reading speed of described disk is set Degree threshold value.

Preferably, the method also includes:

Dynamic calculation also monitors the reading rate of described disk, it is ensured that the reading rate of described disk is less than or equal to described reading rate Threshold value.

According to another aspect of the present invention, additionally providing a kind of disk and read speed-limiting device, wherein, this device includes following Device:

For being spaced to schedule, obtain the dress reading percentage ratio of disk in the current device performing current process Put;

The device of the duty of described current device is judged for the reading percentage ratio according to described disk;

For the duty according to described current device, dynamically adjust current process and read the reading rate threshold of described disk The device of value.

Preferably, the device of the described duty judging described current device for the reading percentage ratio according to described disk For:

When the reading percentage ratio of described disk is more than or equal to the first reading percentage threshold, it is judged that the work shape of described current device State is busy;

When the reading percentage ratio of described disk is less than or equal to the second reading percentage threshold, it is judged that the work shape of described current device State is idle.

Preferably, described for the duty according to described current device, dynamically adjust current process and read described magnetic The device of the reading rate threshold value of dish is used for:

If the duty of described current device is busy, reduce the reading rate threshold value of described disk;

If the duty of described current device is idle, increase the reading rate threshold value of described disk.

Preferably, described for the duty according to described current device, dynamically adjust current process and read described magnetic The device of the reading rate threshold value of dish is used for:

If the duty of described current device is busy, reduce the reading rate threshold of described disk with the first predetermined value Value;

If the duty of described current device is idle, increase the reading rate threshold of described disk with the second predetermined value Value;

Wherein, described first predetermined value and the second predetermined value are arranged according to type and the performance of described disk.

Preferably, this disk reading speed-limiting device also includes:

When described current process initializes, according to type and the performance of described disk, described disk is set The device of reading rate threshold value.

Preferably, this disk reading speed-limiting device also includes:

For dynamic calculation the reading rate of monitoring described disk, it is ensured that the reading rate of described disk is less than or equal to described reading The device of threshold speed.

Compared with prior art, the invention have the advantages that

The present invention is spaced to schedule, obtains the reading percentage ratio of disk, root in the current device performing current process The duty of described current device is judged according to the percentage ratio of reading of described disk, according to the duty of described current device, dynamic State adjusts current process and reads the reading rate threshold value of described disk, thus adjusts the reading data speed of disk, at disk performance relatively During difference, it is ensured that reading disk data while machine is properly functioning, when disk performance is preferable, current device can be made full use of Resource, improve equipment run stability, on the premise of guarantee equipment is properly functioning, achieve the abundant of device resource Utilize, improve the experience of user.

Further, the present invention, according to the duty of described equipment, adjusts current process and reads the reading speed of described disk During degree threshold value, accordingly increase based on the reading rate threshold value of the disk after adjacent last renewal or reduce, Such that it is able to dynamically adjust the reading data speed of disk, use current device to experience user and utilize between the two with machine resources Carry out Intelligent adjustment.

Accompanying drawing explanation

By the detailed description that non-limiting example is made made with reference to the following drawings of reading, other of the present invention Feature, purpose and advantage will become more apparent upon:

Fig. 1 illustrates that the structural representation of speed-limiting device read by a kind of disk according to one aspect of the invention;

Fig. 2 illustrates that the schematic flow sheet of the method for speed limit read by a kind of disk according to a further aspect of the present invention.

In accompanying drawing, same or analogous reference represents same or analogous parts.

Detailed description of the invention

It should be mentioned that, some exemplary embodiments are described as before being discussed in greater detail exemplary embodiment The process described as flow chart or method.Although flow chart operations is described as order process, but therein permitted Multioperation can be implemented concurrently, concomitantly or simultaneously.Additionally, the order of operations can be rearranged.When it When having operated, described process can be terminated, it is also possible to have the additional step being not included in accompanying drawing.Described process Can correspond to method, function, code, subroutine, subprogram etc..

Alleged " computer equipment " within a context, also referred to as " computer ", refer to by running preset program or to refer to Order performs the intelligent electronic device of the predetermined process process such as numerical computations and/or logical calculated, its can include processor with Memorizer, processor the survival performing to prestore in memory instruction performs predetermined process process, or by ASIC, The hardware such as FPGA, DSP performs predetermined process process, or is combined by said two devices and realize.Computer equipment includes but does not limits In server, PC, notebook computer, panel computer, smart mobile phone etc..

Described computer equipment includes subscriber equipment and the network equipment.Wherein, described subscriber equipment includes but not limited to electricity Brain, smart mobile phone, PDA etc.;The described network equipment includes but not limited to what single network server, multiple webserver formed Server group or the cloud being made up of a large amount of computers or the webserver based on cloud computing (Cloud Computing), wherein, Cloud computing is the one of Distributed Calculation, the super virtual machine being made up of a group loosely-coupled computer collection.Its In, described computer equipment isolated operation can realize the present invention, it is possible to access network and by with in network other calculate The interactive operation of machine equipment realizes the present invention.Wherein, the network residing for described computer equipment include but not limited to the Internet, Wide area network, Metropolitan Area Network (MAN), LAN, VPN etc..

It should be noted that described subscriber equipment, the network equipment and network etc. are only for example, other are existing or from now on may be used Computer equipment or the network that can occur such as are applicable to the present invention, within also should being included in scope, and to draw It is incorporated herein by mode.

Method (some of them are illustrated by flow chart) discussed hereafter can pass through hardware, software, firmware, centre Part, microcode, hardware description language or its combination in any are implemented.When implementing by software, firmware, middleware or microcode Time, program code or code segment in order to implement necessary task can be stored in machine or computer-readable medium (is such as deposited Storage media) in.(one or more) processor can implement the task of necessity.

Concrete structure disclosed herein and function detail are the most representational, and are for describing showing of the present invention The purpose of example embodiment.But the present invention can be implemented by many alternative forms, and is not interpreted as It is limited only by the embodiments set forth herein.

Although it should be appreciated that here may have been used term " first ", " second " etc. to describe unit, But these unit should not be limited by these terms.These terms are used to be only used to a unit and another unit Make a distinction.For example, in the case of without departing substantially from the scope of exemplary embodiment, it is single that first module can be referred to as second Unit, and second unit can be referred to as first module similarly.Term "and/or" used herein above include one of them or Any and all combination of more listed associated item.

It should be appreciated that when a unit is referred to as " connection " or during " coupled " to another unit, and it can directly connect Connect or be coupled to another unit described, or temporary location can be there is.On the other hand, it is referred to as " directly connecting when a unit Connect " or " direct-coupling " to another unit time, the most there is not temporary location.Should explain in a comparable manner and be used for retouching State the relation between unit other words (such as " and be in ... between " compared to " and be directly in ... between ", " with ... adjacent Closely " compared to " with ... be directly adjacent to " etc.).

Term used herein above is only used to describe specific embodiment and be not intended to limit exemplary embodiment.Unless Context refers else clearly, and singulative the most used herein above " ", " one " also attempt to include plural number.Also should When being understood by, term used herein above " include " and/or " comprising " specify stated feature, integer, step, operation, Unit and/or the existence of assembly, and do not preclude the presence or addition of other features one or more, integer, step, operation, unit, Assembly and/or a combination thereof.

It should further be mentioned that in some replace implementation, the function/action being previously mentioned can be attached according to being different from The order indicated in figure occurs.For example, depending on involved function/action, the two width figures in succession illustrated actually may be used Substantially simultaneously to perform or sometimes can perform in a reverse order.

Below in conjunction with the accompanying drawings the present invention is described in further detail.

Fig. 1 illustrates that the structural representation of speed-limiting device read by a kind of disk according to one aspect of the invention.Speed limit read by disk Device 1 includes: 1) for being spaced to schedule, obtains the reading percentage ratio of disk in the current device performing current process Device, hereinafter referred to as acquisition device 101;2) the work shape of described current device is judged for the percentage ratio of reading according to described disk The device of state, hereinafter referred to as judgment means 102;3) for the duty according to described current device, dynamically adjust when advancing Journey reads the device of the reading rate threshold value of described disk, hereinafter referred to as adjusting apparatus 103.

Such as may be located in computer equipment here, speed-limiting device 1 read by disk, described computer equipment includes that network sets Standby and subscriber equipment.Described disk is read speed-limiting device 1 and is such as positioned in the network equipment, reads by dynamically adjusting network equipment process Taking the reading rate threshold value of disk, thus limit the reading rate of network equipment process reading disk, wherein, described disk is that network sets Standby disk.Described disk is read speed-limiting device 1 and is such as positioned in subscriber equipment, as being positioned at a certain application apparatus of subscriber equipment In, Dropbox client terminal device that this application apparatus is for example, positioned in subscriber equipment or application apparatus corresponding to other application, When this application apparatus runs, disk reads speed-limiting device 1 by dynamically adjusting the reading speed of the process reading disk of this application apparatus Degree threshold value, thus limit the reading rate of the process reading disk of this application apparatus, wherein said disk is the disk of subscriber equipment.

Read to be described in detail as a example by speed-limiting device 1 is positioned in subscriber equipment by disk below.

Described subscriber equipment includes but not limited to that PC, portable computer, panel computer, smart mobile phone, PDA etc. set Standby.Those skilled in the art will be understood that above-mentioned subscriber equipment is only for example, other use that are existing or that be likely to occur from now on Family equipment is such as applicable to the present invention and also should be included in scope, and is incorporated herein by reference.

Wherein, acquisition device 101 is spaced to schedule, obtains the reading of disk in the current device performing current process Percentage ratio.Specifically, when device process runs, acquisition device 101 such as passes through disk real-time performance monitoring module according in advance Fix time interval, the reading percentage ratio of persistent collection disk, such as, call, by one or many, the application journey that this equipment is provided Sequence interface (API) or the communication mode of other agreements, obtain the reading percentage ratio of disk in equipment currently operation process.Wherein, institute State predetermined time interval for example, 1 second, or the process being currently running according to type, performance or the device systems of disk Number, arranges according to certain rule or dynamically adjusts described predetermined time interval.Wherein, described disk real-time performance monitoring mould The functional module that can monitor disk current performance in real time that block provides for system, described disk real-time performance monitoring module monitors Object include but not limited to: 1) the reading percentage ratio of disk;2) I/O number (IOPS or tps) per second;3) handling capacity (Throughput);4) average I/O data size;5) service time (Service Time);6) I/O waiting list length (Queue Length);7) waiting time (Wait Time).Wherein, the reading percentage ratio of described disk is selected disk drive Device is in read requests and processes percentage of time shared during the active states such as order (such as tracking), i.e. disk utilization. Specifically, the percentage ratio of reading of disk runs the ratio of total time equal to the disc driver rush hour and system.

Herein it is assumed that represent that percentage ratio read by disk with parameter cdrp, the disc driver rush hour is expressed as cdbt, system Run General Schedule and be shown as sott, then disk reading percentage ratio can be calculated by equation below:

Cdrp=cdbt/sott

Those skilled in the art will be understood that above-mentioned predetermined time interval is to be only for example for 1 second, and other are existing or modern After the setting of predetermined time interval that is likely to occur, all should comprise within the scope of the present invention as being applicable to the present invention, And be incorporated herein by reference at this.Those skilled in the art should also be understood that, is used for the equipment that obtains and currently runs process The disk real-time performance monitoring module reading percentage ratio of middle disk is only for example, other use that are existing or that be likely to occur from now on In obtaining the module reading percentage ratio of disk in equipment currently operation process, the present invention all should be included in as being applicable to the present invention Protection domain in, and be incorporated herein by reference at this.

Judgment means 102 judges the duty of described current device according to the percentage ratio of reading of described disk.Specifically, magnetic The reading percentage ratio of dish is directly proportional to contention for resources degree, is inversely proportional to performance, i.e. the reading percentage ratio of disk is the highest, resource between process Contention is the most serious, and equipment working state is the busiest, and equipment response time is the longest;On the contrary, the reading percentage ratio of disk is the lowest, enters Between journey, the phenomenon of contention for resources does not more highlight, and equipment working state is the most idle, and equipment response time is the shortest, it is judged that device 102 According to acquisition device 101 obtain described disk read percentage ratio size, it is judged that the duty of current device be busy or Person is idle, according to the specific works state of current device, dynamically adjusts the reading rate threshold value of this current process reading disk, thus Realize adjusting current process and read the reading rate of described disk.Such as, acquisition device 101 obtained a current device every 1 second The reading percentage ratio A of middle disk, when the numeric ratio of A is bigger, when being greater than equal to 92%, it is judged that device 102 is judged described The duty of current device is busier, and disk workload is big, and resource occupation is many;When the numeric ratio of A is less, e.g., less than During equal to 75%, it is judged that device 102 judges that the duty of described current device is the most idle for comparing, and disk workload is little, money Source takies few.

During here, the reading percentage ratio of described disk is more than or equal to the first reading percentage threshold, it is judged that device 102 judges described The duty of current device is busy;When the reading percentage ratio of described disk is less than or equal to the second reading percentage threshold, it is judged that dress Put 102 and judge that the duty of described current device is as idle.Specifically, described first reading percentage threshold is user or opens That originator is arranged according to the overall performance of the type of disk and system with disk, can judge current device normal process data Reading percentage threshold, or, according to current device proximity card pause state disk border read percentage ratio arrange reading percentage Compare threshold value.When the reading percentage ratio of disk is than or equal to this first reading percentage threshold, represent that current device needs to process Task the most, current device is it is possible that card, it is impossible to normal work or to read the speed of data slow, it is judged that Device 102 judges that the duty of current device is busy.Described second read percentage threshold be user or developer according to The overall performance of the type of disk and system and disk is arranged, current device can operate at the reading percentage ratio of optimum state Threshold value, when the reading percentage ratio of disk is less than or equal to this second reading percentage threshold, the resource utilization of current device is the highest, sentences Disconnected device 102 judges that the duty of current device is as idle.Such as, obtain according to the type of disk or the performance state of system Going out, when the reading percentage ratio of solid magnetic disc is more than or equal to 90%, solid magnetic disc running speed starts slack-off, or starts card occur Phenomenon, described first reads percentage threshold is set to 90%;When the reading percentage ratio of solid magnetic disc is less than or equal to 70%, solid-state Disk processing speed reaches optimum state, and described second reads percentage threshold is set to 70%.Reading hundred when described solid magnetic disc When proportion by subtraction is more than or equal to 90%, it is judged that device 102 judges that the duty of described current device is busy;When described solid magnetic disc Reading percentage ratio less than or equal to 70% time, it is judged that device 102 judges that the duty of described current device is for the free time.

Those skilled in the art will be understood that the above-mentioned percentage ratio of reading according to described disk judges the work of described current device The mode making state is only for example, and the reading percentage ratio according to described disk that is existing or that be likely to occur from now on judges described working as The mode of the duty of front equipment is such as applicable to the present invention and all should be included in scope, and at this to quote Mode be incorporated herein.

Adjusting apparatus 103, according to the duty of described current device, dynamically adjusts current process and reads described disk Reading rate threshold value.Specifically, it is judged that device 102 judges that the duty of current device is busy or after the free time, dress is adjusted Put 103 and be in busy or idle duty according to described current device, reduce or increase current device accordingly and read Take the reading rate threshold value of described disk, by the way of adjusting described reading rate threshold value, it is achieved adjust current process and read described The reading rate of disk, and then ensure the normal work of described disk and ensure making full use of of device resource.Here, described reading Threshold speed means threshold value that arrange, that control current process reading equipment data in magnetic disk speed for current process, is used for limiting Current process reads the maximum of described disk, helps to ensure that the stability that disk runs, and can be described by changing Disk reading rate threshold value adjusts current process and reads the reading rate of described disk.

Here, the speed-limiting device 1 reading percentage ratio by detection disk in real time read by disk, dynamically adjust the reading speed of described disk Degree threshold value, thus adjust the reading data speed of disk, on the premise of ensureing that current device is properly functioning, make full use of and currently set Standby resource.

Preferably, if the duty of described current device is busy, adjusting apparatus 103 reduces current process and reads described The reading rate threshold value of disk;If the duty of described current device is idle, adjusting apparatus 103 increases current process and reads institute State the reading rate threshold value of disk.Specifically, when the duty of current device is busy, for ensureing the normal fortune of current device OK, adjusting apparatus 103 reads the reading rate threshold value of described disk by reducing current process, and current process reads described disk Reading rate threshold value be updated to reduce after numerical value, control current process read described disk reading rate, it is ensured that current process When continuing the reading rate reading disk data with described reading rate threshold value, described disk remains able to run well;Current device Duty when being idle, for ensureing that the resource of current device is fully used, adjusting apparatus 103 increases current process and reads Taking the reading rate threshold value of described disk, the reading rate threshold value that current process reads described disk is updated to the numerical value after increasing, Improve current process and read the reading rate of described disk, and then improve the work efficiency of current process.Such as, the work of current device As state be busy time, current process is read the reading rate threshold value of described disk and is decreased to by 60MB/s by adjusting apparatus 103 55MB/s, current process reads the reading rate threshold value of described disk and changes to 55MB/s so that current process reads described disk Reading rate maximum less than 55MB/s, alleviate the operating load of described disk, prevent current device from card occurring;Currently set When standby duty is idle, the reading rate threshold value that current process reads described disk is improved to 62MB/s by 60MB/s, Current process reads the reading rate threshold value of described disk and changes to 62MB/s, improves the resource utilization of current device.

Here, acquisition device 101 is spaced at predetermined time intervals, for example, 1s, just obtain disk in a current device Read percentage ratio, it is judged that according to the percentage ratio of reading of this disk, device 102 judges that the duty of current device is idle or busy, Adjusting apparatus 103 determines that according to described duty needing to increase or reduce current process reads the reading rate of described disk Threshold value, after adjusting apparatus 103 updates with the adjacent last time when adjusting the reading rate threshold value of the current process described disk of reading Accordingly increase based on the reading rate threshold value of disk or reduce.Dynamically adjust the reading rate of disk, use user Current device is experienced and machine resources utilizes and carries out Intelligent adjustment between the two, on the machine that disk performance is poor, and Bu Huiyin Cause machine card to pause for transmitting file in current process, on the preferable machine of disk performance, system resource can be made full use of.

Here, adjusting apparatus 103 can be increased or decreased current process with a fixed value reads the reading speed of described disk Degree threshold value, it is also possible to current process is increased or decreased with different values every time and reads the reading rate threshold value of described disk.

Preferably, if the duty of described current device is busy, adjusting apparatus 103 reduces institute with the first predetermined value State the reading rate threshold value of disk;If the duty of described current device is idle, adjusting apparatus 103 increases with the second predetermined value Add the reading rate threshold value of described disk;Wherein, described first predetermined value and the second predetermined value are according to the type of described disk Arrange with performance.Specifically, described first predetermined value and the second predetermined value can be by user according to the types of described disk Directly arrange with performance requirement, it is also possible to arrange in the following way: read percentage threshold or second according to above-mentioned first and read The situation of percentage threshold, determines that the reading rate threshold value of the current process described disk of reading needs the numerical value reducing or increasing big Little, such as, current device duty is busy, and the reading percentage ratio of the disk of current device deducts the first reading percentage ratio threshold When the difference being worth to is more than or equal to 5%, there is the hidden danger such as card in current device, and described current process reads the reading of described disk Threshold speed needs to deduct bigger numerical value, such as 8MB/s so that current device reads the reading rate of described disk and quickly subtracts Little, it is ensured that described disk properly functioning, if described difference is less than 5%, current process reads the reading rate threshold of described disk Value can deduct less numerical value, such as, 2MB/s;Current device duty is idle, and described second reads percentage ratio threshold Value deducts when reading the difference that obtains of percentage ratio more than or equal to 6% of the disk of current device, and current device task is few, the utilization of resources Rate is the highest, and described current process reads the reading rate threshold value of described disk to be needed to increase bigger numerical value, such as, 5MB/s so that Current device reads the speed of described disk and quickly improves, and improves the resource utilization of current device as early as possible, if described second Read percentage threshold deduct current device disk read the difference that obtains of percentage ratio less than 6%, current process reads described magnetic The reading rate threshold value of dish can increase less numerical value, such as, 1MB/s.

Here, whenever adjusting apparatus 103 needs to reduce the reading rate threshold value of described disk, i.e. reduce with the first predetermined value The reading rate threshold value of described disk;Whenever adjusting apparatus 103 needs to increase the reading rate threshold value of described disk, i.e. make a reservation for second Numerical value increases the reading rate threshold value of described disk.Such as, judge that current device duty, as idle, is adjusted when judgment means 102 Engagement positions 103 increases the reading rate threshold value of described disk with the second predetermined value;Subsequently, when every predetermined time interval, such as For 1s, acquisition device 101 obtains the reading percentage ratio of disk in current device again, it is judged that device 102 is according to the reading hundred of this disk Proportion by subtraction, it is judged that the duty of current device is still idle, then adjusting apparatus 103 increases described again with the second predetermined value The reading rate threshold value of disk.

Illustrate that this disk is read speed-limiting device 1 and dynamically adjusted the current process described disk of reading with a concrete formula below The process of reading rate threshold value.

Herein it is assumed that current " disk reading percentage ratio " is parameter cdrp;" disk reading percentage ratio " when machine IO is busy is Parameter xdrp, i.e. the first reading percentage threshold is parameter xdrp;" disk reading percentage ratio " during machine IO free time is parameter Ndrp, i.e. the second reading percentage threshold is parameter ndrp;The reading rate threshold value of current process reading disk is parameter drst.When During this process initialization, drst=N (unit: MB/s) is set.

Disk is read speed-limiting device 1 and is spaced at predetermined time intervals, obtains the reading of disk in the current device performing current process Percentage ratio, such as, carried out once " disk reading percentage ratio " numerical sample, and checks according to equation below every 1 second:

Wherein delta1 and delta2 is two numerical value of regulation process disk reading rate, and delta1 is the first predetermined number Value, delta2 is the second predetermined value, and its unit is MB/s.

Here, according to the type of disk and performance, or in conjunction with empirical value, such as, N=60MB/s, xdrp=are set 90%, ndrp=70%, deltal=5MB/s, delta2=1MB/s.

Preferably, disk read speed-limiting device 1 also include: 1) for equipment currently run process initialize time, according to The type of described disk and performance, arrange the device of the reading rate threshold value of described disk, hereinafter referred to as arranges device 104 and (does not shows Go out);2) it is used for dynamic calculation and monitors the reading rate of described disk, it is ensured that the reading rate of described disk reads speed less than or equal to described The device of degree threshold value, hereinafter referred to as calculates monitoring device 105 (not shown).

Equipment currently runs process when initializing, and arranges device 104 according to the type of described disk and performance, arranges The reading rate threshold value of described disk.Specifically, when reopening equipment and currently running process, or reinstall described currently When operation program or the program that carries out current operation program update, device 104 is set according to the type of disk and performance, arranges The initial read threshold speed of described disk, for example, 60MB/s so that adjusting apparatus 103 dynamically adjusts current process and reads described During the reading rate threshold value of disk, with this initial read threshold speed, for example, 60MB/s, based on threshold value progressively adjust.Its Described in disk type for example: solid magnetic disc, mechanical disk or hybrid magnetic disc etc., the performance of disk for example: disk Reading percentage ratio, I/O number per second, handling capacity, average I/O data size, service time, I/O waiting list length, wait time Between, average seek time etc..

Calculate monitoring device 105 dynamic calculation and monitor the reading rate of described disk, it is ensured that current process reads described magnetic The reading rate of dish is less than or equal to described reading rate threshold value.Specifically, monitoring device 105 interval calculation at predetermined time intervals is calculated also Monitor the reading rate of described disk, it is ensured that current process is less than described reading rate threshold when reading the reading rate maximum of described disk Value, it is achieved the reading rate threshold value reading described disk by controlling current process adjusts the reading of the most disk of current process reading Speed.

Below by way of a specific embodiment, above-mentioned disk is read speed-limiting device 1 to be described in detail:

First disk file is read in current device internal memory by the client upload data procedures of Baidu's cloud disk, then It being sent to server by the operating system networking component of current device again, parameter once is set in advance: 1) process brings into operation Time, current process reads the reading rate initial threshold of described disk, such as 60MB/s;2) acquisition device 101 is every one second just Obtain the most described current process and read the reading rate threshold value of described disk;3) described first reads percentage threshold for example, 90%, described second reads percentage threshold for example, 70%;4) the first predetermined value is 5MB/s, and the second predetermined value is 1MB/ s.When starting Baidu cloud disk client and uploading data, the process corresponding with Baidu cloud disk client brings into operation, acquisition device 101 by the reading percentage ratio A of the disk of disk real-time performance monitoring module acquisition current device, then by the reading hundred of described disk Proportion by subtraction respectively with first read percentage threshold, 90%, and second read percentage threshold, 70%, compare, work as judgment means 102 judge when A is more than or equal to 90%, and now the duty of equipment is busy, and adjusting apparatus 103 is by the reading speed of described disk Degree initial threshold reduces 5MB/s, becomes the reading rate threshold value of the disk after updating to 55MB/s;When judgment means 102 judges A During less than or equal to 70%, now the duty of equipment is idle, and adjusting apparatus 103 is by the reading rate initial threshold of described disk Increase 1MB/s, become reading rate threshold value 61MB/s of the disk after updating;Acquisition device 101, every one second, just obtains once The reading percentage ratio of disk in current device, it is judged that device 102 judges the work shape of current device according to the percentage ratio of reading of this disk State is idle or busy, according to described duty, adjusting apparatus 103 determines that needs increase or reduce current process and read Taking the reading rate threshold value of described disk, it is with phase that adjusting apparatus 103 adjusts the reading rate threshold value of the current process described disk of reading Accordingly increase based on the reading rate threshold value of the adjacent disk after last renewal or reduce, dynamically adjusting disk Reading rate, uses current device to experience user and carries out Intelligent adjustment between the two with machine resources utilization.Such as, at above-mentioned tune After the reading rate threshold value of disk is reduced to 55MB/s by engagement positions 103, in 1 second, acquisition device 101 obtains currently again The reading percentage ratio A of the disk of equipment, then by the reading percentage ratio of described disk respectively with first read percentage threshold, 90%, and Second reads percentage threshold, and 70%, compare, when judgment means 102 judges that A is more than or equal to 90%, now equipment Duty is busy, and the reading rate threshold value of described disk is reduced 5MB/s by adjusting apparatus 103 again, becomes the magnetic after updating The reading rate threshold value of dish is to 50MB/s;When judgment means 102 judges that A is less than or equal to 70%, the now duty of equipment For the free time, the reading rate threshold value of described disk is increased 1MB/s by adjusting apparatus 103, becomes the reading rate threshold of the disk after updating Value 56MB/s.

Fig. 2 illustrates that the schematic flow sheet of the method for speed limit read by a kind of disk according to a further aspect of the present invention.

Such as may be located in computer equipment here, speed-limiting device 1 read by disk, described computer equipment includes that network sets Standby and subscriber equipment.Described disk is read speed-limiting device 1 and is such as positioned in the network equipment, reads by dynamically adjusting network equipment process Taking the reading rate threshold value of disk, thus limit the reading rate of network equipment process reading disk, wherein, described disk is that network sets Standby disk.Described disk is read speed-limiting device 1 and is such as positioned in subscriber equipment, as being positioned at a certain application apparatus of subscriber equipment In, Dropbox client terminal device that this application apparatus is for example, positioned in subscriber equipment or application apparatus corresponding to other application, When this application apparatus runs, disk reads speed-limiting device 1 by dynamically adjusting the reading speed of the process reading disk of this application apparatus Degree threshold value, thus limit the reading rate of the process reading disk of this application apparatus, wherein said disk is the disk of subscriber equipment.

Read to be described in detail as a example by speed-limiting device 1 is positioned in subscriber equipment by disk below.

Described subscriber equipment includes but not limited to that PC, portable computer, panel computer, smart mobile phone, PDA etc. set Standby.Those skilled in the art will be understood that above-mentioned subscriber equipment is only for example, other use that are existing or that be likely to occur from now on Family equipment is such as applicable to the present invention and also should be included in scope, and is incorporated herein by reference.

In step s 201, disk is read speed-limiting device 1 and is spaced to schedule, obtains and performs currently setting of current process The reading percentage ratio of standby middle disk.Specifically, when device process runs, in step s 201, disk reading speed-limiting device 1 is the most logical Cross disk real-time performance monitoring module to be spaced to schedule, the reading percentage ratio of persistent collection disk, such as by once or Repeatedly calling application programming interfaces (API) or the communication mode of other agreements that this equipment is provided, acquisition equipment currently runs The reading percentage ratio of disk in process.Wherein, described predetermined time interval for example, 1 second, or according to the type of disk, performance or The process number that person's device systems is currently running, arranges according to certain rule or dynamically adjusts between the described scheduled time Every.Wherein, the function mould that can monitor disk current performance in real time that described disk real-time performance monitoring module provides for system Block, the object of described disk real-time performance monitoring module monitoring includes but not limited to: 1) the reading percentage ratio of disk;2) I/O per second Number (IOPS or tps);3) handling capacity (Throughput);4) average I/O data size;5) (Service service time Time);6) I/O waiting list length (Queue Length);7) waiting time (Wait Time).Wherein, the reading of described disk When the disc driver that percentage ratio is selected is in read requests and processes shared during the active states such as order (as tracking) Between percentage ratio, i.e. disk utilization.Specifically, the reading percentage ratio of disk runs total equal to the disc driver rush hour and system The ratio of time.

Herein it is assumed that represent that percentage ratio read by disk with parameter cdrp, the disc driver rush hour is expressed as cdbt, system Run General Schedule and be shown as sott, then disk reading percentage ratio can be calculated by equation below:

Cdrp=cdbt/sott

Those skilled in the art will be understood that above-mentioned predetermined time interval is to be only for example for 1 second, and other are existing or modern After the setting of predetermined time interval that is likely to occur, all should comprise within the scope of the present invention as being applicable to the present invention, And be incorporated herein by reference at this.Those skilled in the art should also be understood that, is used for the equipment that obtains and currently runs process The disk real-time performance monitoring module reading percentage ratio of middle disk is only for example, other use that are existing or that be likely to occur from now on In obtaining the module reading percentage ratio of disk in equipment currently operation process, the present invention all should be included in as being applicable to the present invention Protection domain in, and be incorporated herein by reference at this.

In step S202, disk is read speed-limiting device 1 and is judged described current device according to the percentage ratio of reading of described disk Duty.Specifically, the reading percentage ratio of disk is directly proportional to contention for resources degree, is inversely proportional to performance, i.e. the reading hundred of disk Proportion by subtraction is the highest, and between process, contention for resources is the most serious, and equipment working state is the busiest, and equipment response time is the longest;On the contrary, magnetic The reading percentage ratio of dish is the lowest, and between process, the phenomenon of contention for resources does not more highlight, and equipment working state is the most idle, equipment response time The shortest, in step S202, disk is read speed-limiting device 1 and is read percentage ratio according to the described disk that obtains in step s 201 Size, it is judged that the duty of current device is busy or idle, according to the specific works state of current device, dynamically adjusts The reading rate threshold value of this current process reading disk, thus realize adjusting current process and read the reading rate of described disk.Such as, In step s 201, speed-limiting device 1 reading percentage ratio A of disk in current device of acquisition in 1 second read by disk, when the number of A When being worth bigger, when being greater than equal to 92%, in step S202, disk is read speed-limiting device 1 and is judged described current device Duty busier, disk workload is big, and resource occupation is many;When the numeric ratio of A is less, e.g., less than equal to 75% Time, in step S202, disk is read speed-limiting device 1 and is judged that the duty of described current device is the most idle for comparing, disk work Work amount is little, and resource occupation is few.

During here, the reading percentage ratio of described disk is more than or equal to the first reading percentage threshold, in step S202, disk is read Speed-limiting device 1 judges that the duty of described current device is busy;The reading percentage ratio of described disk is less than or equal to the second reading hundred During proportion by subtraction threshold value, in step S202, disk is read speed-limiting device 1 and is judged that the duty of described current device is as idle.Specifically Ground, described first to read percentage threshold be user or developer according to the overall performance of the type of disk and system with disk That arrange, judge current device can the reading percentage threshold of normal process data, or, pause shape according to current device proximity card The reading percentage threshold that percentage ratio is arranged is read on the border of the disk of state.When the reading percentage ratio of disk is than or equal to this first reading During percentage threshold, representing that current device needs task to be processed the most, current device is it is possible that card pauses, it is impossible to normal The speed of work or reading data is slow, and in step S202, disk is read speed-limiting device 1 and judged the work shape of current device State is busy.Described second read that percentage threshold is user or developer according to the type of disk and system and disk whole Body performance is arranged, current device can operate at the reading percentage threshold of optimum state, when the reading percentage ratio of disk is less than When this second reading percentage threshold, the resource utilization of current device is the highest, and in step S202, speed-limiting device 1 read by disk Judge that the duty of current device is as idle.Such as, draw according to the type of disk or the performance state of system, work as solid-state When the reading percentage ratio of disk is more than or equal to 90%, solid magnetic disc running speed starts slack-off, or starts Caton phenomenon occur, institute State the first reading percentage threshold and be set to 90%;When the reading percentage ratio of solid magnetic disc is less than or equal to 70%, solid magnetic disc processes Speed reaches optimum state, and described second reads percentage threshold is set to 70%.When the reading percentage ratio of described solid magnetic disc is more than During equal to 90%, in step S202, disk reading speed-limiting device 1 judges that the duty of described current device is busy;Work as institute When stating the reading percentage ratio of solid magnetic disc less than or equal to 70%, in step S202, disk is read speed-limiting device 1 and is judged described currently to set Standby duty is idle.

Those skilled in the art will be understood that the above-mentioned percentage ratio of reading according to described disk judges the work of described current device The mode making state is only for example, and the reading percentage ratio according to described disk that is existing or that be likely to occur from now on judges described working as The mode of the duty of front equipment is such as applicable to the present invention and all should be included in scope, and at this to quote Mode be incorporated herein.

In step S203, the speed-limiting device 1 duty according to described current device read by disk, dynamically adjusts when advancing Journey reads the reading rate threshold value of described disk.Specifically, in step S202, disk is read speed-limiting device 1 and is judged current device Duty be busy or after the free time, in step S203, disk read speed-limiting device 1 be in numerous according to described current device Busy or idle duty, reduces or increases current device accordingly and read the reading rate threshold value of described disk, pass through Adjust the mode of described reading rate threshold value, it is achieved adjust current process and read the reading rate of described disk, and then ensure described magnetic The normal work of dish and making full use of of guarantee device resource.Here, described reading rate threshold value means to arrange for current process , control current process read equipment data in magnetic disk speed threshold value, for limit current process read described disk maximum Value, helps to ensure that the stability that disk runs, and can adjust when advancing by changing described disk reading rate threshold value Journey reads the reading rate of described disk.

Here, the speed-limiting device 1 reading percentage ratio by detection disk in real time read by disk, dynamically adjust the reading speed of described disk Degree threshold value, thus adjust the reading data speed of disk, on the premise of ensureing that current device is properly functioning, make full use of and currently set Standby resource.

Preferably, if the duty of described current device is busy, in step S203, disk is read speed-limiting device 1 and is subtracted Little current process reads the reading rate threshold value of described disk;If the duty of described current device is idle, in step S203 In, disk is read speed-limiting device 1 and is increased the reading rate threshold value of the current process described disk of reading.Specifically, the work of current device When state is busy, for ensureing the properly functioning of current device, in step S203, disk is read speed-limiting device 1 and is worked as by reducing Front process reads the reading rate threshold value of described disk, current process is read after the reading rate threshold value of described disk is updated to reduce Numerical value, control current process and read the reading rate of described disk, it is ensured that current process continues with the reading of described reading rate threshold value During speed reading disk data, described disk remains able to run well;When the duty of current device is idle, for ensureing The resource of current device is fully used, and in step S203, disk is read speed-limiting device 1 and increased the current process described magnetic of reading The reading rate threshold value of dish, the reading rate threshold value that current process reads described disk is updated to the numerical value after increasing, and improves current Process reads the reading rate of described disk, and then improves the work efficiency of current process.Such as, the duty of current device is Time busy, in step S203, disk is read speed-limiting device 1 and current process is read the reading rate threshold value of described disk by 60MB/s Being decreased to 55MB/s, current process reads the reading rate threshold value of described disk and changes to 55MB/s so that current process reads institute The reading rate maximum stating disk is less than 55MB/s, alleviates the operating load of described disk, prevents current device from card occur; When the duty of current device is idle, current process is read the reading rate threshold value of described disk by 60MB/s improve to 62MB/s, current process reads the reading rate threshold value of described disk and changes to 62MB/s, improves the utilization of resources of current device Rate.

Here, in step s 201, disk is read speed-limiting device 1 and is spaced at predetermined time intervals, and for example, 1s just obtains once The reading percentage ratio of disk in current device, in step S202, disk is read speed-limiting device 1 and is judged according to the reading percentage ratio of this disk The duty of current device is idle or busy, and in step S203, disk reads speed-limiting device 1 according to described duty Determining that needing to increase or reduce current process reads the reading rate threshold value of described disk, in step S203, limit read by disk The current process that adjusts speed variator 1 reads during the reading rate threshold value of described disk fast with the reading of the disk after adjacent last renewal Accordingly increase based on degree threshold value or reduce.Dynamically adjust the reading rate of disk, use current device body user Test to utilize with machine resources and carry out Intelligent adjustment between the two, on the machine that disk performance is poor, will not be because of current process Upper transmitting file and cause machine card to pause, on the preferable machine of disk performance, system resource can be made full use of.

Here, in step S203, speed-limiting device 1 read by disk can be increased or decreased current process reading with a fixed value Take the reading rate threshold value of described disk, it is also possible to current process is increased or decreased with different values every time and reads described disk Reading rate threshold value.

Preferably, if the duty of described current device is busy, in step S203, disk read speed-limiting device 1 with First predetermined value reduces the reading rate threshold value of described disk;If the duty of described current device is idle, in step In S203, disk is read speed-limiting device 1 and is increased the reading rate threshold value of described disk with the second predetermined value;Wherein, described first pre- Fixed number value is arranged according to type and the performance of described disk with the second predetermined value.Specifically, described first predetermined value and Two predetermined values directly can be arranged according to type and the performance requirement of described disk by user, it is also possible to sets in the following way Put: read percentage threshold or second according to above-mentioned first and read the situation of percentage threshold, determine that current process reads described magnetic The reading rate threshold value of dish needs the numerical values recited reducing or increasing, and such as, current device duty is busy, and currently The disk of equipment read percentage ratio when deducting difference that the first reading percentage threshold obtains more than or equal to 5%, current device exists The hidden danger such as card, described current process reads the reading rate threshold value of described disk to be needed to deduct bigger numerical value, such as 8MB/s, The reading rate making current device read described disk quickly reduces, it is ensured that described disk properly functioning, if described difference Less than 5%, current process reads the reading rate threshold value of described disk can deduct less numerical value, such as, 2MB/s;Currently set Standby duty is idle, and the difference that the described second reading percentage ratio reading the disk that percentage threshold deducts current device obtains When value is more than or equal to 6%, current device task is few, and resource utilization is the highest, and described current process reads the reading speed of described disk Degree threshold value needs to increase bigger numerical value, such as, 5MB/s so that current device reads the speed of described disk and quickly improves, to the greatest extent The fast resource utilization improving current device, if described second reads the reading percentage that percentage threshold deducts the disk of current device Than the difference obtained less than 6%, current process reads the reading rate threshold value of described disk can increase less numerical value, such as, 1MB/s。

Here, need to reduce the reading rate threshold value of described disk, i.e. with the first predetermined value whenever speed-limiting device 1 read by disk Reduce the reading rate threshold value of described disk;Need to increase the reading rate threshold value of described disk whenever speed-limiting device 1 read by disk, i.e. with Second predetermined value increases the reading rate threshold value of described disk.Such as, read speed-limiting device 1 when disk and judge current device work shape State is idle, and disk is read speed-limiting device 1 and increased the reading rate threshold value of described disk with the second predetermined value;Subsequently, when every pre- Fixing time interval, for example, 1s, disk is read speed-limiting device 1 and is again obtained the reading percentage ratio of disk in current device, and disk is read to limit Speed variator 1 is according to the reading percentage ratio of this disk, it is judged that the duty of current device is still idle, then speed-limiting device read by disk The 1 reading rate threshold value again increasing described disk with the second predetermined value.

Illustrate that this disk is read speed-limiting device 1 and dynamically adjusted the current process described disk of reading with a concrete formula below The process of reading rate threshold value.

Herein it is assumed that current " disk reading percentage ratio " is parameter cdrp;" disk reading percentage ratio " when machine IO is busy is Parameter xdrp, i.e. the first reading percentage threshold is parameter xdrp;" disk reading percentage ratio " during machine IO free time is parameter Ndrp, i.e. the second reading percentage threshold is parameter ndrp;The reading rate threshold value of current process reading disk is parameter drst.When During this process initialization, drst=N (unit: MB/s is set)

Disk is read speed-limiting device 1 and is spaced at predetermined time intervals, obtains the reading of disk in the current device performing current process Percentage ratio, such as, carried out once " disk reading percentage ratio " numerical sample, and checks according to equation below every 1 second:

Wherein delta1 and delta2 is two numerical value of regulation process disk reading rate, and delta1 is the first predetermined number Value, delta2 is the second predetermined value, and its unit is MB/s.

Here, according to the type of disk and performance, or in conjunction with empirical value, such as, N=60MB/s, xdrp=are set 90%, ndrp=70%, delta1=5MB/s, delta2=1MB/s.

Preferably, the method also includes step S204 (not shown) and step S205 (not shown).In step S204, when When front operation process initializes, disk reads speed-limiting device 1 according to the type of described disk and performance, arranges described disk Reading rate threshold value;In step S205, disk is read speed-limiting device 1 dynamic calculation and monitors the reading rate of described disk, it is ensured that institute State the reading rate of disk less than or equal to described reading rate threshold value.

Equipment currently runs process when initializing, and in step S204, disk reads speed-limiting device 1 according to described disk Type and performance, the reading rate threshold value of described disk is set.Specifically, when reopening equipment and currently running process, or When person reinstalls described current operation program or current operation program carries out program renewal, in step S204, disk Read speed-limiting device 1 according to the type of disk and performance, the initial read threshold speed of described disk, for example, 60MB/s are set, make When obtaining the reading rate threshold value that disk reading speed-limiting device 1 dynamically adjusts the current process described disk of reading, with this initial read speed threshold Value, for example, 60MB/s, based on threshold value progressively adjust.The type of wherein said disk is for example: solid magnetic disc, machinery Disk or hybrid magnetic disc etc., the performance of disk for example: the reading percentage ratio of disk, I/O number per second, handling capacity, average I/O number According to size, service time, I/O waiting list length, waiting time, average seek time etc..

In step S205, disk is read speed-limiting device 1 dynamic calculation and monitors the reading rate of described disk, it is ensured that work as advance Journey reads the reading rate of described disk less than or equal to described reading rate threshold value.Specifically, in step S205, speed limit dress read by disk Put 1 interval calculation monitor the reading rate of described disk at predetermined time intervals, it is ensured that current process reads the reading speed of described disk Less than described reading rate threshold value when degree is maximum, it is achieved the reading rate threshold value reading described disk by controlling current process is adjusted Whole current process reads the reading rate of most disk.

Below by way of a specific embodiment, above-mentioned disk is read speed-limiting device 1 to be described in detail:

First disk file is read in current device internal memory by the client upload data procedures of Baidu's cloud disk, then It being sent to server by the operating system networking component of current device again, parameter once is set in advance: 1) process brings into operation Time, current process reads the reading rate initial threshold of described disk, such as 60MB/s;2) disk read speed-limiting device 1 every one second Clock just obtains the most described current process and reads the reading rate threshold value of described disk;3) described first reads percentage threshold for example, 90%, described second reads percentage threshold for example, 70%;4) the first predetermined value is 5MB/s, and the second predetermined value is 1MB/ s.When starting Baidu cloud disk client and uploading data, the process corresponding with Baidu cloud disk client brings into operation, and limit read by disk Speed variator 1 obtains the reading percentage ratio A of the disk of current device by disk real-time performance monitoring module, then by described disk Read percentage ratio respectively with first read percentage threshold, 90%, and second read percentage threshold, 70%, compare, when disk read Speed-limiting device 1 is judged when A is more than or equal to 90%, and now the duty of equipment is busy, and disk reads speed-limiting device 1 by described The reading rate initial threshold of disk reduces 5MB/s, becomes the reading rate threshold value of the disk after updating to 55MB/s;When limit read by disk Speed variator 1 is judged when A is less than or equal to 70%, and now the duty of equipment is idle, and disk reads speed-limiting device 1 by described magnetic The reading rate initial threshold of dish increases 1MB/s, becomes reading rate threshold value 61MB/s of the disk after updating;Speed-limiting device read by disk 1 every one second, just obtained the reading percentage ratio of disk in a current device, and the speed-limiting device 1 reading according to this disk read by disk Percentage ratio judges that the duty of current device is idle or busy, and disk is read speed-limiting device 1 and come according to described duty Determining that needing to increase or reduce current process reads the reading rate threshold value of described disk, disk is read speed-limiting device 1 and is adjusted currently Process read the reading rate threshold value of described disk be by adjacent last update after disk reading rate threshold value based on enter Row accordingly increases or reduces, and dynamically adjusts the reading rate of disk, uses current device to experience and machine resources profit user With carrying out Intelligent adjustment between the two.Such as, read speed-limiting device 1 at above-mentioned disk the reading rate threshold value of disk to be reduced to After 55MB/s, in 1 second, the reading percentage ratio A that speed-limiting device 1 obtains the disk of current device again read by disk, then will The reading percentage ratio of described disk respectively with first read percentage threshold, 90%, and second read percentage threshold, 70%, compare Relatively, when disk reading speed-limiting device 1 judges that A is more than or equal to 90%, now the duty of equipment is busy, and speed limit read by disk The reading rate threshold value of described disk is reduced 5MB/s by device 1 again, becomes the reading rate threshold value of the disk after updating to 50MB/ s;When disk reading speed-limiting device 1 judges that A is less than or equal to 70%, now the duty of equipment is idle, and speed limit read by disk The reading rate threshold value of described disk is increased 1MB/s by device 1, becomes reading rate threshold value 56MB/s of the disk after updating.

It should be noted that the present invention can be carried out in the assembly of hardware at software and/or software, such as, this Each bright device can use special IC (ASIC) or any other similar hardware device to realize.An embodiment In, the software program of the present invention can perform to realize steps described above or function by processor.Similarly, the present invention Software program (including the data structure being correlated with) can be stored in computer readable recording medium storing program for performing, such as, and RAM memory, Magnetically or optically driver or floppy disc and similar devices.It addition, some steps of the present invention or function can employ hardware to realize, example As, perform the circuit of each step or function as coordinating with processor.

It is obvious to a person skilled in the art that the invention is not restricted to the details of above-mentioned one exemplary embodiment, Er Qie In the case of the spirit or essential attributes of the present invention, it is possible to realize the present invention in other specific forms.Therefore, no matter From the point of view of which point, all should regard embodiment as exemplary, and be nonrestrictive, the scope of the present invention is by appended power Profit requires rather than described above limits, it is intended that all by fall in the implication of equivalency and scope of claim Change is included in the present invention.Should not be considered as limiting involved claim by any reference in claim.This Outward, it is clear that " including ", a word was not excluded for other unit or step, and odd number is not excluded for plural number.In system claims, statement is multiple Unit or device can also be realized by software or hardware by a unit or device.The first, the second word such as grade is used for table Show title, and be not offered as any specific order.

Claims (12)

1. the method that speed limit read by disk, wherein, the method comprises the following steps:
It is spaced to schedule, obtains the reading percentage ratio of disk in the current device performing current process;
Percentage ratio of reading according to described disk judges the duty of described current device;
According to the duty of described current device, dynamically adjust current process and read the reading rate threshold value of described disk.
Method the most according to claim 1, wherein, the described reading percentage ratio according to described disk judges described current device The step of duty include:
When the reading percentage ratio of described disk is more than or equal to the first reading percentage threshold, it is judged that the duty of described current device is Busy;
When the reading percentage ratio of described disk is less than or equal to the second reading percentage threshold, it is judged that the duty of described current device is Idle.
Method the most according to claim 2, wherein, the described duty according to described current device, dynamically adjust and work as The step of the reading rate threshold value that front process reads described disk includes:
If the duty of described current device is busy, reduce the reading rate threshold value of described disk;
If the duty of described current device is idle, increase the reading rate threshold value of described disk.
Method the most according to claim 3, wherein, the described duty according to described current device, dynamically adjust and work as The step of the reading rate threshold value that front process reads described disk includes:
If the duty of described current device is busy, reduce the reading rate threshold value of described disk with the first predetermined value;
If the duty of described current device is idle, increase the reading rate threshold value of described disk with the second predetermined value;
Wherein, described first predetermined value and the second predetermined value are arranged according to type and the performance of described disk.
Method the most according to any one of claim 1 to 4, wherein, the method also includes:
When described current process initializes, according to type and the performance of described disk, the reading rate threshold of described disk is set Value.
Method the most according to any one of claim 1 to 5, wherein, the method also includes:
Dynamic calculation also monitors the reading rate of described disk, it is ensured that the reading rate of described disk is less than or equal to described reading rate threshold Value.
7. a speed-limiting device read by disk, and wherein, this disk is read speed-limiting device and included:
For being spaced to schedule, obtain the device reading percentage ratio of disk in the current device performing current process;
The device of the duty of described current device is judged for the reading percentage ratio according to described disk;
For the duty according to described current device, dynamically adjust the reading rate threshold value of the current process described disk of reading Device.
Speed-limiting device read by disk the most according to claim 7, wherein, described sentences for the reading percentage ratio according to described disk The device of the duty of disconnected described current device is used for:
When the reading percentage ratio of described disk is more than or equal to the first reading percentage threshold, it is judged that the duty of described current device is Busy;
When the reading percentage ratio of described disk is less than or equal to the second reading percentage threshold, it is judged that the duty of described current device is Idle.
Speed-limiting device read by disk the most according to claim 8, wherein, described for the work shape according to described current device State, the device dynamically adjusting the reading rate threshold value that current process reads described disk is used for:
If the duty of described current device is busy, reduce the reading rate threshold value of described disk;
If the duty of described current device is idle, increase the reading rate threshold value of described disk.
Speed-limiting device read by disk the most according to claim 9, wherein, described for the work according to described current device State, the device dynamically adjusting the reading rate threshold value that current process reads described disk is used for:
If the duty of described current device is busy, reduce the reading rate threshold value of described disk with the first predetermined value;
If the duty of described current device is idle, increase the reading rate threshold value of described disk with the second predetermined value;
Wherein, described first predetermined value and the second predetermined value are arranged according to type and the performance of described disk.
11. read speed-limiting device according to the disk according to any one of claim 7 to 10, and wherein, this disk reads speed-limiting device also Including:
When described current process initializes, according to type and the performance of described disk, the reading speed of described disk is set The device of degree threshold value.
12. read speed-limiting device according to the disk according to any one of claim 7 to 11, and wherein, this disk reads speed-limiting device also Including:
For dynamic calculation the reading rate of monitoring described disk, it is ensured that the reading rate of described disk is less than or equal to described reading rate The device of threshold value.
CN201610509871.5A 2016-06-30 Method and device for limiting speed of disk reading CN106155931B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610509871.5A CN106155931B (en) 2016-06-30 Method and device for limiting speed of disk reading

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610509871.5A CN106155931B (en) 2016-06-30 Method and device for limiting speed of disk reading

Publications (2)

Publication Number Publication Date
CN106155931A true CN106155931A (en) 2016-11-23
CN106155931B CN106155931B (en) 2020-07-07

Family

ID=

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106648472A (en) * 2016-12-30 2017-05-10 郑州云海信息技术有限公司 Disk performance optimizing method based on linux operation system and system thereof
CN107329886A (en) * 2017-07-21 2017-11-07 郑州云海信息技术有限公司 The computational methods and device of a kind of disk busy extent
CN107544755A (en) * 2017-08-02 2018-01-05 新华三云计算技术有限公司 The control method and device of a kind of reading and writing data

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6061197A (en) * 1996-11-25 2000-05-09 Seagate Technology, Inc. Adaptive control of a write inhibit signal in a disk drive based on adaptive track pitch
CN1313559A (en) * 2000-03-09 2001-09-19 国际商业机器公司 Power supply control in data process system according to use of CPU
CN1352422A (en) * 2000-11-15 2002-06-05 熊文 Safe automatic speed regualtion computer system and method
US20090003158A1 (en) * 2007-06-26 2009-01-01 Quanta Storage Inc. Writing method for optical disk drive
CN101719372A (en) * 2009-12-02 2010-06-02 成都市华为赛门铁克科技有限公司 Disk protection method, device and system
CN102096556A (en) * 2010-12-03 2011-06-15 成都市华为赛门铁克科技有限公司 Method for copying data as well as method, device and system for reading data
CN104598159A (en) * 2013-10-30 2015-05-06 鸿富锦精密电子(天津)有限公司 Automatic hard disk rotating speed control system and method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6061197A (en) * 1996-11-25 2000-05-09 Seagate Technology, Inc. Adaptive control of a write inhibit signal in a disk drive based on adaptive track pitch
CN1313559A (en) * 2000-03-09 2001-09-19 国际商业机器公司 Power supply control in data process system according to use of CPU
CN1352422A (en) * 2000-11-15 2002-06-05 熊文 Safe automatic speed regualtion computer system and method
US20090003158A1 (en) * 2007-06-26 2009-01-01 Quanta Storage Inc. Writing method for optical disk drive
CN101719372A (en) * 2009-12-02 2010-06-02 成都市华为赛门铁克科技有限公司 Disk protection method, device and system
CN102096556A (en) * 2010-12-03 2011-06-15 成都市华为赛门铁克科技有限公司 Method for copying data as well as method, device and system for reading data
CN104598159A (en) * 2013-10-30 2015-05-06 鸿富锦精密电子(天津)有限公司 Automatic hard disk rotating speed control system and method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106648472A (en) * 2016-12-30 2017-05-10 郑州云海信息技术有限公司 Disk performance optimizing method based on linux operation system and system thereof
CN106648472B (en) * 2016-12-30 2020-04-03 郑州云海信息技术有限公司 Linux operating system-based disk performance optimization method and system
CN107329886A (en) * 2017-07-21 2017-11-07 郑州云海信息技术有限公司 The computational methods and device of a kind of disk busy extent
CN107544755A (en) * 2017-08-02 2018-01-05 新华三云计算技术有限公司 The control method and device of a kind of reading and writing data

Similar Documents

Publication Publication Date Title
US9983903B2 (en) Parallel execution of parsed query based on a concurrency level
US9965309B2 (en) Virtual machine placement
TWI591542B (en) Cloud compute node,method and system,and computer readable medium
CN106104484B (en) Resource management based on device-specific or user-specific resource usage profiles
US9811384B2 (en) Dynamic data partitioning for optimal resource utilization in a parallel data processing system
EP3137965B1 (en) Cpu/gpu dcvs co-optimization for reducing power consumption in graphics frame processing
US8775630B2 (en) Execution allocation cost assessment for computing systems and environments including elastic computing systems and environments
US10311108B2 (en) Cloud-based file prefetching on electronic devices
US9684542B2 (en) Smart cloud workload balancer
US9292068B2 (en) Controlling a turbo mode frequency of a processor
US9298512B2 (en) Client placement in a computer network system using dynamic weight assignments on resource utilization metrics
US9396010B2 (en) Optimization of packet processing by delaying a processor from entering an idle state
Cho et al. Natjam: Design and evaluation of eviction policies for supporting priorities and deadlines in mapreduce clusters
US8910153B2 (en) Managing virtualized accelerators using admission control, load balancing and scheduling
US20140289382A1 (en) Utilizing version vectors across server and client changes to determine device usage by type, app, and time of day
CN102111337B (en) Method and system for task scheduling
US8954487B2 (en) Management server and method for providing cloud computing service
US8789050B2 (en) Systems and methods for transparently optimizing workloads
EP2698711B1 (en) Method for dispatching central processing unit of hotspot domain virtual machine and virtual machine system
Qi et al. Research on mobile cloud computing: Review, trend and perspectives
US20160103717A1 (en) Autoscaling applications in shared cloud resources
US20150046829A1 (en) Application Notifications
AU2016277719A1 (en) Scaling a virtual machine instance
US20140082202A1 (en) Method and Apparatus for Integration of Virtual Cluster and Virtual Cluster System
JP2016511862A (en) Storage network data allocation

Legal Events

Date Code Title Description
PB01 Publication
C06 Publication
SE01 Entry into force of request for substantive examination
C10 Entry into substantive examination
GR01 Patent grant