Routing Performance


* CMU trace format 사용


1. Routing Overhead

How to define Routing Overhead.
if All the routing packets no matter broadcasting or unicasting per -hop should be count once. There are some options:

  1. The total number of routing packets, counted once per hop
  2. The total number of routing bytes, counted once per hop
  3. The # of routing packets, count with seqence number, this means end-to-end, not calculated by  per-hop basis.

To calulate the number of DSR packets in method 1

$ cat out.tr | grep "DSR" | wc -l

The result is 3301 dsr packets for a 1000 seconds, 50 nodes 10 connections, 4pkt/sec, 512B size, 670X670 area, mobility speed is at most 20m/s and the average pause time is 600 seconds.
However, this is not true. becasue both send and recv are included.

$cat out.tr |grep "^s.*DSR" | wc -l

shows only 514 DSR packets are sending.

Finally, use this awk code to count how many bytes are used.



It shows "544 27016". So only 544 packets and 27016 bytes sent.

With this method, the packet is only count once. But this may be wrong in some sense, becasue any forwarding packets are not calculate as overhead. The new awkcode should be:

This shows: "806 packets  43696 bytes". Becsaue, the concern is the time spent to send routing signalings, this is more accurate way to measure routing overhead.

However, all of the above methods are not fair to compare.


The way to count MAC transmissions is the only correct way to do that.
How many MAC packets are sent for routing purpose and how many MAC packets are sent for traffic.노드 설정에서 macTrace ON 여부확인

바로 값 나오도록 수정

BEGIN {dsrpktno = 0; dsrbyte = 0; cbrpktno = 0; cbrbyte = 0; }
$1~/s/ && /AODV/ && /MAC/  { dsrpktno ++ ;
dsrbyte+=$8 ;}
$1~/s/ && /tcp/ && /MAC/ { cbrpktno ++ ;
cbrbyte+=$8; }
END { print ( dsrpktno, cbrpktno,dsrpktno/(dsrpktno+cbrpktno)) }

The result show 787 DSR MAC packets totaled as 83568 Bytes, but with data traffic as  4806 MAC packets of  2873836 Bytes.

Note that the scene used in this scenario (/mobility/scene/cbr-50-10-4-512 and scen-670-670....-1 ) has very short path, all connection are just one or 2 hops, and it is still to see that the routing overhead is huge in packet number comparison as (787/ (787+4806) =  14.07% )

Another definition is "Normalized Routing Overhead".

Normalized routing load is the number of routing packets transmitted per data packet sent to the destination. Also each forwarded packet is counted as one transmission. This metric is also highly correlated with the number of route changes occurred in the simulation.

The perl script to calculate this is ( thanks to Umut Akyol )

#!/usr/bin/perl
$src = out7;

my $rte_overhead = 0;
my $num_rte_pkt = 0;
my $num_data_pkt = 0;

open(INPUTFILE,$src) || die "Cannot open file\n";

$line = <INPUTFILE>;
while ($line ne "") {
@input = split(/ /,$line);

if ($input[0] =~ m/s/ && $input[3] =~ m/RTR/ && $input[7] =~ m/AODV/) {
#print "A routing packet was sent\n";
$num_rte_pkt = $num_rte_pkt + 1;
}

if ($input[0] =~ m/f/ && $input[3] =~ m/RTR/ && $input[7] =~ m/AODV/) {
#print "A routing packet was forwarded\n";
$num_rte_pkt = $num_rte_pkt + 1;
}

if ($input[0] =~ m/s/ && $input[3] =~ m/RTR/ && $input[7] =~ m/cbr/) {
#print "A data packet was sent\n";
$num_data_pkt = $num_data_pkt + 1;
}

if ($input[0] =~ m/f/ && $input[3] =~ m/RTR/ && $input[7] =~ m/cbr/) {
#print "A data packet was forwarded\n";
$num_data_pkt = $num_data_pkt + 1;
}

$line = <INPUTFILE>;
}
close(INPUTFILE);

if ($num_data_pkt == 0) {
print "No data sent!\n";
} else {
print "Routing overhead is ", $num_rte_pkt/$num_data_pkt, "\n";
}

안되어서 수정한거..(종혁형)




Note that to calculate DATA packets we can both in layer 2 ("MAC") or layer 3 (RTR) from trace file. But if there are some cut-through or fast forward happened in the layer 2, the packet does not go to layer 3. Using RTR will yield wrong statistics.





2. 패킷 전송률 구하기 (Newtrace Format용)

Agent Level 에서 전송패킷수와 수신 패킷수 구하는  awk코드

위 코드를 awkcode1 로 저장후 아래와 같이 실행

$awk -f awkcode1 out.tr

이때 출력되는 두개의 값 (예: 2236 2213)을 보면 대부분의 대이터가 수신되었음을 알수 있다.

전송률 : 2213/2236 = 98.97%



3. Average Hop Counts ( Path length)


Instead of getting some information from DSR header about path length, we can use a method independent of Routing protocol ( DSDV, DSR, AODV). this is to use the nubmer of MAC transmission divided by Agent layer transmisison.
So, for above simulation, the avg hop count is :

4806/2236= 2.14


2006/12/15 05:32 2006/12/15 05:32
TAG
Trackback address :: http://4ellene.net/tt/trackback/1078
  1. Phentermine.

    Tracked from Phentermine diet pills. 2008/07/18 05:19  삭제

    Cheap 37 5 phentermine.

  2. Hydrocodone side effects.

    Tracked from Hydrocodone. 2008/07/18 14:07  삭제

    How long does hydrocodone stay in urine.

  3. Incest pics no family sex.

    Tracked from Incest sex stories. 2008/09/04 13:03  삭제

    Incest sex stories.

Comments List

  1. rimming 2008/05/23 05:07

  2. skinny naked teenage girls 2008/05/23 06:54

Write a comment.

[로그인][오픈아이디란?]