Home > Sample essays > UDP Reliability and Performance with RPUDP – Learn Protocol Basics

Essay: UDP Reliability and Performance with RPUDP – Learn Protocol Basics

Essay details and download:

  • Subject area(s): Sample essays
  • Reading time: 14 minutes
  • Price: Free download
  • Published: 1 June 2019*
  • Last Modified: 23 July 2024
  • File format: Text
  • Words: 3,973 (approx)
  • Number of pages: 16 (approx)

Text preview of this essay:

This page of the essay has 3,973 words.



Abstract on potential improvements:

Implementation of a revised UDP protocol called RPUDP (Reliable Performance Based User Datagram Protocol) which aims at the enhancement of UDP reliability and performance. RPUDP will now make UDP available for greater number of applications. We are employing the mechanism of retransmitting the lost packets in order to improve the reliability. Introduction of two additional fields in the UDP header namely acknowledgement number and sequence number along with a timer introduced at the receiver end contribute in minimizing the packet losses and assure considerable in order packet delivery. Such retransmissions may however increase the work load on the network resulting in greater congestion. Therefore, in order to strike a balance between reliability and congestion, RPUDP calculates the throughput of the network. The receiver informs the sender, the throughput of the network and accordingly the sender increases or decreases the transmission rate of the packets. This mechanism ensures that the network bandwidth is properly utilized without overwhelming the network. This way the protocol proposed : RPUDP, enhances the performance of UDP and makes it available for wider range of applications by providing reliability at a rate faster than TCP and also with a structure and mechanism simpler than TCP.

Narasimharaju Govindaraju Raagashree

Shriya Sadana

Vismitha Subba Reddy

I. Protocol Review USER DATAGRAM PROTOCOL

The user datagram protocol (UDP), is an unreliable transport protocol with no sessions or flow control and optional error checking.UDP uses a simple connectionless communication model where it doesn't require a virtual circuit to be established i.e. no handshaking between the hosts before any data transfer occurs. UDP enables process-to-process communication and sends messages, called datagrams. It offers best-effort type of communications i.e. UDP does not guarantee the delivery of packets to the receiver. Packets may arrive at the receiver out of order or not at all. For the purpose of data integrity, UDP provides checksum. UDP uses port numbers for addressing different functionalities at the source and destination host.

PURPOSE OF UDP

UDP is called a "stateless" protocol, as it doesn't provide any acknowledgements to indicate that the packets sent have been received. However, this property makes the operation of UDP faster than TCP and makes it ideal for isochronous applications such as voice over IP (VOIP) and streaming media where error correction is pointless.

In such applications, packet losses are usually not a fatal problem. For applications that require a high degree of reliability, a protocol such as the TCP may be used. In VoIP, the major concerns are the latency and jitter. The use of TCP would cause jitter in case of packets losses TCP retransmits the sent packets and does not transmit the subsequent data to the applications until it receives a packet delivery acknowledgement from the receiving- end. If using UDP the end user applications will not have to provide any necessary handshaking such as acknowledgements that the message sent has been received. Hence high performance is achieved through UDP.

UDP includes two services that are not provided by the IP layer. It provides port numbers to help distinguish different user requests and, also, checksum bits to verify that the data sent has arrived intact. Since there is no error checking in UDP, it also saves bandwidth. [5]

UDP is also suitable for the use in programs that require lossless data transmission when the program is set up to manage retransmission of lost packets and arrange received packets in-order.

WORKING

In each UDP packet the destination IP address and port number are encapsulated and these two numbers are used together to uniquely identify the recipient. It is also used by the underlying operating system to deliver the packet to a specific process.

 UDP has a simple fixed header of 8-bytes. UDP has 16 bit long port number fields and hence the range for port numbers is from 0 to 65535.

1. Source Port : Source Port is 2 Byte long field used to identify port number of source.

2. Destination Port : It is 2 Byte long field, used to identify the port of destined packet.

3. Length : Length is the length of UDP including header and the data. It is 16-bits field.

4. Checksum : Checksum is 2 Bytes long field. It is the 16-bit one’s complement of the sum

of the UDP header. [1]

The UDP checksum provides a statistical information about whether or not the payload was corrupted in transit. It also allows the receiver to verify if it was the correct destination of the packet, because it covers the IP addresses, port numbers, and protocol number, and it also verifies if the received packet is truncated or padded, as it includes the size field. Therefore, it protects an application against receiving corrupted payload data in place of, or in addition to, the data that was sent. [2]

