TWI411268B - Sending speed controlling method for multi-cast packages - Google Patents

Sending speed controlling method for multi-cast packages Download PDF

Info

Publication number
TWI411268B
TWI411268B TW99140665A TW99140665A TWI411268B TW I411268 B TWI411268 B TW I411268B TW 99140665 A TW99140665 A TW 99140665A TW 99140665 A TW99140665 A TW 99140665A TW I411268 B TWI411268 B TW I411268B
Authority
TW
Taiwan
Prior art keywords
time
multicast packet
error
transmission
accumulated
Prior art date
Application number
TW99140665A
Other languages
Chinese (zh)
Other versions
TW201223200A (en
Inventor
lian cheng Li
Chih Feng Chen
Original Assignee
Inventec Corp
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 Inventec Corp filed Critical Inventec Corp
Priority to TW99140665A priority Critical patent/TWI411268B/en
Publication of TW201223200A publication Critical patent/TW201223200A/en
Application granted granted Critical
Publication of TWI411268B publication Critical patent/TWI411268B/en

Links

Abstract

A controlling method for sending speed of multi-cast packages includes the steps below. A standard time is computed, and an accumulative error time is recorded. One of the multi-cast packages is sent, and a sending time of the sent multi-cast package is computed. A difference value of the standard time and the sending time is computed as a current error time; and the accumulative error time and the current error time is summed up and recorded as a prediction sleep time. When the prediction sleep time is greater than an error threshold, executes the steps of sleeping in the prediction sleep time; waking up from the sleep and computing a real sleep time, and subtracting the real sleep time from the prediction sleep time as the new one of the accumulative error time. Then go back to the first step of the controlling method to send the next multi-cast package.

Description

Multicast packet transmission speed control method

The invention relates to a transmission speed control method for a multicast packet, in particular to a transmission speed control method for a high-precision multicast packet.

Controlling the transmission speed is an important issue in the field related to the transmission technology of network packets. The network data transmission speed is calculated as the ratio of the data transmission amount to the transmission time. Currently, Microsoft's Windows (Windows) system uses the Sleep function to control the speed at which network packets are sent. The delay function does not occupy system resources during the delay, but its accuracy is too low, only about milliseconds. And the error when the delay function is actually implemented is generally 10 milliseconds, so it is not suitable for applications that require high speed and stable transmission speed.

The Windows system also provides a precision counter that can be synchronized with the machine clock, which is accurate to the nanosecond (ns) level. However, the method of using this counter for delay requires the system to frequently count and confirm whether the delay time is reached, and seriously occupy the central processor unit (CPU) resources, thereby affecting the operation of other software and systems.

That is to say, in the transmission speed control of conventionally transmitting a network packet such as a multi-cast, there is a problem that the delay precision is too low and the fluctuation of the transmission speed is likely to occur, or there is a disadvantage that the CPU resource is required to be extremely expensive. .

In order to solve the above problem, there is provided a multicast speed control method for a multi-cast package for causing a network interface card (NIC) to transmit a plurality of multicast packets at a target speed. The sending speed control method of the multicast packet includes: calculating a standard time according to the size of the multicast packet and the target speed, and recording a cumulative error time; transmitting one of the multicast packets, and calculating a sending time of the sent multicast packet; Calculate the difference between the standard time and the transmission time, record the difference between the standard time and the transmission time as a current error time, total the accumulated error time and the current error time, and record the total result for a predetermined sleep time; When the sleep time is greater than an error threshold, the following steps are performed: sleeping a predetermined sleep time; awakening from sleep, and calculating an actual sleep time; and calculating a new accumulated error time to be a predetermined sleep time minus an actual sleep time; Go to the above "calculate the standard time based on the size of the multicast packet and the target speed, and record the accumulated error time" to send the next multicast packet.

In the step of “calculating a standard time according to the size of the multicast packet and the target speed, and recording a cumulative error time”, the method may further include: establishing an accumulated transmission time. Before the step of "sending one of the multicast packets and calculating a transmission time of the transmitted multicast packet", the processing method of the multicast packet may further include: calculating an accumulated transmission time; and when the cumulative transmission time is greater than one accumulation When the time threshold is exceeded, the accumulated error time and the accumulated transmission time are reset to zero.

According to an embodiment, the sending speed control method of the multicast packet may further include: when the predetermined sleep time is not greater than an error threshold, the predetermined sleep time is to be determined. As a new cumulative error time. The sending time may be obtained by subtracting a system time before and after the sending of the multicast packet.

Further, the above accumulated time threshold may be 1 second (s). The error threshold can be 1 millisecond (ms). The actual sleep time can be greater than 10 milliseconds.

In summary, the transmission speed control method of the multicast packet utilizes a delay function originally low precision to implement high-precision transmission rate control of the multicast packet. By instantaneously feeding back the accumulated error time to the delay function and periodically clearing it, the transmission speed control method of the multicast packet can ensure the efficient and stable network data transmission without occupying too much central processor unit (CPU). ) Resources.

