From: Patrick McHardy <kaber@trash.net>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] Re: More on qdiscs - about dangling backlogs
Date: Tue, 07 May 2002 18:45:09 +0000 [thread overview]
Message-ID: <marc-lartc-102079719513446@msgid-missing> (raw)
In-Reply-To: <marc-lartc-102058802801083@msgid-missing>
Hi !
Don Cohen wrote:
> Patrick McHardy writes:
>
> > I don't think dropping at dequeue is necessary.
> Here's an example showing it is.
> I have an SFQ with max queue size 128 and very low rate, say about
> 1 packet/sec that I use to limit the rate of SYN's.
> Now as part of a test I send a syn flood, say 200 packets in one
> second. In that first second SFQ drops 200-128 but the time limit
> won't drop any more on enqueue. Now we're sending one packet/sec
> and I try to open a tcp connection.
> Suppose the age limit is 5 sec. and we drop on enqueue only.
> If I try to open the tcp connection 3 sec after the flood, none of the
> 124 or so packets in the queue has expired and it's going to take 2
> min. for my syn to get through. Whereas, if dequeue drops expired
> packets then I can get through in 2 sec.
I don't think this is a good example.
Why use SFQ for only SYNs ? For each connection (flow) only one SYN is
going to get enqueued. SFQ distributes available bandwidth equal between
flows if it the queue becomes full. Now, if each flow just consists of
one packet it's basically the same like fifo with higher overhead.
What if the Synflood lasts longer / your connection request happens
during the synflood ? It will expire like the others.
Syncookies provide a much better protection against synfloods, you won't
have to wait at all.
> The goal is not to provide
> > a maximum in-queue time, if the qdisc is able to send there is no reason
> > to drop.
> The reason to drop is that it's a waste of time/bandwidth to send
> expired packets, and even worse to make something unexpired wait for
> them (and even worse yet if it has to wait long enough to expire
> itself).
>
> The problem is if the qdisc is not able to send many packets
> > can get queued until drops occur. This means it takes a long time until
> > the sender receives indication of congestion. For TCP, congestion is
> > indicated by either consequent ACKS with the same ACK number or SACKs.
> In this case tcp should stop cause it doesn't get any acks cause its
> packets are not getting forwarded. Or if the problem is the other
> direction, it should stop cause it's not getting the acks.
>
> > ACKs are only generated by the receiver if something was actualy
> > received, so by dropping packets after some timeout the time until a
> > duplicate ACK is generated becomes smaller.
> I think now we're getting into the subject of why it's good to
> drop packets that have been waiting for a long time.
> If your objective is to generate a duplicate ack then I'm not sure
> dropping packets is the right way. After all, you might drop a packet
> that would have generated one sooner. For that matter, you might have
> dropped one that would have generated a non-duplicate ack, which would
> be even better for tcp. Nevertheless, I do think it's good to drop
> packets that are not forwarded in a timely fashion. It's just not a
> simple argument.
I think maybe we misunderstood.
What i want to achieve is that flows respond more quickly to changes in
available bandwidth. I assume that i am the bottleneck, otherwise it
wouldn't make much sense at all. You write "After all, you might drop a
packet that would have generated one sooner. For that matter, you might
have dropped one that would have generated a non-duplicate ack, which
would be even better for tcp.". If we leave packets dropped on the path
to us for reasons besides congestion out of sight it's unlikely that we
drop a packet that would have generated a duplicate ack earlier. After
all, we are the bottleneck so we control packet drops. Also, i don't
want to generate a non-duplicate ACK, i want to tell the remote LESS
bandwidth is available.
> > If you assume the expiration time to be smaller than the time requried
> > to fill the senders congestion window, it doesn't makes sense anymore to
> > drop packets during dequeue as this could possibly prevent a duplicate
> > ACK from beeing generated -> relay indication of congestion.
> > It sounds better to me to check for expired packets during enqueue
> > (timers would probably be too expensive i guess) and drop them before
> > enqueueing the new packet.
> I'm not sure what you have in mind for the check here.
> I was expecting that no packets would actually take a long time
> between being received/generated and being enqueued. Rather, when you
> enqueue one, you can look in the queue to find any others that have
> been in the queue too long. But this does not catch as many cases as
> checking at dequeue.
> I was not proposing to set any timers. Just record the time the packet
> arrives and when you dequeue, see how long ago that was.
>
> > With SFQ, what about not keeping a per-packet timeout but a per-flow
> > congestion-indication timeout which would drop the first packet of a
> > flow after max(age of any packet from this flow) >= timeout ? This would
> > assure congestion indication to be delivered to the sender as soon as
> > the flow is chosen to send again after the timeout occured (as long as
> > qlen(flow) > 1 which is probably the case).
>
> I don't think I understand what you're proposing. If we enqueue 50
> packets from one flow all at once, and after sending 10 they all
> expire (since they're all about the same age), then you want to drop
> one? Why is it worth sending the rest?
I don't want to drop unneccasary much. If i drop the first one, the
sender will receive notification of congestion as soon as possible and
slow down. But i haven't put very much thought in this so it will
probably not work like this.
Bye,
Patrick
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
next prev parent reply other threads:[~2002-05-07 18:45 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-05 8:39 [LARTC] Re: More on qdiscs - about dangling backlogs Martin Devera
2002-05-06 0:23 ` Don Cohen
2002-05-06 21:31 ` Martin Devera
2002-05-06 23:48 ` Don Cohen
2002-05-07 2:11 ` Patrick McHardy
2002-05-07 5:11 ` Don Cohen
2002-05-07 7:29 ` Martin Devera
2002-05-07 7:50 ` Martin Devera
2002-05-07 7:57 ` Martin Devera
2002-05-07 18:22 ` Don Cohen
2002-05-07 18:45 ` Patrick McHardy [this message]
2002-05-07 19:20 ` Don Cohen
2002-05-09 11:53 ` Martin Devera
2002-05-09 13:46 ` Don Cohen
2002-05-09 14:43 ` Martin Devera
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=marc-lartc-102079719513446@msgid-missing \
--to=kaber@trash.net \
--cc=lartc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.