Now, let us see how exactly UDP works at Client and Server side.

Client Side (Sending)-

Generally, the process that uses UDP requires a port number to complete its communication. This port number is assigned by the Operating System (OS) to the process, for a short period of time.

Additionally, an incoming queue and an outgoing queue is assigned to the process.

Messages are sent by the process by putting them in queue in the outgoing queue by using the source port number. UDP then removes the received packet adds a UDP header and sends

it further by inserting a UDP datagram into IP datagram. The port number is mentioned in the datagram.

Client Side (Receiving)-

At the arrival of the message, UDP checks the port number mentioned in the datagram. It then puts the message in the queue if there is a queue created for that process. There are two conditions that could exist-

1. No queue- If there is no queue then the datagram gets dropped and an unreachable message is sent back to the sender.

2. Overflow of the queue- In this case also, the datagram gets dropped and an unreachable message is sent back to the sender.

 Server Side (Receiving)-

A similar operation takes place at the receiving side of the server. After the arrival of the message, UDP checks the port number and sees if there is any queue associated with that port number. If there is queue it puts the message at the end of it. If there is no queue, then the datagram is dropped, and an unreachable message is sent to the sender.

Server Side (Sending)-

The operation here is similar to that occurring at the sending side of the client. A UDP header is attached and then inserted into the datagram. After this the process is sent forward and the OS makes the server wait before sending more messages if the outgoing queue overflows.

PROS

User Datagram Protocol (UDP) is more efficient with respect to latency and bandwidth. It has attributes that make it advantageous for use in applications that have tolerance to packet losses.

• UDP header has just 8 bytes whereas TCP header has 20 bytes. This fewer bytes in the overhead makes UDP protocol need less time in processing the packet and need less memory. This makes the UDP less robust than TCP.

• Since UDP is connectionless, it is faster than TCP as TCP performs handshake before transferring the actual data.

• In case of congestion in the network, UDP is more advantageous over TCP as UDP does not have a mechanism to vary its speed with respect to the network congestion unlike TCP .

• Real time applications like voice and video over IP provides greater efficiency with UDP as there will be no retransmission of lost packets. For example, while watching a 1080 pixels movie, losing a packet or two doesn't make a difference to the quality.

• Protocols that require quick results such as DNS, DHCP uses UDP. For example, when we type www.google.com on our browser, our computer will first find its IP address before sending a GET request to the Google server. This has to happen in no time. Using TCP this might take a while longer which is undesirable.

• UDP supports broadcast but TCP doesn't. [3] CONS

• UDP is Unreliable – UDP extends the best-effort service model of the IP. It does not guarantee the delivery of packets. When a UDP message is sent, it cannot be known if it has reached its destination or is lost along the way. It does not implement the concept of acknowledgment, retransmission, or timeout.

• UDP does not guarantee in-order packet delivery – When the messages are sent to the same recipient, the order of arrival of messages at the recipient, cannot be predicted.

• UDP itself does not avoid congestion. It will rely on the services provided by the application layer to implement congestion control. [3]

APPLICATIONS OF UDP

• It is best suitable for real-time applications with concerns of latency as it allows packets to be dropped and received out-of-order.

• Transaction-based protocols, such as DNS or Network Time Protocol are implemented over UDP.

• It can be used where many clients are connected and where real-time error correction isn't necessary, such as gaming, voice or video conferencing, and streaming media. [1]

• In case of simple request response communication where size of data is less, UDP can be used as there is lesser concern about flow and error control. [1]

• UDP supports packet switching and hence is a suitable protocol for multicasting.

• Routing update protocols like RIP (Routing Information Protocol) are implemented over

UDP .[1]

• Normally used for real time applications which cannot tolerate uneven delays between

sections of a received message.

UDP is used as a transport layer protocol by the following implementations [1] :

• NTP (Network Time Protocol)

• DNS (Domain Name Service)

• BOOTP, DHCP.

• NNP (Network News Protocol)

• Quote of the day protocol

• TFTP, RTSP, RIP, OSPF.

Application layer can perform the following tasks through UDP [1] :

• Trace Route

• Record Route

• Time stamp

II. Critical Research Review

A Dynamic Performance-Based Flow Control Method for High-Speed Data Transfer

