Subject: PIM-SM Join Latency

From: chan kwok hing <[email-masked]>
Date: Wed, 19 Apr 2000 01:32:06 +0800 (HKT)

Dear all,

	I am a final year undergraduate student of The Chinese University
of Hong Kong, who is studying multicast routing algorithm as my final year
project. Since I have downloaded and installed the pimd-2.1.0-alpha26 to a
Linux PC, and I have used MGEN to test the performance of PIM Sparse Mode
routing and the description is as follows :

	Using a PC installed pimd as router with 2 ethernet cards
connecting to 2 VLAN, and in each VLAN there is one Linux PC installed
MGEN, one is to send packets and the other one receives packets. The MGEN
software will generate report about join latency, packets received, 
packets loss, etc. In the test, packet sending rate is 1500 packet per
second where each packet is 100 bytes. (1.2 Mbps)

	Since I use MGEN to do many performance evaluation, the result is 
as follows :

Join Latency       : ~0.6 seconds to ~10.3 seconds
Packet loss        : 8 to 15 packets

	The join latency varied within about 1.7 seconds to 9.3 seconds. 
The variation is so large that I wonder that the problem is due to PIM
implementation, IGMP implementation or the PIM algorithm has such 
disadvantage. 

I am looking forward to kindly reply. Your help will be greatly appreciated.
Thank you very much.

Regards,
Chan Kwok Hing

---

From: Wilbert de Graaf <[email-masked]>
Date: Tue, 18 Apr 2000 12:29:58 -0700

Hi Chan,

To start with thanks for the tip of MGEN. Dididn't know this application. I'm
working on a IGMPv3 implementation myself, and it might be interested to do the
same for the adaption of multicast source filters.

Telling whether it's IGMP could be done using a packet trace on the client. You
could detrmine how long it takes before the IGMPv2 leave report is transmitted
after the last member-socket dropped membership. The source code of linux
(http://lxr.linux.no/source/net/ipv4/igmp.c) seems to send the report right
away so you shoudl be able to see that.
Then of course there could be a delay within pimd, and you could change the
source to log the events (when pimd received a leave report, and removed the
outgoing interface list of the (S,G).

Then, of course

---

From: Pavlin Ivanov Radoslavov <[email-masked]>
Date: Tue, 18 Apr 2000 15:15:50 -0700

> implementation, IGMP implementation or the PIM algorithm has such 

Chan,

In some special cases PIM-SM protocol itself may introduce long
latency between the time a receiver join and the time it receives
the first packet:
 - If the group doesn't have receivers yet, but the sender is
   active, the RP will send RegisterStop to the DR
 - After the first receiver joins the group, it will get the data
   only after the RegisterStop state in the DR expires (from the top
   of my head, of the order of up to 10-30 seconds?)
 - The receivers that join later should not see any latency.

In your case however, I don't think this is the reason, because you
have just a single router, and there is no RegisterStop sent
internally from/to the same router.

For Join latency I doubt it is IGMP problem, unless there is bug in
the Linux kernel implementation (IGMP may account for the Leave
latency, but this is different).

My guess is that the reason is in the pimd implementation. Indeed,
although most of the events are scheduled through a periodic timer
of 5 seconds, I think that some events like Join are
scheduled immediately, so there is no good explanation why sometimes
you see the 10s latency. Going through detailed log of events should
help you point the problem.

Regards,
Pavlin

---

From: chan kwok hing <[email-masked]>
Date: Wed, 19 Apr 2000 11:59:02 +0800 (HKT)

Dear all,

	Thank you for Graff's reply. 

	Since the pimd program use dedicated igmp.c and igmpv2.h, not the
linux one (http://lxr.linux.no/source/net/ipv4/igmp.c), will it affect the
situation? Also, I have changed some parameter in igmpv2.h like
IGMP_QUERY_INTERVAL, IGMP_QUERY_RESPONSE_INTERVAL, 
IGMP_STARTUP_QUERY_INTERVAL, etc. the performance looks a little better,
the join latency varies between 1.1 seconds to 9 seconds, but it seems not
reasonable. Looking forward to kindly reply. Thank you very much.

Regards,
Chan Kwok Hing

---

From: "Wilbert de Graaf" <[email-masked]>
Date: Tue, 18 Apr 2000 23:23:49 -0700

Hi Chan,

IGMP is a (asymmetric) host-router protocol, so both router and host have
their own characteristics concerning behaviour (pimd is the igmp querier,
while linux's igmp.c is the reporter), timers and so on. For that reason
pimd brings it's own implementation.

But you shouldn't change those defines in the headers since most of these
are part of the protocol specs.

It's just that it sometimes helps to put logs in the sources when
troubleshooting a protocol, so you can make sure what exactly is going on.

- Wilbert

---

From: chan kwok hing <[email-masked]>
Date: Wed, 19 Apr 2000 16:38:07 +0800 (HKT)

Dear all,

        Thank you for Pavlin's reply.

        Since we have tested on a Cisco 7500 using PIM-SM and MGEN, the
join latency varies between 0.025 secondes to 0.9 seconds, so what is the
main factor for this variation?

        Also, we have downloaded the pimdd, but it has error message that
it has not the "pim.h" file when i compile with makefile. So can anyone
tell me how to solve it?

Thank you very much.

Regards,
Chan Kwok Hing