5. Simulation of Packet Based Smoothing Algorithm
5.2 Performance of Packet Mapped Smoothing Algorithm
In this section, we see the examples of Packet Mapped smoothing algorithm and compare its performance.
First, this algorithm finds the modified upper bound and lower bound in amount of data form by the same way described in previous section 5.1. Then it performs MVBA with the modified upper bound and lower bound to find the optimum transmission schedule of MVBA. After the optimum transmission schedule is calculated, the procedure will find the packet number at each frame slot, until which the cumulative sum of the packet data is nearest to the optimum transmission schedule generated by
MVBA, obeying to the principles described in section 4.2.1. Fig. 33 and Fig. 34 are the examples of the transmission schedule of the 150th to 180th frame of “Aladdin” under condition of
mina b,
s generated by MVBA and Packet Mapped Smoothing algorithm with 32K bits client buffer and 1024 bits and 2048 bits maximum packet size respectively. Similarly, Fig. 35 and Fig. 36 are the examples of the transmission schedule of the 690th to 720th frame of “Aladdin” under condition of
maxa b,
s generated by MVBA and Packet Mapped Smoothing algorithm with 32K bits client buffer and 1024 bits and 2048 bits maximum packet size respectively.
Figure 33: Transmission schedule generated by MVBA and by Packet Mapped Smoothing algorithm with 32K bits client buffer and 1024 bits maximum packet size
Figure 34: Transmission schedule generated by MVBA and by Packet Mapped Smoothing algorithm with 32K bits client buffer and 2048 bits maximum packet size under
mina b,
s condition. Where the solid line represents the transmission schedule of MVBA, and the dash line represents the packet mapped transmission schedule.
Figure 35: Transmission schedule generated by MVBA and by Packet Mapped Smoothing algorithm with 32K bits client buffer and 1024 bits maximum packet size under
maxa b,
s condition. Where the solid line represents the transmission schedule of MVBA, and the dash line represents the packet mapped transmission schedule.
Figure 36: Transmission schedule generated by MVBA and by Packet Mapped Smoothing algorithm with 32K bits client buffer and 2048 bits maximum packet size under
maxa b,
s condition. Where the solid line represents the transmission schedule of MVBA, and the dash line represents the packet mapped transmission schedule.
Then, the amount of cumulative data until the corresponding packet number at each frame slot is the actual transmission schedule of Packet Mapped Smoothing Algorithm. According to the above four figures, from Fig. 33 to Fig. 36, it’s apparent that the large maximum packet size will induce more error between transmission schedules of MVBA and of Packet Mapped smoothing algorithm.
The following Fig. 37 and Fig. 38 are the transmission rate of MVBA and of
Packet Mapped smoothing algorithm of the first 1000 frame of “Aladdin” with 32K bits client buffer and 1024 bits and 2048 bits maximum packet size respectively. Similarly, Fig. 39 and Fig. 40 are the transmission rate of MVBA and of packet smoothing algorithm of total video “Aladdin” with 100K bits client buffer and 1024 bits and 2048 bits maximum packet size respectively. Fig. 41 and Fig. 42 are the transmission rate of MVBA and of packet smoothing algorithm of total video “Aladdin” with 1M bits client buffer and 1024 bits and 2048 bits maximum packet size respectively. It’s obvious that the transmission rate of Packet Mapped smoothing algorithm vibrates along the transmission rate of MVBA, and the amplitude of the vibration is about the maximum packet size. Because Packet Mapped smoothing algorithm approximates the transmission schedule to MVBA optimum schedule as near as possible, the maximum difference between real transmission rate and rate of MVBA optimum schedule can only be less than one maximum packet size. Therefore, the larger the maximum packet size is, the larger the variation in rate can be.
Figure 37: The transmission rate of first 1000 frames of “Aladdin” generated by Packet Mapped smoothing algorithm with 32K bits client buffer and 1024 bits maximum packet size. (a) is the transmission rate of MVBA. (b) is the transmission rate of Packet Mapped smoothing algorithm.
Figure 38: The transmission rate of first 1000 frames of “Aladdin” generated by Packet Mapped smoothing algorithm with 32K bits client buffer and 2048 bits maximum packet size. (a) is the transmission rate of MVBA. (b) is the transmission rate of Packet Mapped smoothing algorithm.
Figure 39: The transmission rate of total video of “Aladdin” generated by Packet Mapped smoothing algorithm with 100K bits client buffer and 1024 bits maximum packet size. (a) is the transmission rate of MVBA. (b) is the transmission rate of Packet Mapped smoothing algorithm.
Figure 40: The transmission rate of total video of “Aladdin” generated by Packet Mapped smoothing algorithm with 100K bits client buffer and 2048 bits maximum packet size. (a) is the transmission rate of MVBA. (b) is the transmission rate of Packet Mapped smoothing algorithm.
Figure 41: The transmission rate of the total video “Aladdin” generated by Packet Mapped smoothing algorithm with 1M bits client buffer and 1024 bits maximum packet size. (a) is the transmission rate of MVBA. (b) is the transmission rate of Packet Mapped smoothing algorithm.
Figure 42: The transmission rate of first 1000 frames of “Aladdin” generated by Packet Mapped smoothing algorithm with 1M bits client buffer and 2048 bits maximum packet size. (a) is the transmission rate of MVBA. (b) is the transmission rate of Packet Mapped smoothing algorithm.
According to the above examples, from Fig. 37 to Fig. 42, it shows that the variance in transmission rate is influenced by two factors, the variation in rate of the transmission schedule generated by MVBA and the variation in the succession packet
buffer results in lower variance in transmission rate, and the smaller maximum packet size induces the lower variation in succession packet sizes. Consequently, the performance of transmission schedule generated by Packet Mapped Smoothing algorithm with larger client buffer and smaller maximum packet size is better.
Fig. 43 represents the variance in transmission rate generated by packet mapped smoothing algorithm as a function of client buffer size with different maximum packet sizes. According to Fig. 43, when the maximum packet size is smaller, the variance in transmission will go down as the client buffer size increases. But it is also influenced by the variation in successive packets. The curve with cross mark represents the variance in transmission rate with maximum packet size 512 bits. This curve quite closes to the curve of MVBA which is the curve without mark. As the maximum packet size increases, the ripple of the curve will intensify, and the variance itself will increase because the larger maximum packet size induces more variation in successive packets. When the maximum packet size is 1024 bits and 1536 bits, the difference of variance between packet mapped smoothing algorithm and MVBA is increasing, and the ripple of the curve becomes intensive when the maximum packet size is 2048 bits.
Because when the maximum packet size is too large, the variance caused by the variation of successions packet size may greater than the reduction of variance resulted by the client buffer increasing.
As we mentioned before, the transmission schedule generated by packet mapped smoothing algorithm will vibrate along the MVBA optimum transmission schedule, and the amplitude of vibration equals to maximum packet size. Thus, the curve of peak rate of packet mapped smoothing algorithm is vertically shifted version of curve of MVBA at a distance of maximum packet size. Fig. 44 illustrates this result.
Similarly, the BFF, which is an inverse ration of the peak rate will increase steadily according to the decreasing of peak rate as the client buffer size increases. It is shown in Fig. 45.
Figure 43: This graph illustrates the variance in “Aladdin” transmission rate as a function of client buffer size with different maximum packet sizes.
Figure 44: This graph illustrates the peak rate of “Aladdin” transmission schedule as a function of client buffer size with different maximum packet sizes.
Figure 45: This graph illustrates BFF of “Aladdin” as the function of client buffer size with different maximum packet sizes.
5.3 Analysis of Simulation Result
Number-of-Packet Based Smoothing Algorithm makes the number of packet transmitted at each frame slot steadier. Therefore, when server tries to transmit some data on to the network, the media access contention is steadier, and is easier to management. But the transmission rate will vary as the variation between succession packet sizes. For example, the schedule of a certain time interval of 2 frame slots is that 3 packets each frame slot, and the packet sizes are 1024, 1024,1024,128,128 and 128 respectively. Thus, the transmission rate at this two frame slot are 3072 and 284 respectively. It’s obviously that although the transmitted numbers of packets are the same, the rate may be very different. The mathematical representation of transmission rate is as following:
∈ number. Then Rate equals to the summation of all packet sizes that are transmitted i at ith frame slot. In our video transmission system, each packet sizes can be consider as a random variable, distributed in the interval from 0 to maximum packet size. Thus, the transmission rate of Number-of-Packet Based Smoothing Algorithm is considered as the summation of several random variables. Therefore, the rate variation of each CBR segments can be considered as the variation of the summation of random variables, and the more the packet rate of this CBR segment is, the greater the
considered as a random variable. This random variable is distributed in the interval from 0 to maximum packet size. Therefore, the rate can be represented as following:
= _ _ +
i i i
Rate Rate of MVBA Error
(5-2)
The rate variation of each CBR segments is only resulted by the mapped error.
Therefore, in each CBR segments, the rate variation of Packet mapped Smoothing Algorithm is much smaller than the rate variation of Number-of-Packet Based Smoothing Algorithm.
5.4 Influence of Maximum Packet Sizes
According to the simulation result shown previously, the smaller maximum packet size induces better performance. But smaller maximum packet size also results in more packets. A large amount of packets will increase the collision probability resulted by network media contention. Now we show the relation between the number of packets and maximum packet size.
Fig. 46 is the total number of packets as the function of maximum packet size. (a) is shown in linear format. When maximum packet size is greater than about 2000 bits, the number of packets is almost constant. (b) is shown in logarithmic format. It shows that total number of packets has the exponential relation with maximum packet size.
Fig. 47 is the total number of packets as the function of maximum packet size to mean rate ratio. (a) is shown in linear format. (b) is shown in logarithmic format.
According to the two figures, they show that the four curves are almost the same.
Thus, we predict that the number of packets is inverse ration to the exponent of maximum packet size for all video.
(a)
(a)
(b)
Figure 47: These figures illustrate the total number of packets as the function of maximum packet size to mean rate ratio. (a) is shown in linear format. (b) is shown in logarithmic format.
The following Fig. 48 and Fig. 49 demonstrate the variance of packet size with different maximum packet sizes. Fig. 48 is the variance of all packets, whether it is a full packet or not. Fig. 49 is the variance of the small packets which are not full. These two figures show that when the maximum packet size increase, the variance of packet size also increase.
Figure 48: The variance of all packet size.
Figure 49: The variance of small packet size, which is not full.
Next, we show the variance of rate difference between the MVBA schedule and Packet Mapped smoothing algorithm. The transmission rate of Packet Mapped smoothing algorithm is like the rate of MVBA schedule added a random noise. Fig. 50 shows the variance of this “noise” with different maximum packet sizes.
Figure 50: The variance of rate difference between MVBA schedule and Packet Mapped Smoothing Algorithm.
This figure shows that when the maximum packet size increase, the intensity of the “noise” also increase. The client buffer almost doesn’t influence this noise when the maximum packet size is small. As the maximum packet size increase, the variance is different as the client buffer increasing. It’s hard to find the relationship between maximum packet size and the variation of the variance of “noise”. Compare Fig. 48 and Fig. 49, we can’t find any relation between the two parameters.
5.4 Implementation Result
In this section, we demonstrate the network utilization phenomenon of the video streaming system with and without smoothing algorithm. We insert the Packet Mapped smoothing algorithm into our video streaming algorithm with the method described in Section 4.3, and use the external program, winpcap, to record each packet size and its corresponding transmitted(received) time in server(client). The record method is as following. In the server terminal, when the first packet is send to the network, winpcap will record its size and mark the time as 0. Then when the following packets are transmitted, winpcap will record their size and the time that how long this packet is transmitted later than the departure of the first packet. In the client terminal, the method is similar, when the first packet arrival, winpcap records its size and the arrival time is 0. Then the arrival time of the following packets are the time difference between each packets and the first packet.
We use the video file, cindy.mp4, which is compressed with MPEG4, and the frame rate is 25 frames per second, for experiment. Fig. 51 is the example of the transmission record. The server transmits data according to the schedule generated by Packet Mapped smoothing algorithm with 1024 byte maximum packet size and 128K byte client buffer. Fig. 51(a) is the record transmitted packet in server from 9.9 sec to 10.1 sec. Fig. 51(b) is the record of arrival packet in client. Each stems represent a packet, the position of horizontal axis represents the recorded time, and the length of each stems is the packet sizes. This figure shows that the packet will transmitted group by group with an interval of about 40 ms, and the packet groups will arrival at almost the same time interval.
Figure 51: The record of the packet size and time. (a) is the transmitted packets in server. (b) is the received packets in client.
In Fig. 51, we only can see that each packet groups is transmitted and received in a very short period of about 1 ms. Fig. 52 is the record from 9.941 sec to 9.945 sec.
There is only one packet group in this time interval. The server transmits 8 packets in about 1 ms, the packet interval is about 150 micro sec. The client receives these packets also in about 1 ms, but the packet interval is different to the interval in server.
The transmission network jitter results in this variation. The group position is not the same, because of the error in our experiment. The time recorded in server will be
Figure 52: The record of the packet size and time observed in detail. (a) is the transmitted packets in server. (b) is the received packets in client.
We experiment on different client buffer, different maximum packet size and different transmission distance, and then gather the statistics of the packet interval and group interval to observe what smoothing algorithm can do in video streaming system.
Fig. 53 is the record from the server in NCTU to the client in CCU. The transmission schedule is generated by Packet Mapped smoothing algorithm with 1024 bytes maximum packet size and 128K bytes client buffer. (a) is the record in server, and (b) is the record in client. This record shows that the packet group will arrive in a longer period, the time interval of each packet in a group is with more
variation, and some of the time interval is elongated because the network jitter results in the different transmission delay. We show this phenomenon in detail in Fig. 54, which is the same record in detail.
Fig. 55 and Fig. 56 is the transmission record of an unsmoothed schedule. The server transmits all of the frame data at each corresponding frame slot. We can see that when the server transmits with an unsmoothed schedule, the number of packets in each group is with more variation. The server accesses the network for a longer period, and the network jitter is more critical.
Fig. 57 and Fig. 58 is the transmission record of an unsmoothed schedule and from NCTU to CCU. As we mention above, the server may transmits too many packet in a frame slot and the time interval of each packet may be elongated for long distance transmission. These may result in some packet arrive the client too late to be played on time.
According to the record of time and packet size, we can see that the server with smoothing algorithm can transmit data in a more stable state; the number of packet in each group and the network access time is almost constant. Therefore, even for long distance transmission the network jitter won’t result in critical effect.
Figure 53: The record of the packet size and time form NCTU to CCU. (a) is the transmitted packets in server. (b) is the received packets in client.
Figure 54: The record of the packet size and time form NCTU to CCU in detail. (a) is the transmitted packets in server. (b) is the received packets in client.
Figure 55: The record of the packet size and time with unsmoothed schedule. (a) is the transmitted packets in server. (b) is the received packets in client.
Figure 57: The record of the packet size and time with unsmoothed schedule from NCTU to CCU. (a) is the transmitted packets in server. (b) is the received packets in client.
Figure 58: The record of the packet size and time with unsmoothed schedule from NCTU to CCU in detail. (a) is the transmitted packets in server. (b) is the received packets in client.
Next, we show the histogram of the group interval and packet interval to observe the transmission jitter and network jitter.
Fig. 59 to Fig. 62 are the histograms of group interval. Fig. 59 is with smoothed schedule from NCTU to NCTU, Fig. 60 is with smoothed schedule from NCTU to CCU, Fig. 61 is with unsmoothed schedule form NCTU to NCTU and Fig. 62 is with unsmoothed schedule from NCTU to CCU. In our algorithm, we expect that the server transmits data once every 40 ms. However, these histogram in shows that there are errors of about 5 ms to 8 ms in transmission time. Thus a large part of group interval is about 32 ms and 45 ms. Then, we see the histogram in client will spread at the around the peak in server. For long distance transmission, the spread range is larger. The schedule with or without smoothing won’t influence the transmission jitter for one client.
Figure 60: Histogram of group interval with smoothed schedule form NCTU to CCU.
Figure 61: Histogram of group interval with unsmoothed schedule form NCTU to NCTU
Figure 62: Histogram of group interval with unsmoothed schedule form NCTU to CCU
Fig. 63 to Fig. 66 are the histograms of packet interval. Fig. 63 is with smoothed schedule from NCTU to NCTU, Fig. 64 is with smoothed schedule from NCTU to CCU, Fig. 65 is with unsmoothed schedule form NCTU to NCTU and Fig. 66 is with unsmoothed schedule from NCTU to CCU. According to these histograms, we can
Fig. 63 to Fig. 66 are the histograms of packet interval. Fig. 63 is with smoothed schedule from NCTU to NCTU, Fig. 64 is with smoothed schedule from NCTU to CCU, Fig. 65 is with unsmoothed schedule form NCTU to NCTU and Fig. 66 is with unsmoothed schedule from NCTU to CCU. According to these histograms, we can