A. Title and Background

As the title suggests the main intention of the paper is to provide a reliable way to transfer a large amount of high-speed data. In high-performance applications, the system hardware is incapable of saturating the bandwidths supported by the network infrastructure.[7] Therefore, a high-speed protocol which is adaptive to the performance of each system by including a dynamic performance-based flow control is formulated.

The paper gives a brief introduction about the present protocols used for data transfer followed by solutions provided by TCP and high-speed UDP for drawbacks of high-speed data transfer. After which it provides the goals for high-speed bulk transfer. The citations and references are given for each work described in every section and develop a Performance Adaptive UDP (PA- UDP), which aims to dynamically and autonomously maximize performance under different systems. A mathematical model considering receiving application buffers, kernel buffers and sender data is formulated using which algorithms are proposed for controlling rate and processing packets. Based on these, PA-UDP is implemented with Linux and the results show that it outperforms other existing high-speed protocols in terms of throughput, packet loss, and CPU utilization.[7]

The paper also provides a description of related work and how PA-UDP differs. The comparison is made with the already existing TCP and UDP. As we know, high-bandwidth is required to transport large-scale data to distributed applications. The TCP and UDP do not support these requirements. TCP enhancements and UDP based transport with non-additive increase multiplicative decrease are the two approaches used in transport protocol design.

It shows the changes that has been introduced in TCP to improve its performance for high-speed networks like high-speed TCP low priority is a TCP-LP version with an aggression window increase policy intended for high bandwidth and long distance networks, explicit control protocol(XCP) has a congestion control mechanism for high BDP and requires hardware support in routers, Stream control transmission protocol(SCTP) for robust internet data transport proposed by IETF and few others retain the core algorithms of TCP but adjusts the send or receive buffer sizes for rate control. [7]

Also, User datagram protocols such as UDT, Tsunami, Hurricane, FRTP, and RBUDP have developed various rate control algorithms and are implemented over UDP at the application layer for easy deployment.[7] UDP is more efficient in utilizing the bandwidth than TCP and hence more suitable for dedicated network environments.

After giving the details of previous work it shows that PA-UDP is a reliable UDP based protocol implemented in the application layer and it differentiates itself by intelligent buffer management based on dynamic system profiling taking the impact of network, CPU, and disk into consideration. [7]

 B. Technical Soundness and Clarity in Presentation

 The primary purpose of this paper is to present a protocol, namely PA-UDP [6] that can greatly utilize the bandwidth. There are many high speed reliable UDP protocols like SABUL, Tsunami, RBUDP and Hurricane[6]. The authors present a common structure that is followed by most UDP based protocols. It presents mechanisms like control scheme, packet numbering scheme and negative acknowledgements deployed by most UDP protocols. But all these mechanisms do not consider effects of disk throughput and CPU latency for data transfer applications. They give a good reasoning to use PA-UDP which ensures better CPU performance.

The paper presents data that is feasible and technically correct. They support their protocol using mathematical proofs and simulations. The proposed technical contribution has been substantiated

 by providing mathematical formulas for each level which are receiving application buffers and receiving Kernel buffers. The mathematical model predicts the maximum bandwidth of any systems disk and CPU performance.

It systematically presents the equations for Receiving applications buffers and the throughput that is obtained by many parameters. Then it gives an analysis of the receiving kernel buffers and presents graphs with actual and predicted error rates versus inter packet delay. It also shows a graph between throughput and inter packet delay.

Furthermore, the author introduces the architecture and algorithms that have been used followed by the implementation details of the protocol. It provides an implementation over many factors like data flow and structures, disk activity, retransmission and rate control, latency simulator and memory management.

 C. Novelty and Importance

 The paper presents a protocol which focusses on the CPU utilization. Most of the UDP based protocols do not consider CPU utilization and disk factors. But the authors in this paper present PA-UDP in such way that it takes both these factors into consideration. So, the paper provides a unique type of protocol implementation.

The paper provides a mathematical model that relating buffer sizes to network rates and sending rates to inter packet delay times. If the protocol is effectively utilized, it could bring a notable change to communication networks since the CPU utilization of any system would drastically be affected.

 Comparison of PA-UDP with other UDP based protocols-

