AN EVENT DRIVEN SIMULATION FOR ADAPTIVE GENTLE RANDOM EARLY DETECTION (AGRED) ALGORITHM

Simulations are used to find optimum answers for problems in wide areas. Active queue management algorithms such as RED, GRED, typically use simulators like ns2 which is an open source simulator or OPNET, OMNET which are commercial simulators. However, beside the benefits of using simulators like having defined modules, parameters. There are problems such as complexity, large integrated components and licensing cost. To have an ideal balance in mentioned benefits and problems and to further complement the repository of simulators, this study presents the description of a general-purpose programming language based discrete event simulation for active queue management. This research has focused at developing a discrete event simulator to implement one of active queue management algorithms which is called AGRED. The results showed that the developed simulator has successfully produced the same results with an average deviation of 1.5% as previous simulator in AGRED.


INTRODUCTION
Based on the Mahmoud Baklizi and Abdel-Jaber, 2012;Reddy and Ahammed, 2008) and (Floyd and Jacobson, 1993) congestion is fundamental issue in computer networks. Congestion happens at the router buffer when incoming packets exceeds available network resources such as buffer space. Congestion leads to increase packet loss, queuing delay and finally degrades the throughput. Different Active Queue Management (AQM) algorithms deal with the congestion in different ways such as Random Early Detection algorithm (RED) which is one of the most well known active queue management algorithms and was recommended by Internet Engineering Task Force IETF (Braden, 1988). RED was proposed in (Floyd and Jacobson, 1993) in which a version of REAL simulator built on Columbia's Nest simulation package with lots of modifications was used to evaluate the proposed algorithm.
Although RED was proposed to deal with the congestion but there were issues such as parameter setting which were stated in (Mahmoud Baklizi and Abdel-Jaber, 2012). Gentle Random Early Detection (GRED) was proposed (Floyd, 2000) to solve the primarily issues with RED. GRED was evaluated using the same simulation as used in RED.
Even though the GRED proposed to overcome the limitation of the RED but the packet loss rate is still high in congestion situation. An Adaptive Gentle Radom Early Detection (AGRED) was proposed by (Mahmoud Baklizi and Abdel-Jaber, 2012) to derive better quality result in packet loss. AGRED simulation was implemented using java programming language.
There exists several types of simulators, each associated with drawbacks such as large integrated components, licensing cost, complexity and being generalized such that if someone intend to use the simulator, lots of modification is needed (Floyd and Jacobson, 1993). Beside that AGRED was simulated using java programming languages but the details were not given in the study.

JCS
This study presents the details of development of General Purpose Programming Languages (GPL) based Discrete Event Simulation (DES) to do experimental part of selected paper in a way that it is small, specified, light and free of license.
The rest of the study is presented in the following order in section 2, an Analysis tool is proposed along with its components. In section 3 the results of proposed simulation which is being tested on AGRED algorithm is discussed and finally in section 4 conclusion and future work are presented.

Proposed Analysis Tool
This section is about the deliberation of the chosen algorithm named Adaptive Random Early Detection (AGRED). The description of this algorithm is given form the core to provide the validation of the developed simulator. The proposed and developed simulator needs to be verified and validate and is highly critical and mandatory in serving its acceptance. The comparative simulator, from (Mahmoud Baklizi and Abdel-Jaber, 2012), shall be referred as a benchmark hereafter. The benchmark attributes encompass the purpose of creating comparison of this research within the same domain with another method which is distinct in the contexts of its mechanics and platform (Naghshbandi et al., 2012).

AGRED
AGRED is one of the Active queue management algorithms to detect incipient congestion at the router buffers. AGRED algorithm consists of two separate algorithms same as RED algorithm (El Emary and Taweel, 2005). The first algorithm is for calculating the Average Queue Length (AQL) and it determines the degree of burstiness that will be allowed in the gateway queue. The formula for calculating average queue length is given as follow Equation 1: where, q w is queue weight and queueSize is the instantaneous queue length. The second algorithm which is for calculating the packet marking probaability determines how frequently the gateway marks packets, given the current level of congestion. The goal is for the gateway to mark packets at fairly evenly spaced intervals, in order to avoid biases and avoid global synchronization and to mark packets sufficiently frequently to control the average queue length (Floyd and Jacobson, 1993). The formula for calculating the dropping probability is given as follow Equation 2: where, C is a counter that represents the number of packets arrived at router buffer and has not dropped since the last packet was dropped and D init is defined as follow Equation 3: The process of the AGRED algorithm is presented in Fig. 1 and AGRED model is shown in Fig. 2. Figure 1 illustrates the flowchart of how AGRED decides to whether drop packets from queue or to add packets into the queue. The algorithm will compute the aql for every packet arrival and then it compares the aql with the three thresholds presented in Fig. 2. It continues to add packets into the queue if the aql is less than min.threshold and it drops all arriving packets if aql is bigger than double max threshold. Otherwise AGRED needs to calculate the dropping probability to decide whether to add or to drop arriving packets if the aql is between min and max.threshold or max.threshold anddouble max threshold.

