Gentoo Archives: gentoo-user

From: Kai Krakow <hurikhan77@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: Steam downloading extremely
Date: Sun, 19 Mar 2017 19:11:48
Message-Id: 20170319201113.38f7cc2a@jupiter.sol.kaishome.de
In Reply to: Re: [gentoo-user] Re: Steam downloading extremely by Danny YUE
1 Am Thu, 16 Mar 2017 14:04:14 +0800
2 schrieb Danny YUE <sheepduke@×××××.com>:
3
4 > Hi Kai,
5 >
6 > Thanks for your help :-)
7 >
8 > Code here:
9 > /usr/share/info $ cat /proc/sys/net/ipv4/tcp_fastopen
10 > 1
11 > /usr/share/info $ cat /proc/sys/net/core/default_qdisc
12 > pfifo_fast
13 > /usr/share/info $ cat /proc/sys/net/ipv4/tcp_congestion_control
14 > cubic
15 >
16 > dnsmasq may help because...if my understanding is correct, Steam Linux
17 > client has a bug that it tries to query the DNS too often during
18 > downloading, then its request got throttled. Please see
19 > https://wiki.gentoo.org/wiki/Steam/Client_troubleshooting
20 > Section "Slow download speeds".
21
22 This has been fixed with the March 9th 2017 Update. It's in the current
23 stable client.
24
25 > For disk, I don't think it fits my case because for a downloading
26 > speed of 100KB/s, disk write should not be a bottleneck.
27
28 Well, it still can be if there's a lot of data backlogged and the
29 writeback cache of the kernel is saturated.
30
31 > I suspect it is related to Linux client because Steam Windows client
32 > on my machine downloads at the normal speed...
33
34 This makes sense... However, here the linux client is downloading at 48
35 mbytes/s which is pretty much the maximum of my 400 mbit link.
36
37 So, if it is still slow for you, there seem to be other issues.
38
39 > Well, I am not that familiar with network tuning things...so I will
40 > definitely check the methods you mentioned.
41
42 Feel free to ask.
43
44 > On 2017-03-15 21:07, Kai Krakow <hurikhan77@×××××.com> wrote:
45 > > Am Wed, 15 Mar 2017 21:53:44 +0100
46 > > schrieb Kai Krakow <hurikhan77@×××××.com>:
47 > >
48 > >> Am Wed, 15 Mar 2017 21:24:10 +0800
49 > >> schrieb Danny YUE <sheepduke@×××××.com>:
50 > >>
51 > [...]
52 > >>
53 > >> Here, it's downloading with peak bandwidths of 48 mbytes/s but
54 > >> usually it's around 38 mbytes/s. However, I sometimes see
55 > >> slowdowns, too. I guess that games are downloaded file by file,
56 > >> and when a lot of small files are left in the queue, it just
57 > >> cannot get good bandwidth.
58 > >>
59 > >> But I only see such slowdowns mostly short before the last few
60 > >> megabytes of a game.
61 > >>
62 > >> Could you check if your downloaded games consist of many smallish
63 > >> files? Then that could be the explanation.
64 > >>
65 > >> You could try activating fq_codel and tcp fastopen:
66 > >>
67 > >> In /proc/sys/net/ipv4/tcp_fastopen it should say 1.
68 > >> In /proc/sys/net/core/default_qdisc it should say fq_codel.
69 > >>
70 > >> Also, you may want to try out bbr congestion control:
71 > >>
72 > >> In /proc/sys/net/ipv4/tcp_congestion_control it should say bbr.
73 > >>
74 > >> By recompiling the kernel, you can reconfigure the defaults for
75 > >> this (and enable support). Some of these need modern kernels.
76 > >>
77 > >> Additionally, many small tcp request need a good portion of your
78 > >> upload bandwidth and are very dependent on good round trip times.
79 > >> Traditional DSL lines with ping times of 50-60ms can really slow
80 > >> down requests of small files a lot due to three-way tcp
81 > >> handshaking, that is, you could request only one smallish file per
82 > >> 100-120ms. This can totally destroy the usable bandwidth. Maybe
83 > >> watch a running ping while the downloads are running. If the ping
84 > >> times increase while the download slows down, your bottleneck is
85 > >> the upload.
86 > >>
87 > >> But also keep in mind that traditional spinning disks may not keep
88 > >> up with the bandwidth if confronted with many small files. If
89 > >> you're using SSD all should be fine. I'm running on bcache with
90 > >> writeback caching which gives a really good performance boost by
91 > >> adding a small SSD to one or more big HDDs.
92 > >
93 > > BTW: I don't see how dnsmasq could help you here... It can do
94 > > nothing about bandwidth. It only acts as a DNS cache which helps
95 > > keeping latency of the DNS resolver down. But this doesn't matter
96 > > here because during download, steam won't do many DNS requests.
97 > >
98 > > As already stated, part of the problem may be the upload, and/or bad
99 > > queue handling within your broadband router. You can work around it
100 > > with a traffic shaper and throttling upload below what's physically
101 > > possible with your internet line, thus keeping the queue in front
102 > > of the broadband router. That way, a traffic shaper could handle it
103 > > and work around bad queue handling.
104 > >
105 > > To resolve the issue it is important to sophistically test the
106 > > suggestions one step at a time, starting with the easy ones, and do
107 > > your measurements.
108 >
109 >
110
111
112
113 --
114 Regards,
115 Kai
116
117 Replies to list-only preferred.

Replies

Subject Author
Re: [gentoo-user] Re: Steam downloading extremely Danny YUE <sheepduke@×××××.com>