Firstly, when we compare PA-UDP with other protocols based on file size PA-UDP gives the best throughput while transferring files of different sizes. But when the file size is relatively small like 2GB, then RBUDP is better[6]. Secondly, based on intra-protocol fairness, that is with two parallel flows PA-UDP gives good intra- protocol fairness but with four parallel connections it declines.[6]

D. Quality of Simulations or Experimental Studies

The paper provides simulation studies according to the architecture and algorithms to describe the theoretical basis behind effective buffer and CPU management in C for use in Linux and Unix environments. The experimental results are found with respect to throughput and packet loss performance, CPU utilization and predicted maxima.[7]

First, a mathematical model is produced relating buffer sizes to network rates and sending rates to interpacket delay times. The equations will be used to predict the theoretical maximum bandwidth of any data transfer given a systems disk and CPU performance characteristics.[7]

Secondly, a generic architecture and algorithms were generated relating to rate control algorithms and processing packets. Further, a real time implementation is presented, and its performance is analyzed and compared to other existing high-speed protocols.

Finally, to verify the effectiveness of our proposed protocol, PA-UDP is implemented according to the architecture. PA-UDP designed is a multithread application designed to be self- configuring with minimal human input. A parametric latency simulator is included to test the effects of high latencies over a low latency Gigabit LAN.[7]

The data flow and data structures for both sender and receiver is shown in Fig. 5 and Fig. 6.

PA-UDP was tested for throughput and packet loss performance over a gigabit ethernet switch on a LAN and compared to three UDP-based protocols: Tsunami, Hurricane, and UDT. PA- UDP’s results were noticed to be excelling at each file size and has virtually zero packet loss due to buffer overflow which is a direct result of the rate control algorithm written in C. Tables below show the experimental results.

When CPU utilization was considering the experimental results show that PA-UDP’s flow control method has less CPU utilization as it limits the transfer speeds to the optimal range for the current hardware profile of the host.

Fig. 7 (a) [7] Percentage CPU utilization per Mbps for three file sizes: 100, 1000, and 10,000 MB. PA-UDP can drive data faster at a consistently lower computational cost. (b) A section of a CPU trace for three transfers of a 10 GB file using PA-UDP, Hurricane, and BBCP. PA-UDP not only incurs the lowest CPU utilization, but it is also the most stable.

The paper provides that PA-UDP is efficient not only for high-speed research networks, but also for reliable high-performance bulk data transfer over dedicated local area networks where congestion and fairness are typically not a concern. But the throughput and packet loss performance are tested with buffer size 750 MB. [7] There is no test given for buffer a different buffer size, either small or large. Secondly, in rate control algorithms a three-way handshake mechanism is proposed where the SYNACK packet asks for a rate. In this case, there is a possibility that the SYNACK packet itself is corrupt or has not been received in order. There is no way to find out if the packet received id corrupt or on time. [7]

III. Potential Improvements

As we know the User Datagram Protocol is a simplest transport layer protocol which involves a minimum amount of communication mechanism. In this protocol, the receiver does not generate an acknowledgment of received packet and this shortcoming makes UDP unreliable. Therefore, optimization to UDP is required mainly for reliability which can be introduced by adding sequence number and acknowledgments.

In order to build reliability, we will be adding 16 bits for sequence number and 16 bits for acknowledgments in our User Datagram Protocol header. This increases the header size of UDP from 8 bytes to 12 bytes which is still less than the Transport Control Protocol header. By adding 16 bits we generate 2^16 i.e. 65536 different sequence and acknowledgment fields in an operating system. The main reason for adding sequence number and ACK field is to get orderly and reliable reception. In our protocol, we implement negative acknowledgments, timers at the receiver end and concept of retransmission.

Another improvement that is necessary is the performance of UDP. As UDP is massively used in the internet protocol suite any method about how to improve performance is likely to increase performances of several applications which include Domain Name System (DNS)[8], Network Time Protocol (NTP)[9]. In order to increase performance, we will implement an intelligent bandwidth scheduling process leading to more accurate throughput and higher link utilization. Hence, we are coming up with a new protocol called RPUDP (Reliable Performance Based User Datagram Protocol) which is focused on reliability and throughput optimization.

Implementation for Reliability

As discussed, we will add two extra fields in the UDP header for sequence number and acknowledgments. In addition to that, timers at receiver side and concept of negative ACK is introduced. For the protocol RPUDP, each packet sent will have a unique sequence number and the receiver will, in turn, get to know the order of the packets and if any packets are missed it will ask for retransmission. When a packet is not received in order the receiver will send a negative ACK and start a timer as soon as a next ordered packet after the missed packet is

