[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ns] weird throughput result



Hello All,
Thanks for your help.
I got the answer to the problem.
Actually, at 1500 packet size, the packets were fragmenting into two 1000
and 500, so counting from trace file was producing weird results.
Any idea why the packets are fragmenting?
regards
DEV

On Wed, 24 Jan 2001, Kaleelazhicathu R R Kumar wrote:

> at the moment,you are actually counting the number of packets enqueued at
> the node 1 and not the packets received at node 2 when u do a grep on
> "+". Hence the rate u get now is the sending rate(15Mbps) and not the
> throughput. Inorder to get the throuput , u may have to do a grep on
> "r". you should get 10Mbps as the rest would be taildroped. to verify this
> , u can count "d" packets. no. of "d" + "r" = "+".i think this would help.
>
> Renjish.
>
>
> If you love life, don't waste time, for time is what life is made up of.
> -- Bruce Lee
>
>
>
>
>
>
>
> On Tue, 23 Jan 2001, Devendra Goyal wrote:
>
> > I run the program. Process the trace file.
> > get total_send_packet_count using 'grep -cw "+" tracefile'.
> > and the same way total_received_packet_count.
> > Then
> > Application Load=total_send_packet_count*packet_size*8(bits per
> > byte) / total_time.
> > Throughput=total_received_packet_count*packet_size*8(bits per
> > byte) / total_time.
> >
> > I get the total time from my simulation time or last packet time stamp
> > from trace file.
> >
> > It just clisks me. My results are almost double of expected results.
> > Does it have something to do with the duplex link?
> > Thanks a lot.
> > DEV
> >
> > On Mon, 22 Jan 2001, kunchanl wrote:
> >
> > > Can you explain how did you get those statistics in more details?
> > >
> > > Kun-chan Lan
> > >
> > > On Mon, 22 Jan 2001, Devendra Goyal wrote:
> > >
> > > > I ran one experiment, created a link between two nodes with following
> > > > specf.
> > > > $ns duplex-link $n1 $n2 10Mb 1ms DropTail
> > > >
> > > > and a cbr with following specf.
> > > > $cbr0 set packetSize_ 1500
> > > > $cbr0 set rate_ 15Mb
> > > >
> > > > on running this, I get following output:
> > > > For Packetsize= 1500 and Interval= 1.0 :
> > > >         Application Load     	= 29.739659045857014 Mbs (enqueued packet)
> > > >         Throughput              = 15.12356283864147 Mbs
> > > >         Avg. Plus Delay         = 0.03948850052429101 sec
> > > >         Avg. Minus Delay        = 0.001793289059769138 sec
> > > >         Packet Drop Prob        = 0.4914681834340562
> > > >
> > > >
> > > > The Throughput is more than the link bandwidth.
> > > > I cannot explain this. Any idea...
> > > > Thanks a lot
> > > > DEV
> > > >
> > > > The program is appended:
> > > >
> > > >
> > > > #Create a simulator object
> > > > set ns [new Simulator]
> > > >
> > > > #Open the trace file
> > > > set nf [open out.ex2 w]
> > > > $ns trace-all $nf
> > > >
> > > > #Define a 'finish' procedure
> > > > proc finish {} {
> > > >         global ns nf
> > > >         $ns flush-trace
> > > >         #Close the trace file
> > > >         close $nf
> > > >         exit 0
> > > > }
> > > >
> > > > #Create four nodes
> > > > set n1 [$ns node]
> > > > set n2 [$ns node]
> > > >
> > > > #Create links between the nodes
> > > > $ns duplex-link $n1 $n2 10Mb 1ms DropTail
> > > >
> > > > #Create a UDP agent and attach it to node n0
> > > > set udp0 [new Agent/UDP]
> > > > $udp0 set class_ 1
> > > > $ns attach-agent $n1 $udp0
> > > >
> > > > # Create a CBR traffic source and attach it to udp0
> > > > set cbr0 [new Application/Traffic/CBR]
> > > > $cbr0 set packetSize_ 1500
> > > > $cbr0 set rate_ 15Mb
> > > > $cbr0 attach-agent $udp0
> > > >
> > > > #Create a Null agent (a traffic sink) and attach it to node n3
> > > > set null0 [new Agent/Null]
> > > > $ns attach-agent $n2 $null0
> > > >
> > > > #Connect the traffic sources with the traffic sink
> > > > $ns connect $udp0 $null0
> > > >
> > > > #Schedule events for the CBR agents
> > > > $ns at 0 "$cbr0 start"
> > > > $ns at 4.5 "$cbr0 stop"
> > > > #Call the finish procedure after 5 seconds of simulation time
> > > > $ns at 5.0 "finish"
> > > >
> > > > #Run the simulation
> > > > $ns run
> > > >
> > > >
> > >
> >
>