The detailed features and advantages of the present invention are set forth in the Detailed Description of the Detailed Description of the <RTIgt; </ RTI> <RTIgt; </ RTI> </ RTI> </ RTI> <RTIgt; The objects and advantages associated with the present invention can be readily understood by those skilled in the art.

The present invention relates to a multicast speed control method for a multi-cast package for causing a network interface card (NIC) to transmit a plurality of multicast packets at a target speed.

Please refer to FIG. 1 , which is a flowchart of a method for controlling the transmission rate of a multicast packet according to an embodiment.

The transmission rate control method of the multicast packet first calculates a standard time according to the size of the multicast packet to be transmitted and the target speed, and records an accumulated error time (step S110). The standard time is the size of the multicast packet divided by the quotient of the target speed. The network card is then actually sent a multicast packet at the target speed, and a transmission time of the transmitted multicast packet is calculated (step S120).

The sending time may be obtained by subtracting a system time before and after the sending of the multicast packet. In more detail, the system time maintained by the computer including the network card can be read before and after the multicast packet is sent, and the time before and after the transmission can be subtracted to obtain the transmission time of actually transmitting the multicast packet.

Then, the difference between the standard time and the transmission time is calculated, and the difference between the standard time and the transmission time is recorded as the error time; the accumulated error time is combined with the current error time, and the total result is recorded as a predetermined sleep time (step S130). ). That is, the cumulative error time is fed back to the predetermined sleep time in step S130 to more sensitively react and adjust the transmission speed.

After the predetermined sleep time is obtained, it is determined whether the predetermined sleep time is greater than an error threshold (step S140). According to an embodiment, the error threshold may be 1 millisecond (ms). The error threshold can accurately grasp the accuracy of the control of the transmission speed, and can be set according to the actual need to send the multicast packet, and is not limited herein.

When the predetermined sleep time is greater than the error threshold, the network card is caused to sleep for a predetermined sleep time, wherein the predetermined sleep time is the sum of the accumulated error time plus the current error time (step S160). In step S160, for example, Windows (Windows) can be accessed. The application program interface (API) is implemented by the system's delay function. In contrast, when the predetermined sleep time is not greater than the error threshold, the predetermined sleep time may be taken as the new accumulated error time (step S150).

It can be seen from steps S150 and S160 that the transmission rate control method of the multicast packet preserves the current error time generated by each delay instead of discarding. The error time is immediately fed back to the next delay control, and the error can be dynamically compensated, thereby reducing the delay error and improving the control precision. In addition, since such an error compensation mechanism is utilized, even an error caused by reducing the measurement time can be effectively compensated.

The network card wakes up from sleep after sleeping for a predetermined sleep time, and calculates an actual sleep time (step S170). Similarly, the system time before and after the network card is hibernated can be subtracted to obtain the actual sleep time. Since the measurable accuracy of the Sleep function is greater than 10 milliseconds, the actual sleep time will generally be greater than 10 milliseconds.

The transmission rate control method of the multicast packet then calculates the difference between the predetermined sleep time minus the actual sleep time, and subtracts the difference between the predetermined sleep time and the actual sleep time as the new accumulated error time (step S180). And after transmitting one multicast packet, it is judged whether all the multicast packets have been transmitted (step S190). If yes, the control can be ended. If not, the process returns to step S110 to transmit the next multicast packet.

It should be noted that the above-mentioned "error threshold" and "actual sleep time" are The values exemplified by the "accumulated time threshold" can be set according to the actual need to send the multicast packet, and are not limited herein. By adjusting these values, you can set the range of dynamic error compensation and how quickly you can return to the target set speed.

Please refer to "FIG. 2", which is a partial flow chart of a transmission speed control method of a multicast packet of another embodiment. In this embodiment, an accumulated transmission time can also be established at step S110. And the following may be performed to reset the accumulated error time before actually transmitting the multicast packet (step S120).