received and will wait for 1 RTT for the sender to retransmit the lost packet. If the receiver will not get the lost packet before the lapse of RTT it will again send a negative ACK to the sender and will wait for the packet for another RTT. In the case of duplicate reception of packets, the receiver will just ignore the duplicate packet and continues the process.

To get a clear picture let us take an example, a sender has a sequence of packets numbered from 1 to 10 waiting to be sent. The sender initiates the transfer by sending the packets in order starting with sequence number 1 and then 2 and so on. At the receiver packet 1,2 are received in order and after which packet 4 is received. Now the receiver notices that packet 3 is lost so it will send a negative ACK and starts the timer and will wait for the sender to retransmit packet 3 for 1 RTT. At the same time, the receiver will accept other packets being sent and will ask for retransmission if any packet is lost. This ensures that no packet is being lost on the way to the destination.

Implementation for Higher Throughput with minimal Packet Loss

Fig: RPUDP header

UDP does not provide any throughput guarantees. This eventually leads to packet losses in the network and leads to unreliable data transfer. In our protocol we try to enhance performance by ensuring that the packet loss is minimized and the rate at which the packets must be sent is calculated by simple exchange of acceptance rate between the sender and receiver [10].

Considering a situation where host A sends certain amount of data to Host B. Host B being the receiver calculates the throughput in bits/ second according to which it can accept the packet without any loss. After which, host B responds to host A by sending this rate at which it can receive packets from Host A. If host B can accept the packets at a rate higher than the present transmission rate, host A tries to increase the sending rate accordingly. The main intension is to make an optimal utilization of the bandwidth in accordance with both the sender and receiver. At certain instance of time host A’s sending rate will be equal to host B’s receiving rate. The advantage of implementing the above concept is that it will enable us to send large files over the network with minimal packet loss.

Conclusion

As defined in RFC768, UDP just adds addressing and an optimal checksum. After implementing sequence number and acknowledgments in our RPUDP there might be certain increase in the performance and reliability compared to the traditional UDP. Also, the increase in the header helps the receiver to predict the next segment and optimize the processing. Using RPUDP there is a chance of faster transmission with minimal packet loss and hence a better candidate if reliability is a problem.

IV. References

[1] N. K. A. S. Venki, "GEEKSFORGEEKS," [Online]. Available: https://www.geeksforgeeks.org/computer-network-user-datagram-protocol-udp/.

[2] J. Postel, 8 August 1980. [Online]. Available: https://tools.ietf.org/html/rfc768.

[3] http://www.rfwireless-world.com/Terminology/Advantages-and-Disadvantages-of-UDP.html, "RF WIRELESS WORLD," [Online]. Available: http://www.rfwireless-world.com/General/.

[4] UNKNOWN. [Online]. Available: https://2buntu.com/articles/1209/udp-untangled-overview-of- how-udp-works/.

[5] "ltima’s Knowledge Base," [Online]. Available: https://www.eltima.com/what-is-udp/.

[6] Y. R. J. L. Zhaojuan Yue, "Performance Evaluation of UDP-based high speed transport protocols," 2011.

[7] X. H. S. M. Q. W. C. X. Ben Eckart, "A dynamic performance-based flow control method for high speed data transfer.," in IEEE computer society, 2010.

[8] P. M. a. K. Dunlap, " Development of the domain name," in Proc. ACMSIGCOMM , ‘88, Stanford, CA, 1998.

[9] S. Microsystem, "“NFS: Network file system protocol specification;," in 4,” Intemet Requests for Comments, Mar. 1989.

[10] "Science alert," Information technology Journal, [Online]. Available: https://scialert.net/fulltextmobile/?doi=itj.2009.600.604.

About this essay:

If you use part of this page in your own work, you need to provide a citation, as follows:

Essay Sauce, UDP Reliability and Performance with RPUDP – Learn Protocol Basics. Available from:<https://www.essaysauce.com/sample-essays/2018-12-6-1544116929/> [Accessed 15-04-26].

These Sample essays have been submitted to us by students in order to help you with your studies.

* This essay may have been previously published on EssaySauce.com and/or Essay.uk.com at an earlier date than indicated.