Simulation Environment
The AGRED simulator was implemented using general purpose programming language, Java. For packet generation purpose, geometrical distribution is used as it used in the benchmark paper. The parameter used in this simulation is given in Table 1. The experimental results of proposed simulation environment are carried out by using these values in order to validate proposed simulator with (Mahmoud Baklizi and Abdel-Jaber, 2012).

Performance Metrics
In computer terms performance metrics are measures used to evaluate and assess given algorithm, model, framework such as throughput, delays. The performance metric has been used in this study to evaluate the simulator is Packet Loss (PL). Packet loss happens when one or more packets fail to reach destination while travelling across computer networks. In this study packet loss is defined as deduction of number of departed packets (ndp) from number of arrived packets (nap) as

Simulation Structure
In this section the derivation of simulator is explained. For writing a simulator the events need to be derived and for this purpose understanding of what is the statistical composition is pre requested.
Statistical composition of a system is one singular representation that determines the events (Fuaad et al., 2009). In this study the statistical composition is the number of packets. In discrete event simulations, a chronological sequence of events represents the operation of the system (Tanha et al., 2012). An event is an occurrence that changes the statistical composition of a system. Since the statistical composition is defined as the number of packets, what increases or decreases the number of packets. In the Fig. 3, Deliberation of AGRED algorithm is depicted to illustrate the events that affect the number of packets.
The following steps of AGRED algorithm are derived as events regarding Fig. 3:

Fig. 3. AGRED deliberation
Step 2: The source generates packets: the number of the packets is increased. Therefore, it is considered as an event (packet arrival) Step 5: Leaving of the packets from the system is considered as an event due to decrease in number of the packets (packet departure) For packet generation purpose, geometrical distribution is used as used in AGRED (Mahmoud Baklizi and Abdel-Jaber, 2012). In the simulator, geometrical distribution represents the types of generated packets which are text in reality. The pseudo code of geometrical distribution used in our simulator is presented in Fig. 4.
Scheduler is part of the simulator and is a component which picks the event/function based on its execution time. In the other words, the scheduler is not in the charge of assigning time to the events. The only task of this component is choosing from the list of the events. In this project the scheduler task is to pick between the arrival and departure function based on the smallest time.

RESULTS
This section evaluates and validates the simulator by several mean inter arrival times and a mean service time which are given in Table 1. These parameters are based on the study (Mahmoud Baklizi and Abdel-Jaber, 2012) and they are intended to create non congestion and congestion situations. The objective of the evaluation is to verify the ability of the developed AGRED simulator to detect instantaneous congestion at router buffer in preliminary stages. Figure 6 represents the results of simulation that is packet loss rate over different packet arrival rate. Packet loss rate is calculated based on the equation (4) in section 2.3. In Fig. 6 packet loss means percentage of packets that fail to reach destination from total number of packets. For example when packet arrival probability (α) is 0.78, the packet loss is 0.08 which means 8% of total packets failed to reach the destination.

DISCUSSION
The two graphs in Fig. 6 present the benchmark and propose simulator. The collected results are compared with the results from paper (Mahmoud Baklizi and Abdel-Jaber, 2012). When α is 0.18, 0.33 and 0.48 packet loss rate is 0 because congestion has not happened yet and all packets reach destination successfully. When α is increased to 0.63, 0.78 and 0.93, sever congestion happens and some packets fail to reach the destination. As Fig. 6 illustrates that proposed simulator has produced almost the same results as the benchmark with only 1.5% difference. Using random number generator for packet generation could be one of the reasons that slight difference occurs. Thus the proposed simulator was successfully able to simulate the behavior of packet loss parameter.

Limitations
This study focuses only on simulating the behavior of AGRED algorithm with the same parameters with benchmark study (Mahmoud Baklizi and Abdel-Jaber, 2012).
This simulation shows the behavior of AGRED algorithm for text traffic only and another types of traffic like audio and video are left for future investigation.

CONCLUSION
This study has significantly developed a General-Purpose Programming Language (GPL) Discrete Event Simulation (DES) for the analysis of congestion control algorithms. This specified simulator provided an easy simulation configuration for AGRED. The structure of presented simulation makes it very flexible in order to find optimum value for the parameters and future usage. To verify and validate the developed simulator, various mean inter arrival time were examined. The results showed that our simulator has produced the benchmark results in congestion and non congestion situations and successfully fulfills the requirements.
As mentioned in the section 5, the simulator implements only AGRED with geometrical distribution but also, the other algorithms such as GRED and RED and other distribution such as exponential and ON-OFF model can be implemented using the same simulators with the slight modification.