The cumulative transmission time is calculated before each transmission of the multicast packet (step S210); that is, the time when the accumulated transmission time is established or reset to 0 to how long has elapsed. Next, it is judged whether the transmission time is greater than an accumulated time threshold (step S220); when it is greater than the accumulated time threshold, the accumulated error time and the accumulated transmission time are reset to 0 (step S230).

According to an embodiment, the cumulative error threshold may be 1 second (s). The cumulative error threshold can also be set according to the actual need to send the multicast packet, and is not limited herein. Since the accumulated error time is reset to 0 at intervals, it is possible to ensure that the accumulated error time is subjected to dynamic error compensation for a short period of time.

Please refer to "3", which is a graph of the transmission speed of an embodiment. It can be seen from a transmission speed curve 20 of "Fig. 3" that the network card has just started to activate the configuration of the environment, and cannot quickly transmit the multicast packet. But then in order to instantly transmit the accumulated multicast packets, it becomes completely unnecessary to execute the delay function, and how fast can be transmitted to reach the transmission speed of the network card. limit. However, in order to adjust the transmission speed too fast, the transmission rate control method of the multicast packet quickly returns the transmission speed to the target speed through the accumulated error time.

In summary, the transmission speed control method of the multicast packet immediately feeds back the accumulated error time to the delay function and periodically empties it. Therefore, the transmission speed control method of the multicast packet can ensure efficient and stable network data transmission without occupying excessive central processor unit (CPU) resources. In other words, the transmission rate control method of the multicast packet can achieve the effects of low resource utilization and high-precision control at the same time. Furthermore, the method can ensure that the multicast data can be transmitted at a high speed and stably, and the possibility of network data transmission errors is reduced.

The above detailed description of the preferred embodiments of the present invention is intended to provide a further understanding of the scope of the invention. On the contrary, the intention is to cover various modifications and equivalent arrangements within the scope of the invention as claimed.

20‧‧‧Send speed curve

1 is a flow chart showing a method of controlling a transmission rate of a multicast packet of an embodiment.

2 is a partial flow chart of a transmission rate control method of a multicast packet of another embodiment.

Figure 3 is a graph of the transmission speed of an embodiment.

Claims (7)

  1. A method for controlling a transmission rate of a multicast packet is used to enable a network card to send a plurality of multicast packets at a target speed. The method for controlling the transmission speed of the multicast packet includes: according to the size of the multicast packets and the target Calculating a standard time for speed, and recording a cumulative error time; transmitting one of the multicast packets, and calculating a transmission time of the transmitted multicast packet; calculating a difference between the standard time and the transmission time, the standard The difference between the time and the transmission time is recorded as a current error time, the accumulated error time is totaled with the current error time, and the total result is recorded as a predetermined sleep time; when the predetermined sleep time is greater than an error threshold Performing the following steps: sleeping the predetermined sleep time; waking up from sleep, and calculating an actual sleep time; and calculating the predetermined sleep time minus the difference of the actual sleep time, and subtracting the predetermined sleep time from the actual The difference of the sleep time is taken as the new accumulated error time; and back to the above according to the size of the multicast packets and the target speed Calculating a standard time, and a step of recording the accumulated error over time to transmit the next multicast packet.
  2. The method for controlling the transmission rate of the multicast packet according to Item 1, wherein the step of "calculating a standard time according to the size of the multicast packets and the target speed and recording an accumulated error time" is included. And the method further includes: establishing an accumulated sending time; and before the step of “sending the one of the multicast packets and calculating a sending time of the sent multicast packet”, the processing method of the multicast packet further includes: The cumulative transmission time is calculated; and when the accumulated transmission time is greater than an accumulated time threshold, the accumulated error time and the accumulated transmission time are reset to zero.
  3. The method for controlling a transmission rate of a multicast packet according to claim 2, wherein the accumulated time threshold is 1 second.
  4. The method for controlling a transmission rate of a multicast packet according to claim 1, wherein the error threshold is 1 millisecond.
  5. The method for controlling the transmission rate of the multicast packet according to claim 1, further comprising: when the predetermined sleep time is not greater than the error threshold, the predetermined sleep time is taken as the new accumulated error time.
  6. The method for controlling a transmission rate of a multicast packet according to claim 1, wherein the transmission time is obtained by subtracting a system time before and after transmitting the transmitted multicast packet.
  7. The method for controlling a transmission rate of a multicast packet according to claim 1, wherein the actual sleep time is greater than 10 milliseconds.
TW99140665A 2010-11-24 2010-11-24 Sending speed controlling method for multi-cast packages TWI411268B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW99140665A TWI411268B (en) 2010-11-24 2010-11-24 Sending speed controlling method for multi-cast packages

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW99140665A TWI411268B (en) 2010-11-24 2010-11-24 Sending speed controlling method for multi-cast packages

