Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Nov 2023 07:53:12 -0400
From:      Cheng Cui <cc@freebsd.org>
To:        Yuri <yuri@freebsd.org>
Cc:        "freebsd-net@freebsd.org" <freebsd-net@freebsd.org>
Subject:   Re: Network starvation question
Message-ID:  <CAGaXuiL1zYWqr=L8pz7xT_Etg5omedg39Cx8wJsp78ZcSJX8qg@mail.gmail.com>
In-Reply-To: <d17ef5f2-8098-47b7-a9be-10cd8e531f91@FreeBSD.org>
References:  <d17ef5f2-8098-47b7-a9be-10cd8e531f91@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000cbcd2806093e26e9
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hi Yuri,

If I understand your situation correctly, your application A is using UDP
but
application B is using TCP and the max outbound bandwidth is < 4MBps.

If A can send at 3.5 Mbps and B can send at 0.5 Mbps, why B is suffering
more in throughput when the outbound limit is < 4Mbps?

There are many factors I think in my experience that can contribute to this=
.
But maybe we prefer a solution rather than the root cause of the difference=
.
If you can tune A to use less bandwidth and let B to use the full 0.5 Mbps,
the problem may be solved. (for example, iperf default in UDP is ~1Mbps but
can be tuned to send at max bandwidth, so vice versa)

Then, back to the possible contribution factors of TCP suffering from a UDP
traffic competition :

   1. UDP traffic rate can be considered constant so it does not yield
   2. TCP congestion control may be encountered
   3. application's responsiveness may be different


Best Regards,
Cheng Cui


On Fri, Nov 3, 2023 at 12:42=E2=80=AFAM Yuri <yuri@freebsd.org> wrote:

> Hi,
>
>
> I've encountered the situation when the application A was using 100% of
> the outbound bandwidth which is approximately 3.5 MBps of UDP traffic.
>
> Then the application B (the RDP TCP connection) attempted to use a much
> lower outbound speed, probably < 0.5 MBps, and it got starved.
>
> Application B (RDP) was super slow as long as the application A kept
> running. It was almost impossible to use the RDP connection.
>
>
> My question is: shouldn't the system allow less intense streams to also
> run at a decent speed?
>
>
> Let's say that the outbound bandwidth threshold of the connection is 3.5
> MBps.
>
> The application A can send 3.5 MBps (or more).
>
> The application B can send up to 0.5 MBps.
>
> Obviously, they can't send 4.0 MBps in total, and their speeds should be
> tuned down.
>
> If both of the applications would be tuned down proportionately, this
> could be done using the 3.5/4.0 ratio, which would be 0.875.
>
> So why then does the slower connection get slowed down so much?
>
> It was obviously slowed down many times, not just by 13%.
>
>
> FreeBSD 13.2
>
>
> Thanks,
>
> Yuri
>
>
>
>

--000000000000cbcd2806093e26e9
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Hi Yuri,</div><div><br></div><div>If I understand you=
r situation correctly, your application A is using UDP but</div><div>applic=
ation B is using TCP and the max outbound bandwidth is &lt; 4MBps.</div><di=
v><br></div><div>If A can send at 3.5 Mbps and B can send at 0.5 Mbps, why =
B is suffering</div><div>more in throughput when the outbound limit is &lt;=
 4Mbps?</div><div><br></div><div>There are many factors I think in my exper=
ience that can contribute to this.</div><div>But maybe we prefer a solution=
 rather than the root cause of the difference.</div><div>If you can tune A =
to use less bandwidth and let B to use the full 0.5 Mbps,</div><div>the pro=
blem may be solved. (for example, iperf default in UDP is ~1Mbps but</div><=
div>can be tuned to send at max bandwidth, so vice versa)<br></div><div><br=
></div><div>Then, back to the possible contribution factors of TCP sufferin=
g from a UDP</div><div>traffic=C2=A0competition :<br></div><div><ol><li>UDP=
 traffic rate can be considered constant so it does not yield<br></li><li>T=
CP congestion control may be encountered<br></li><li>application&#39;s resp=
onsiveness may be different<br></li></ol></div><div dir=3D"ltr"><div><div d=
ir=3D"ltr" class=3D"gmail_signature"><div dir=3D"ltr"><div><br></div>Best R=
egards,<div>Cheng Cui</div></div></div></div><br></div><br><div class=3D"gm=
ail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Fri, Nov 3, 2023 at 12:=
42=E2=80=AFAM Yuri &lt;<a href=3D"mailto:yuri@freebsd.org">yuri@freebsd.org=
</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:=
0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">=
Hi,<br>
<br>
<br>
I&#39;ve encountered the situation when the application A was using 100% of=
 <br>
the outbound bandwidth which is approximately 3.5 MBps of UDP traffic.<br>
<br>
Then the application B (the RDP TCP connection) attempted to use a much <br=
>
lower outbound speed, probably &lt; 0.5 MBps, and it got starved.<br>
<br>
Application B (RDP) was super slow as long as the application A kept <br>
running. It was almost impossible to use the RDP connection.<br>
<br>
<br>
My question is: shouldn&#39;t the system allow less intense streams to also=
 <br>
run at a decent speed?<br>
<br>
<br>
Let&#39;s say that the outbound bandwidth threshold of the connection is 3.=
5 <br>
MBps.<br>
<br>
The application A can send 3.5 MBps (or more).<br>
<br>
The application B can send up to 0.5 MBps.<br>
<br>
Obviously, they can&#39;t send 4.0 MBps in total, and their speeds should b=
e <br>
tuned down.<br>
<br>
If both of the applications would be tuned down proportionately, this <br>
could be done using the 3.5/4.0 ratio, which would be 0.875.<br>
<br>
So why then does the slower connection get slowed down so much?<br>
<br>
It was obviously slowed down many times, not just by 13%.<br>
<br>
<br>
FreeBSD 13.2<br>
<br>
<br>
Thanks,<br>
<br>
Yuri<br>
<br>
<br>
<br>
</blockquote></div></div>

--000000000000cbcd2806093e26e9--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGaXuiL1zYWqr=L8pz7xT_Etg5omedg39Cx8wJsp78ZcSJX8qg>