Summary of the invention
The invention provides a kind of high-performance domain name mapping disposal route and device, in order to improve the real-time of resolving daily record write storage device.
The invention provides a kind of high-performance domain name mapping disposal route, comprising:
Resolve daily record according to history and produce frequency, determine that described parsing daily record produces frequency and whether is greater than predetermined threshold value;
If it is be greater than predetermined threshold value that described parsing daily record produces frequency, then enable buffer zone;
If it is be less than or equal to predetermined threshold value that described parsing daily record produces frequency, then close described buffer zone.
Further, described according to history parsing daily record generation frequency, before determining whether described parsing daily record generation frequency is greater than predetermined threshold value, also comprise:
Input and output I/O transmission performance according to system determines described predetermined threshold value.
Further, the described input and output I/O transmission performance according to system determines described predetermined threshold value, comprising:
By the mode of positive test, obtain the I/O transmission performance of system;
I/O transmission performance according to system determines described predetermined threshold value.
Further, described according to history parsing daily record generation frequency, before determining whether described parsing daily record generation frequency is greater than predetermined threshold value, also comprise:
Resolved the rise time of daily record by twice, determine that described history is resolved daily record and produced frequency.
The invention provides a kind of high-performance domain name mapping treating apparatus, comprising:
Judge module, produces frequency for resolving daily record according to history, determines that described parsing daily record produces frequency and whether is greater than predetermined threshold value;
Processing module, if producing frequency for described parsing daily record is be greater than predetermined threshold value, then enables buffer zone; If it is be less than or equal to predetermined threshold value that described parsing daily record produces frequency, then close described buffer zone.
Further, described device also comprises:
Determination module, determines described predetermined threshold value for the input and output I/O transmission performance according to system.
Further, described determination module specifically comprises:
Acquiring unit, for the mode by positive test, obtains the I/O transmission performance of system;
Determining unit, determines described predetermined threshold value for the input and output I/O transmission performance according to system.
Further, described device also comprises:
Computing module, for being resolved the rise time of daily record by twice, determines that described history is resolved daily record and produced frequency.
High-performance domain name mapping disposal route provided by the invention and device, frequency is produced by resolving daily record according to history, judge that described parsing daily record produces frequency and whether is greater than predetermined threshold value, if be greater than predetermined threshold value, then enable buffer zone, otherwise, close buffer zone, namely resolve under daily record produces the high state of frequency and open buffer zone, resolve daily record and produce the low state closedown buffer zone of frequency, directly will resolve daily record write storage device, therefore, the real-time switch buffer zone of frequency can be produced according to resolving daily record, improve the real-time of resolving daily record write storage device.
Embodiment
For making the object of the embodiment of the present invention, technical scheme and advantage clearly, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
Fig. 1 is the process flow diagram of high-performance domain name mapping disposal route embodiment one provided by the invention; As shown in Figure 1, the method comprises:
Step 101: resolve daily record according to history and produce frequency, determines that described parsing daily record produces frequency and whether is greater than predetermined threshold value.
Concrete, history is resolved daily record generation frequency and such as can be obtained as follows: record is the last produces the moment t resolving daily record1, and moment t1the last moment t producing parsing daily record before2, produce the time period t of resolving daily record by these two moment1-t2judge the generation frequency of resolving daily record, here can be understood as the generating rate of resolving daily record, judge whether this generating rate is greater than predetermined threshold value, a predetermined threshold value initially given empirical value herein, as 1000, can think that resolving daily record generating rate is greater than 1000, be then generating at a high speed to resolve daily record, be less than 1000 for low speed generation stl status.If judged result is greater than predetermined threshold value, then perform step 102, otherwise perform step 103.
Step 102: if it is be greater than predetermined threshold value that described parsing daily record produces frequency, then enable buffer zone.
Concrete, if the generating rate of resolving daily record is greater than predetermined threshold value, as being greater than 1000, can think it is now generate at a high speed the state of resolving daily record, need to open buffer zone, first resolve daily record by many and deposit buffer zone one by one, and then batch write storage device, with the I/O transmission performance of matching system, prevent the loss of resolving daily record, above-mentioned memory device can be hard disk etc.
Step 103: if it is be less than or equal to predetermined threshold value that described parsing daily record produces frequency, then close described buffer zone.
Concrete, if the generating rate of resolving daily record is less than or equal to predetermined threshold value, as being less than or equal to 1000, can think that the generated frequency of now resolving daily record is not high, the I/O transmission performance of system determines now system and can process these parsing daily records in time, do not need to resolve daily record by many and first put into buffer zone, then batch write storage device.
The high-performance domain name mapping disposal route of the present embodiment, frequency is produced by resolving daily record according to history, judge that described parsing daily record produces frequency and whether is greater than predetermined threshold value, if be greater than predetermined threshold value, then enable buffer zone, otherwise, close buffer zone, namely resolve under daily record produces the high state of frequency and open buffer zone, resolve daily record and produce the low state closedown buffer zone of frequency, directly will resolve daily record write storage device, therefore, the real-time switch buffer zone of frequency can be produced according to resolving daily record, improve the real-time of resolving daily record write storage device.
Further, described according to history parsing daily record generation frequency, before determining whether described parsing daily record generation frequency is greater than predetermined threshold value, also comprise: the input and output I/O transmission performance according to system determines described predetermined threshold value.
Concrete, this predetermined threshold value is set as a critical value close to system performance.System performance herein refers to the input and output I/O transmission performance of system.Because when the I/O transmission pressure of system is less, do not reach the limit of system I/O transmission performance, therefore IO can't become bottleneck in low-pressure situation, and the mode of closing buffer zone can make daily record real-time reach best.Predetermined threshold value is set to close to I/O transmission performance boundary, means when pressure is comparatively large, when IO becomes bottleneck, need to break through this limit, so fast mode can during this time be activated, namely open buffer zone.Predetermined threshold value can not be set as system I/O transmission performance boundary, must leave redundancy.Reason is if predetermined threshold value setting is too high, may, because source of error still cannot cross predetermined threshold value, cause continuing to use low-speed mode, and fast mode may cannot be triggered always when pressure is very large.Set certain redundancy, then can ensure in the low-speed mode, still there will be the generating rate that is enough to surmount the parsing daily record of predetermined threshold value.Here high speed, low speed refer to the height of resolving daily record generating rate, and fast mode and low-speed mode refer to the pattern of enabling buffering and closing buffer zone respectively.
Further, the described input and output I/O transmission performance according to system determines described predetermined threshold value, comprising:
By the mode of positive test, obtain the I/O transmission performance of system;
I/O transmission performance according to system determines described predetermined threshold value.
Concrete, positive test detailed process is:
1) temporally test process is divided into 64 sections, the switching of different mode is carried out between section and section, and parsing daily record generating rate situation (test of every section all can add up request number, and then calculates generating rate) is on last stage checked when the new stage.Such as, first stage can force low-speed mode, and it can continue a given time, and is switched to fast mode after this time terminates;
2) when being switched to another pattern, need to calculate the generating rate in a upper stage, and make some reactions, specific rules is:
When switching to fast mode, check the test result of last low-speed mode, if the generating rate in low-speed mode process exceedes predetermined threshold value, here initial setting up predetermined threshold value, can be such as 1000, exceed predetermined threshold value certain proportion, such as, exceed 10% of predetermined threshold value, then whole test terminates immediately, and replaces current predetermined threshold value with the generating rate in now low speed process; Whether the object of this test predetermined threshold value can be improved to analyze, and mates actual performance.
When switching to low-speed mode, needing the test result checking last fast mode, if its generating rate exceedes predetermined threshold value (about 10%), then recording this situation.Can the test of a low-speed mode and a fast mode be divided into one group, 32 groups of such tests are needed altogether at most and these 32 times tests must all meet such condition: assumed stress is constant, use low-speed mode, generating rate is below certain numerical value of specifying, and after opening fast mode, generating rate raises, and exceedes above-mentioned numerical value of specifying.More than 1 test why is needed to be because the result of one group of test is not sufficient to describe the problem, because whether be because pressure just also lowers when can not determine that speed is fallen in the low-speed mode.So we by 64 times totally 32 groups of tests verify.Like this, occur that the probability that pressure changes with switching continuously can be 1/ (2^64), almost can ignore; If by 32 groups of tests, discovery generating rate produces Changing Pattern above with switching, thinks the limit having searched out system I/O transmission performance.
Negative testing detailed process is:
When there is the inquiry of low-speed mode of some continuously, starting another kind of test, may 32 groups be carried out equally at most.During test starting, be introduced into fast mode, and then switch.Once find the predetermined threshold value that speed in the low-speed mode exceeds positive test above and determines, then return immediately.The object done like this is the redundancy between the fixed predetermined threshold value of detection and real system I/O transmission performance boundary.By 32 groups of tests, the generating rate of all 32 fast modes all exceedes predetermined threshold value, and low-speed mode generating rate does not all exceed predetermined threshold value, thinks that the predetermined threshold value of setting is too high, reaches actual I/O transmission performance boundary.Therefore need predetermined threshold value to lower, such as, can be adjusted downward to current 90%.Negative testing refers to that whether the predetermined threshold value that analysis verification sets is higher, whether should reduce the process of this predetermined threshold value.
Fig. 2 is the cycle tests satisfied condition in high-performance domain name mapping disposal route provided by the invention; Fig. 3 is the cycle tests do not satisfied condition in high-performance domain name mapping disposal route provided by the invention.As shown in Figure 2, dotted line represents the current system I/O transmission performance boundary value determined, if in continuous print 32 tests, low-speed mode generating rate value all below system I/O transmission performance boundary value and fast mode generating rate value all above system I/O transmission performance boundary value, prove that the system I/O transmission performance boundary value now found out is correct, otherwise, the test result do not satisfied condition as shown in Figure 3, some low-speed mode generating rate values above the current system I/O transmission performance boundary found out or the fast mode generating rate value had below the current system I/O transmission performance boundary found out, these situations all do not satisfy condition, prove that the current system I/O transmission performance boundary value found out is incorrect.
Further, describedly resolve daily record according to history and produce frequency, determine that described parsing daily record produces before whether frequency be greater than predetermined threshold value, also comprise: the rise time of being resolved daily record by twice, determine that described history is resolved daily record and produced frequency.
Concrete, the above-mentioned method determining history parsing daily record generation frequency is that the rise time of being resolved daily record by twice is calculated, such as, and the moment t of the last generation parsing of record daily record1, and moment t1the last moment t producing parsing daily record before2, produce the time period t of resolving daily record by these two moment1-t2, judge the generation frequency of resolving daily record, and then judge whether exceeded predetermined threshold value, if produce frequency to have exceeded predetermined threshold value, then buffer zone switch opens, enables buffer zone, otherwise closes buffer zone if producing frequency.
Fig. 4 is the structural representation of high-performance domain name mapping treating apparatus embodiment one provided by the invention, as shown in Figure 4, comprising:
Judge module 21, produces frequency for resolving daily record according to history, determines that described parsing daily record produces frequency and whether is greater than predetermined threshold value;
Processing module 22, if producing frequency for described parsing daily record is be greater than predetermined threshold value, then enables buffer zone; If it is be less than or equal to predetermined threshold value that described parsing daily record produces frequency, then close described buffer zone.
The high-performance domain name mapping treating apparatus of the present embodiment, judge module produces frequency by resolving daily record according to history, judge that described parsing daily record produces frequency and whether is greater than predetermined threshold value, if be greater than predetermined threshold value, then enable buffer zone, otherwise, close buffer zone, namely resolve under daily record produces the high state of frequency and open buffer zone, resolve daily record and produce the low state closedown buffer zone of frequency, directly will resolve daily record write storage device, therefore, the real-time switch buffer zone of frequency can be produced according to resolving daily record, improve the real-time of resolving daily record write storage device.
Fig. 5 is the structural representation of high-performance domain name mapping treating apparatus embodiment two provided by the invention, and as shown in Figure 5, this device also comprises:
Determination module 23, determines described predetermined threshold value for the input and output I/O transmission performance according to system.
Fig. 6 is the structural representation of high-performance domain name mapping treating apparatus embodiment three provided by the invention, and as shown in Figure 6, this determination module 23 specifically comprises:
Acquiring unit 231, for the mode by positive test, obtains the I/O transmission performance of system;
Determining unit 232, determines described predetermined threshold value for the input and output I/O transmission performance according to system.
Fig. 7 is the structural representation of high-performance domain name mapping treating apparatus embodiment four provided by the invention, as shown in Figure 7,
Computing module 24, for being resolved the rise time of daily record by twice, determines that described history is resolved daily record and produced frequency.
One of ordinary skill in the art will appreciate that: all or part of step realizing above-mentioned each embodiment of the method can have been come by the hardware that programmed instruction is relevant.Aforesaid program can be stored in a computer read/write memory medium.This program, when performing, performs the step comprising above-mentioned each embodiment of the method; And aforesaid storage medium comprises: ROM, RAM, magnetic disc or CD etc. various can be program code stored medium.
Last it is noted that above each embodiment is only in order to illustrate technical scheme of the present invention, be not intended to limit; Although with reference to foregoing embodiments to invention has been detailed description, those of ordinary skill in the art is to be understood that: it still can be modified to the technical scheme described in foregoing embodiments, or carries out equivalent replacement to wherein some or all of technical characteristic; And these amendments or replacement, do not make the essence of appropriate technical solution depart from the scope of various embodiments of the present invention technical scheme.