Publications (2)

Publication Number Publication Date
TW201223200A TW201223200A (en) 2012-06-01
TWI411268B true TWI411268B (en) 2013-10-01

Family

ID=46725432

Family Applications (1)

Application Number Title Priority Date Filing Date
TW99140665A TWI411268B (en) 2010-11-24 2010-11-24 Sending speed controlling method for multi-cast packages

Country Status (1)

Country Link
TW (1) TWI411268B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7130668B2 (en) * 2003-09-01 2006-10-31 Samsung Electronics Co., Ltd. Method and system for controlling sleep mode in broadband wireless access communication system
US7219171B2 (en) * 2003-12-16 2007-05-15 Intel Corporation Flow control for digital signal processing to support data stream operations
US20070248118A1 (en) * 2006-04-19 2007-10-25 Nafea Bishara Adaptive Speed Control for MAC-PHY Interfaces
US20090325533A1 (en) * 2008-06-27 2009-12-31 Abhijit Lele Method for using an adaptive waiting time threshold estimation for power saving in sleep mode of an electronic device
TW201004436A (en) * 2008-07-11 2010-01-16 Ind Tech Res Inst A method for forming a device power savings class, a mobile station for wirelee communication and wireless communication
TW201019747A (en) * 2008-09-15 2010-05-16 Qualcomm Inc Methods and apparatus for optimizing idle mode stand-by time in a multicast system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7130668B2 (en) * 2003-09-01 2006-10-31 Samsung Electronics Co., Ltd. Method and system for controlling sleep mode in broadband wireless access communication system
US7219171B2 (en) * 2003-12-16 2007-05-15 Intel Corporation Flow control for digital signal processing to support data stream operations
US20070248118A1 (en) * 2006-04-19 2007-10-25 Nafea Bishara Adaptive Speed Control for MAC-PHY Interfaces
US20090325533A1 (en) * 2008-06-27 2009-12-31 Abhijit Lele Method for using an adaptive waiting time threshold estimation for power saving in sleep mode of an electronic device
TW201004436A (en) * 2008-07-11 2010-01-16 Ind Tech Res Inst A method for forming a device power savings class, a mobile station for wirelee communication and wireless communication
TW201019747A (en) * 2008-09-15 2010-05-16 Qualcomm Inc Methods and apparatus for optimizing idle mode stand-by time in a multicast system

Also Published As

Publication number Publication date
TW201223200A (en) 2012-06-01

Similar Documents

Publication Publication Date Title
US8141051B2 (en) Methods and apparatus to collect runtime trace data associated with application performance
KR101711456B1 (en) System and method for improving access to search results
Golestani et al. A class of end-to-end congestion control algorithms for the Internet
JP2011233158A (en) Optimization of power usage by factoring processor architecture event to pcu
Cassandras et al. Perturbation analysis and optimization of stochastic hybrid systems
TWI439850B (en) Electronic device and platform management method
US8887171B2 (en) Mechanisms to avoid inefficient core hopping and provide hardware assisted low-power state selection
US20100287394A1 (en) North-bridge to south-bridge protocol for placing processor in low power state
Horvath et al. Dynamic voltage scaling in multitier web servers with end-to-end delay control
US20030231542A1 (en) Power governor for dynamic ram
US20020143998A1 (en) Method and apparatus for high accuracy distributed time synchronization using processor tick counters
Nolte et al. Probabilistic worst-case response-time analysis for the controller area network
US8347197B2 (en) Terminal device, time adjusting method of terminal device and communication system
US7415561B2 (en) Computer for dynamically determining interrupt delay
JP4909384B2 (en) Managing protocol stack timing
AU2012336597B2 (en) System and method for controlling temperature in mobile device
Fetzer et al. On the possibility of consensus in asynchronous systems with finite average response times
US20040123008A1 (en) Method, system, and article of manufacture for adjusting interrupt levels
CN1953351B (en) Method and apparatus for adaptive control of data transmission
US20160286415A1 (en) Tail optimization protocol for cellular radio resource allocation
US8527794B2 (en) Realtime power management of integrated circuits
US7698418B2 (en) Monitoring system
Mittal et al. TIMELY: RTT-based Congestion Control for the Datacenter
EP1834500A1 (en) Method of measuring a distance between two radio-communication devices and device adapted to implement one such method
US20100189206A1 (en) Precise Clock Synchronization

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees