Subject: [Tsvwg] SCTP load balancing policy - reg

From: Manikanda Prabhu <[email-masked]>
Date: Thu, 31 Mar 2005 13:38:01 +0530

hi

we are currently experimenting with load balancing using sctp
multihoming, and for source scheduling ( data striping part) we plan
to use a weighted round robin scheduling where the weight is
calculated from cwnd and RTT on each path. after considering various
parameters, we have decided these two would be sufficient. any
suggestions ?

Thank You
-manik-

_______________________________________________
tsvwg mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/tsvwg

---

From: "Brian F. G. Bidulock" <[email-masked]>
Date: Thu, 31 Mar 2005 01:41:18 -0700

Manikanda,

I use a couple more as follows:

(from sctp-0.2.20 and strsctp-0.9.2 release

	/*
	 *  RATE ROUTE
	 *  -------------------------------------------------------------------------
	 *  Rate the provided route according to a weighting function.
	 */
	STATIC INLINE int
	sctp_rate_route(sctp_t *sp, struct sctp_daddr *sd)
	{
		int value = 0;
		if (sd->dst_cache == NULL)
			goto done;
		value += 10;
		if (sd->retransmits > sd->max_retrans)
			goto done;
		value++;
		/* available send window considering congestion */
		if (sctp_avail(sp, sd) == 0)
			goto done;
		value++;
		if (!sd->retransmits)
			value += 1;
		if (!sd->dups)
			value += 1;
		if (sd->cwnd >= sd->in_flight + sd->dmps)
			value += 2;
		if (sd->cwnd <= sd->ssthresh)
			value += 1;
		if (sd == sp->taddr)
			value -= 1;
	      done:
		return (value);
	}

So, that includes, usability, available send window (considering
congestion), retransmissions, duplicates, ability to send an entire
packet, slow start, avoiding the same destination on each
reconsideration.

Slow start consideration is necessary to push the ramp up of the cwnd
on slow starting destinations otherwise they will be forever avoided.

Same destination consideration is necessary to load balance when all
destinations have best characteristics.

Duplicate detection is good for early path failure avoidance when
sending only SACKs and there is no DATA outstanding.

And then there is the tie breaker:

	/*
	 *  BREAK TIE
	 *  -------------------------------------------------------------------------
	 *  Break a tie between two equally rated routes.
	 */
	STATIC INLINE struct sctp_daddr *
	sctp_break_tie(sctp_t *sp, struct sctp_daddr *sd1, struct sctp_daddr *sd2)
	{
		/* choose routes with the least excessive timeouts */
		if ((sd1->retransmits > sd1->max_retrans) && (sd2->retransmits > sd2->max_retrans)) {
			if (sd1->retransmits + sd2->max_retrans != sd2->retransmits + sd1->max_retrans) {
				if (sd1->retransmits + sd2->max_retrans <
				    sd2->retransmits + sd1->max_retrans)
					goto use1;
				goto use2;
			}
		}
		/* choose routes with the least duplicates */
		if (sd1->dups && sd2->dups) {
			if (sd1->dups != sd2->dups) {
				if (sd1->dups < sd2->dups)
					goto use1;
				goto use2;
			}
		}
		/* choose routes with the lowest srtt */
		if (sd1->srtt != sd2->srtt) {
			if (sd1->srtt < sd2->srtt)
				goto use1;
			goto use2;
		}
		/* choose not to slow start */
		if ((sd1->cwnd > sd1->ssthresh) != (sd2->cwnd > sd2->ssthresh)) {
			if (sd1->cwnd > sd1->ssthresh)
				goto use1;
			goto use2;
		}
		/* choose same route */
		if (sd1 == sp->taddr || sd2 == sp->taddr) {
			if (sd1 == sp->taddr)
				goto use1;
			goto use2;
		}
		/* choose routes with best congestion window */
		if (sd1->cwnd + sd2->in_flight != sd2->cwnd + sd1->in_flight) {
			if (sd1->cwnd + sd2->in_flight > sd2->cwnd + sd1->in_flight)
				goto use1;
			goto use2;
		}
		/* choose routes with the lowest rto */
		if (sd1->rto != sd2->rto) {
			if (sd1->rto < sd2->rto)
				goto use1;
			goto use2;
		}
		/* can't break tie, just go with sd1 */
	      use1:
		return (sd1);
	      use2:
		return (sd2);
	}

--brian

-- 
Brian F. G. Bidulock    ¦ The reasonable man adapts himself to the ¦
[email-masked]    ¦ world; the unreasonable one persists in  ¦
http://www.openss7.org/ ¦ trying  to adapt the  world  to himself. ¦
                        ¦ Therefore  all  progress  depends on the ¦
                        ¦ unreasonable man. -- George Bernard Shaw ¦

---

From: Manikanda Prabhu <[email-masked]>
Date: Thu, 31 Mar 2005 20:01:18 +0530

hi Brian ,

> (from sctp-0.2.20 and strsctp-0.9.2 release

Thank you for that information. what is the advantage of considering
the type of packet (retransmision, duplicate) in calculating the
weight ? why not consider all packets as equal and consider alone the
path characteristics like cwnd, sshthres, rto, rtt in making the
decision ?

Thank You
Manik

---

From: "Brian F. G. Bidulock" <[email-masked]>
Date: Thu, 31 Mar 2005 13:12:50 -0700

Manikanda,

The sd->retransmits and sd->dups in the weighting is really a path
characteristic: it is the number of retransmissions or duplicates pegged
against the destination.  Both are indications that the destination
is dropping packets, DATA in the case of retransmissions, SACKs in the
case of duplicates.

--brian