Fixing download speed under Steam for Linux

I – among many others – had big problems with download speed under Steam for Linux. The games sometimes only dripped through the line byte by byte, while the line itself showed all fine when down­loading stuff elsewhere. There seem to be two problems with fixes which work for many people. I’ll show you both and recommend one of them.

But one thing beforehand: Sometimes, Steam’s servers are just overloaded. GTA V is new on PC? Call of Duty for free this weekend? Chances are you won’t get fast downloads whatever you do. But sometimes, neighbor region’s servers might be doing better. Then you can choose another server region in the Steam settings. This of course works for Mac and Windows as well.

DNS flooding

The Steam client seems to query the Domain Name Server very often. This can slow down downloads even despite a good DNS connection. The workaround suggested is installing a local DNS cache. As the IPs queried are the same every time, they easily can be  provided by a cache.

Installing the DNS cache under Debian:

aptitude install dnsmasq resolvconf

Installing the DNS cache under Ubuntu:

sudo aptitude install dnsmasq

This hint has been taken from here.

File sync flooding

The other problem of the Steam for Linux client are too many calls to file synchronization functions. These force the system to write to disc what it has got at the moment instead of gathering more data first. That’s especially problematic with a feature called Write Barrier. Many people got rid of the download problem by disabling the fea­ture in their /etc/fstab file. But doing so disables a safety measure of the file system. (See tux9656’s comment below for a possible alternative.)

This is a sample entry:

UUID=xyz /mnt/SSD_2 ext4 defaults,barrier=0 0 2

Caution: Editing the fstab file can render your system unbootable!

This hint has been taken from a hotline article of the German computer magazine c’t.

Conclusion

I tried both workarounds. The sync flooding change did not help, the DNS flooding change did. I undid the file system change. My download speed is still not always as fast as the line, but that might very well be due to Steam servers – and it never got down to some bytes per second again.

I would suggest to try the DNS change first. Not because it was the one that helped me, but because it is a useful change to your system anyway. If that does not help, additionaly try the other one. Please mind that it results in a system a bit less safe.

Of course, you’re at your own risk with both hints. You have been warned.

6 Gedanken zu „Fixing download speed under Steam for Linux“

  1. Do NOT set barrier=0 in your fstab file! This a very dangerous mount option. Doing so could very easily cause you to lose the entire contents of the drive should your system shut down or reboot unexectedly for any reason. Assuming you are using ext4, use „commit=60“ instead. This is a much safer option that allows data to sit in the write cache for up to 60 seconds instead of the default 5 before being written to disk. Should the system shut down or reboot unexpectedly, you will only lose up to the last 60 seconds of data written to the disk.

    1. Thanks for your thoughts! As written in the article, it „disables a safety measure of the file system“. But according to LWN, this „very dangerous mount option“ is (has been?) the default…?

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht.