A kind of performance measurement data acquisition method of inlaid distribution system
Technical field
The present invention relates to a kind of inlaid distribution system performance measurement data acquisition method, belong to communication field.
Background technology
At communication field, inlaid distribution system particularly, performance data is the foundation of reflection system business amount, operation flow success rate, it also is an important indicator of evaluation system reliability and stability, the fault that occurs in the navigation system also plays important effect simultaneously, thereby it is just essential in system every performance index to be measured statistics.A kind of good collecting method is particularly important, because the collection meeting of performance measurement affects to the whole service system.Because performance index are from each business module, and business module may be distributed in master processor and from processor, thereby performance measurement comprises master processor and respectively from the data collection of processor business module with report.The performance measurement data acquisition method of inlaid distribution system is so at present:
1, the performance measurement module is provided with cycle collection timer T2 on the master processor, and it is slow to offer the uniformity energy measurement
Dash the district, business module is write unified performance measurement buffering area on the master processor; Respectively from the beginning from processor
Just carry out the counting of each counter.
2, after master processor is received the performance measurement order on backstage, be provided with and report timer T3 to the backstage (T3 is
The integral multiple of T2), and in that T2 is overtime report order (to comprise to respectively sending performance measurement from processor
Tested tabulation), reset timer T2.
3, respectively receive that from processor performance measurement reports order after, be unit with the measurand, according to measure tabulation to
Master processor reduction into possession measurand one by one measurement result, and to the counter O reset from processor,
Begin the rolling counters forward of following one-period.
4, receive respectively after the replying of processor when master processor, the record result, and when T2 is overtime, send once more
Measuring command begins the data acquisition of following one-period to corresponding respectively from processor.
5, overtime as T3, the performance measurement module reports the sampled result of T3 in the time to the backstage on the master processor.
6, after performance measurement module on the master processor receives that the measurement on backstage is ceased and desisted order, kill timer T3,
And remove and measure tabulation.
There is following shortcoming in said method under the situation of high traffic:
1, greatly reduces the stability of a system.This is mainly reflected on the transfer of data of processor and master processor
(communication of principal and subordinate's processor can by T net or Ethernet), such as if measuring object is the sub-district, each from
The processor maximum can be handled 80 sub-districts, is furnished with 48 altogether from processor (maximum traffic situation), by
In sending simultaneously by master processor, cause respectively several from processor from the unification of processor measurement data reporting message
Reported data at one time, master processor will receive 80 * 48=3840 at every turn continuously like this
Message (being measurement data).Concerning the very high master processor of burden requirement, the short time handles so many
Data certainly will be to make the matter worse, and cause system crash.
2, reduce Business Processing speed.An important feature under the embedded environment is in real time, and speed is the user
The unusual problem of Guan Xining, thereby respectively play from the processing speed of the processor speed to whole distributed system
Conclusive effect.It is by the business from processor that present performance measurement from processor reports work
The reason module is finished, when measuring object is a lot of, certainly will reduce respectively from the processor traffic handing capacity,
Thereby influence the speed of distributed system.
3, transmission reliability is poor.Under big professional situation, even not collapse of master processor, frequent gives out a contract for a project also
Can make in the transmission course very easily packet loss, make data (comprising business datum) that master processor receives no
Reliably.
Summary of the invention
The present invention proposes a kind of performance measurement data acquisition method of inlaid distribution system, overcome the shortcoming that influences the stability of a system in the prior art, solve exist in the prior art influence Business Processing speed and the insecure problem of measurement data.
The performance measurement data acquisition method of inlaid distribution system of the present invention comprises following treatment step:
The first step: principal and subordinate's processor initialization; Master processor is offered unified buffer area, and the measurement count on the beginning master processor, directly writes unified buffer memory; Increase measurement data from processor and report process, and begin measurement count from the processor, this process priority is low.
Second step: master processor begins statistics and to send acquisition from processor;
The 3rd step: send from processor collecting performance data and group bag;
The 4th step: master processor backs up this cycle image data.Periodic recording timer T2 on master processor is overtime, master processor minute book cycle data collection result (comprise master processor business module collection result and from the processor reported result), and will unify the buffering area zero clearing, begin the counting of next measuring period;
The 5th the step: if master processor on report timer T3 overtime to the backstage, then master processor carries out sending to the backstage after the statistical computation to T3/T2 the sampled result of T3 in the cycle, forwarded for second step again to, otherwise directly forwarded for second step (promptly repeat second and third, four steps) to.
The 6th step: when master processor receives that the backstage stops measuring command, empty corresponding measurement tabulation, and gather timer T1, periodic recording timer T2 and to backstage report cycle T3, no longer carry out measurement data acquisition work the removing cycle.
Wherein second step comprised the following steps:
(1) measurement count of business module on the beginning master processor.Because it is straight during each Counter Value of statistics
Connect and write unified buffering area, do not need special message trigger.
(2) master processor is provided with cycle collection timer T1 and periodic recording timer T2
(T1<T2)。
(3) the performance measurement module is received measuring command (the performance measurement tabulation bag on backstage on the master processor
Contain the object to be measured that will collect) after, begin to be provided with to the backstage and report timer T3 (T3
Be the T2 integral multiple).
(4) overtime as cycle collection timer T1, the performance measurement module is according to measurement on the master processor
Tabulation reports order to corresponding from processor transmission measurement data, has between many orders and prolongs
The time t1.
Wherein the 3rd step comprised the following steps:
(1) business process is added up counter separately from the processor.
(2) report process to collect the measurement data of measurand from the processor measurement.
(3) report process to back up this periodicity certificate from the processor measurement, and begin the system of following one-period
Meter.
(4) report process according to measuring tabulation, each measurand data from the processor measurement data
The restriction of big or small and affiliated master processor and network communication packet size is surveyed backup
The amount data qualification is formed a bag with a plurality of measurands.
(5) report process to send from the processor measurement data and respectively wrap data to master processor, bag and bag
Between certain time-delay t2 is arranged.
(6) master processor performance measurement module is returned an acknowledge message after receiving packet, from the processor root
Put the successful bitmap of reception according to acknowledge message.
(7) after reporting process to send all packets of organizing, the processor measurement data establishes a repeating transmission
Timer T4.
(8) retransmission timer T4 is overtime, then according to receiving successful bitmap (being the affirmation message of every bag)
Whether decision retransmits once corresponding bag.
T1, T2, T3 are the timer on the master processor, and T4 is the timer from the processor.Above-mentioned the 3rd step must be in that (finish in T2-T1-t1 * n) second, wherein n be the number from processor, thereby requirement (t2 * maximum possible bag number) * 2+T4+t1 * n<(T2-T1).In addition, to some fundamental measurement items that need not the backstage measuring command, performance measurement method and said method are similar, and just master processor performance measurement module sends measuring command to what all had a business datum from processor, rather than according to measuring task list.
Use method of the present invention, following advantage arranged:
1, reduced from the processor performance measurement to the influence of other business modules.Increased by one from processor
Process, priority is lower, is specifically designed to reporting of measurement data, thereby has reduced from processor professional
The burden of reason module has improved from the processor traffic handing capacity, helps improving the industry of distributed system
Affair speed.
2, improved the stability of system.Use method of the present invention, subpackage send significantly reduced from processor with
The message count of master processor, time-delay sends and has alleviated from processor and master processor communication between each message bag
Burden, (buffer time of T2-T1-t1 * n) has also alleviated except that having reduced transmission frequency greatly
The burden of master processor, these are a significant benefit to the stability of raising system.
3, improved reliability of data transmission.By the retransmission mechanism of message authentication, significantly reduced because transmission
Packet loss and make the incorrect probability of measurement data has improved the transmission reliability and the authenticity of measurement data.
4, adopt the method for the invention, compared with prior art, improved inlaid distribution system stability,
Reliability of data transmission has reduced the influence to other business modules.
Description of drawings
Fig. 1 is that performance measurement is realized schematic diagram.
Fig. 2 is performance measurement data realization flow figure.
Fig. 3 is the decomposition to " master processor begin statistics and to send acquisition from processor " among Fig. 2.
Fig. 4 is the decomposition that " sends from processor image data and group bag " among Fig. 2.
Embodiment
Be described in further detail below in conjunction with the enforcement of accompanying drawing technical scheme:
As Fig. 1, comprise performance measurement module and other business modules on the master processor, buffering area is opened in the unification of do as one likes energy measurement module on the master processor, and other business modules are responsible for rolling counters forward, and directly write unified buffering area.After master processor performance measurement module is received the measuring command on backstage, timer T1 is overtime then to report process according to measuring tabulation transmission measuring command to corresponding performance measurement from processor if the cycle on the master processor gathers, from processor in that (T2-T1-t1 * n) finishes in the time that the measurement data packing sends (parlor has time-delay t2) and to the zero clearing of measurement counter from processor, then replying decision and whether send out for the second time according to master processor.Performance counter from the processor is by other business module statistics that adds up, and reports process only to be responsible for the zero clearing of packing, transmission and the counter of measurement result from the performance measurement of processor; After periodic recording timer T2 on the master processor is overtime, the count results that master processor record adds up from the measurement result returned from processor and other modules of master processor, the unified buffering of zero clearing is laid equal stress on and is established timer T1 and T2, begins the counting of following one-period.When reporting timer T3 overtime to the backstage, master processor performance measurement module is simply calculated the measurement result in he in T3/T2 sampling period in addition and is sent to the backstage, and the backstage generates the form of section sometime according to reported result again.
With reference to figure 2,3,4, system's power-up initializing at first, master processor is offered uniformity energy measurement buffering area, and need to begin the adding up of counter of master processor statistics, increase measurement data and report process from the processor back that powers on, each business module begins counter and adds up simultaneously; After the measurement task is built on the backstage, send the performance measurement master processor of tabulating, and comprise value (T3 is the integral multiple of T1) to backstage report cycle T3; After master processor performance measurement module was received the measuring command on backstage, the cycle that is provided with gathered timer T1, periodic recording timer T2 and reports timer T3 to the backstage; Overtime as T1, master processor sends acquisition and reports process to corresponding measurement data from processor, and time-delay t1 is arranged between many orders, to stagger the different times from the processor reported data as far as possible; After respectively reporting process to receive acquisition from the processor measurement data, according to the restriction of measuring tabulation, the size of each measurand data, affiliated master processor and Netcom's news packet size, the measurement data of a plurality of measurands is formed a bag, simultaneously with all counters of zero clearing, send then and respectively wrap master processor, send at interval between bag and the bag, be t2 blanking time; Return an acknowledge message after the every reception of the master processor performance measurement module one bag data, notice from processor should the bag Data Receiving whether success; Report process to distribute behind time all packets from the processor measurement data and establish a retransmission timer T4; Retransmission timer T4 is overtime, report process whether corresponding bag to be retransmitted from the processor measurement data according to receiving successful bitmap (being the affirmation message of every bag) decision, from receiving acquisition to end of retransmission, whole process must be at (T2-T1-t1 * n) finish in the time from processor.T2 is overtime when the periodic recording timer, and this periodicity of master processor performance measurement module records, is laid equal stress on and established timer T2 and T1 all counter O resets according to collection result, begins the counting of next measuring period; T1 is overtime once more when cycle collection timer, then sends measuring command once more to from processor, repeats said process; When overtime to backstage report cycle T3, master processor then carries out simple computation to T3/T2 the sampled result of T3 in the cycle and sends to the backstage; If master processor performance measurement module is received the performance measurement the finish command on backstage, then empty corresponding measurement tabulation, and remove to backstage report cycle T3, performance measurement reports process to finish.
For example:
Because entire method relates to the value of some parameters, the parameter value of performance measurement collecting method in implementation procedure is illustrated in the gprs system for example.
Performance measurement collecting method in the gprs system: gprs system is an inlaid distribution system, master processor is the foreground, from processor is all category-A veneers and category-B veneer, suppose multipotency 48 category-A veneers of configuration and 16 category-B veneers, a category-A veneer can dispose 80 sub-districts at most, measurand is the sub-district, each sub-district contains 80 counters on the category-A veneer, each counter size is 4Byte, category-A veneer and foreground communication data packets size are restricted to less than 1400Byte, each cell measurement size of data is 80 * 4Byte=320Byte, 4 sub-districts can be formed a bag according to our method like this and send, every bag size is 4 * 320Byte=1280Byte<1400Byte.If a category-A veneer is furnished with 80 sub-districts, then need report 80/4=20 bag.Can establish:
Foreground periodic sampling timer T1=270 second
Foreground periodic recording timer T2=300 second
AM/BAM synchro timer T3=900 second
Master processor is sent to respectively the measuring command time interval t1=8 millisecond from processor
From processor (category-A veneer) retransmission timer T4=4 second
From processor (category-A veneer) t2=400 millisecond blanking time of giving out a contract for a project
Wherein: (400 milliseconds * 20) * 2+4 second+8 millisecond * (48+16)=20.32 second<(T2-T1)=30 second can guarantee that the category-A veneer finished measurement data and report work in 30 seconds.The foreground is provided with timer T1 (270 seconds), T2 (300 seconds) and T3 (900 seconds) simultaneously after receiving the performance measurement acquisition on backstage, the interval with t1 when timer T1 (270 seconds) is overtime reports process to send the measurement acquisition to the measurement data of all category-A veneers; After measurement data reports process to receive the measurement acquisition, size (if being 320byte), affiliated master processor (supposing to belong to same master processor) and the big or small restriction (less than 1400byte) of Netcom's news bag according to each measured object data bag, carrying out the group bag of measurement data (as above describes, can organize 20 bags), and with the counter O reset on the category-A veneer so that the statistics of following one-period, interval with t2 (400 milliseconds) sends the bag that all are organized to the foreground then, and establishes timer T4 (4 seconds); The foreground receives whenever that a bag just returns and replys (being set to merit position bitmap) accordingly that the T4 of category-A veneer (4 seconds) is overtime, then according to success position bitmap, retransmits not receiving the bag of replying, and no longer establishes timer T4 after the repeating transmission; Unified buffering is directly write after receiving the data of category-A veneer in the foreground, and when T2 (300 seconds) is overtime, and with the data backup in the unified buffering, and zero clearing unifies buffering area, resets timer T1 and T2; The foreground is carried out simple computation with the record result of 3 times (900 seconds/300 seconds=3) and is sent to the backstage when T3 is overtime, lay equal stress on and establish timer T3.