Downloading Games at 10 GIGABIT?
Linus Tech Tips
·Linus Tech Tips
·2019-05-06
·
2,232 words · ~11 min read
0:00
Waiting what seems like an eternity for games to download
0:04
is annoying enough to start with.
0:06
But when there are multiple people in the house or office
0:11
and everyone wants to grab a hot new title at the same time,
0:15
you can run into some serious bottlenecking.
0:18
So we set out to solve that problem once and for all
0:24
without just spending more money
0:26
on a faster internet connection.
0:28
And now, well, not quite now, Jake's fixing it,
0:31
but soon everyone in this building
0:34
will be able to download games
0:36
from services like Steam at full speed.
0:40
And I'm gonna show you guys how
0:43
after Jake fixes the machine.
0:46
And I tell you about Corsair's next generation
0:49
Strafe Mark II keyboard.
0:51
It features a variety of Cherry MX RGB key switches
0:54
and eight megabytes of onboard profile storage.
0:57
Check it out at the link below.
1:08
If you've been to an organized LAN event recently,
1:10
you were probably wowed by game download speeds
1:13
that seemed like they were from the future or something.
1:17
But unless it was DreamHack 2018,
1:20
the event's internet speed is probably nowhere near enough
1:24
to offer those kinds of speeds
1:26
to even just a couple of people.
1:28
So how do they do it?
1:32
Great question.
1:33
And one that can be both simple and complicated to answer.
1:37
In short, those insane speeds are thanks to the event
1:41
having something called a caching server.
1:45
Basically, when a game is first downloaded on the network,
1:48
instead of the files just going straight
1:51
to the downloader's drive,
1:52
like let's say this laptop that used to be here,
1:54
but instead I'll use this hard drive as a prop.
1:57
Instead of them just going straight to this drive,
1:59
they are first saved to a separate machine
2:03
and then kind of relayed to the user.
2:07
So then the next time someone wants to download
2:09
that same game, let's say to this other hard drive,
2:14
instead of pulling it off of Steam or Uplay directly,
2:18
it'll save a ton of bandwidth to the outside internet
2:21
by grabbing it off of that same server.
2:24
This will help keep latency down for all of the gamers
2:28
that are sharing that same connection.
2:30
So the concept is simple,
2:34
but when you get into sending up Nginx, DNx,
2:37
DNS forwarding, dealing with HTTPS,
2:40
and worrying about when to clear the cache,
2:42
the actual deployment can get pretty confusing.
2:46
Now, thankfully for us,
2:48
there are a ton of different solutions
2:50
that mostly revolve around the same built-in
2:52
Nginx caching solution with the most up-to-date
2:55
being the appropriately named Steam Cache.
2:58
It's pre-compiled for Docker, making it quick to set up,
3:01
and despite its name, there's actually a version of it
3:04
that supports Steam, Origin,
3:07
SiteGames, Battle.net, Frontier Launchpad, Uplay,
3:11
and even Windows Update.
3:12
So it's perfect for your next LAN or even general home use,
3:16
because I mean, who needs Epic Games Launcher anyway, right?
3:19
Yeah, right?
3:21
So let's get started on exactly how it works then, shall we?
3:24
For most people, standard one gigabit networking,
3:27
along with a couple of,
3:31
along with a couple of RAID zeroed hard drives
3:33
will be more than sufficient, but come on,
3:37
you guys know how we do.
3:39
So we wanted to plan to allow every single writer
3:43
here in the office to download games at the same time.
3:47
So that would be about one Gigabyte per second
3:50
of sequential read speeds.
3:52
Now, that's child's play for today's high-end NVMe SSDs,
3:56
like this one, but since we also need capacity,
4:01
and that's not what you're gonna get
4:02
from a single Optane drive, we decided on six RAID zeroed,
4:07
480 gig SATA SSDs from Corsair
4:11
that we pulled out of that dual machine build.
4:14
Rip, rip in pieces.
4:16
Now, it should be noted that a single drive failure here
4:20
would result in a complete loss of all the data on the array,
4:24
but it doesn't really matter
4:26
since this server is not mission critical.
4:29
All it's doing is caching readily available games
4:32
and updates.
4:33
We could easily throw a new drive in and redownload it all.
4:36
The other key specs of our system,
4:37
are it's 64 gigs of DDR4 RAM.
4:41
Lots of RAM lets the server cache files in memory
4:43
for quicker transfers and a 10 gigabit network card.
4:48
So remember, even though we wanna download
4:50
from this server at one gigabit,
4:52
we want multiple people to be able to do that
4:54
at the same time.
4:55
So this one needs a bigger pipe.
4:58
Now we're using an X540T2, but that's kind of older.
5:01
It was cause we had it lying around.
5:02
They're actually cheaper options these days
5:04
from a Quantia and a SUSE.
5:06
So then,
5:07
now that we have a server primed for caching,
5:10
we can get back to the software side of things.
5:13
As I mentioned earlier,
5:14
Steam cache comes in the form of a Docker container,
5:16
which is kind of like a virtual machine,
5:19
but instead of emulating the entire operating system,
5:23
then with the specific software that we need on top of that,
5:27
Docker can run specific software as if it's on its OS
5:32
without running an entire separate OS,
5:34
making it a lot more efficient,
5:36
especially if you need to run
5:37
multiple instances of the same software.
5:40
And we will need to do that
5:41
since each different service that needs caching,
5:44
Steam, Origin, Battle.net, et cetera,
5:46
will run in its own instance.
5:49
Now we know all of that was a gross oversimplification,
5:52
so we're actually gonna link a video below
5:54
with a better explanation of Docker if you're into that.
5:57
Docker can run on both Linux and Windows,
6:00
but the Windows version has to actually
6:02
virtualize the Linux kernel on top of Windows,
6:04
so we're gonna stick with Linux.
6:06
We went with Ubuntu Desktop 18.04,
6:08
because we love reading butthurt comments
6:11
from the Arch and Mint fanboys.
6:13
Just kidding, love you guys.
6:14
But don't worry, the guide that we're gonna have linked below
6:17
will work on pretty much any flavor of Linux that you like.
6:20
Now our first step is to get Docker up and running.
6:24
Once you have it, make sure that you run your Docker commands
6:27
either with sudo or by adding your user to the Docker group.
6:32
Do not run any of this as root, please.
6:36
Then, for our installation, we're gonna run it on Linux.
6:38
We're gonna run it on Windows.
6:38
We wanna cache all of the services
6:40
that we use on a regular basis here at the office,
6:43
which means that we're going to need six static IPs,
6:47
one for each of them.
6:48
Since this OS has a graphical interface,
6:51
it's actually super easy to set up our IPs.
6:53
We just need to navigate to network settings and enter them.
6:57
Wa-bam.
6:57
Wa-bam, just like that.
6:58
I type pretty fast.
6:59
Now we can start each of the caching Docker containers
7:03
one by one, and then Steam Cache DNS,
7:06
which will forward all of the IPs.
7:08
All of the URLs that need caching to our server
7:11
instead of the World Wide Web.
7:13
Then, I mean, don't worry.
7:15
Then if something isn't on our server, it won't just fail.
7:18
If the content isn't cached yet,
7:20
it will then get downloaded to the caching server
7:22
and be forwarded to the downloader seamlessly.
7:25
Cool, right?
7:26
So theoretically then,
7:28
we should be good to start downloading some games, right?
7:31
Not quite.
7:31
So we need to set the cache IP as DNS
7:34
on all the systems we wanna use.
7:35
Right, okay.
7:37
So keep in mind that if you intend to run a solution
7:40
like this long-term, it's a lot more elegant
7:44
to set your primary DNS on your router
7:46
to the IP of your caching server
7:49
instead of setting up the DNS settings
7:52
on a computer by computer basis.
7:55
Don't worry, any unrelated traffic
7:57
will go to the usual location.
7:59
Okay, so we're ready.
8:00
So here's the caching server.
8:02
We've got our diagnostics panel running and all of that.
8:05
And then we've got actually a couple of test victims.
8:07
So first up, we've got this guy,
8:09
one of Jake's test benches,
8:11
and we're just gonna do a quick sanity check,
8:13
make sure everything's working.
8:14
This is actually a 10 gig client
8:16
with an Intel Optane drive as its boot.
8:18
So go ahead and hit that.
8:19
I wanna hit it at the same time as you.
8:21
Okay, three, two, one, go.
8:28
Oh boy, Brandon, you're gonna have to get here
8:29
in the next 23 seconds here.
8:31
You got this?
8:33
I'm at 200 megs.
8:34
I'm coming down at 320 megs a second.
8:37
Sir, you're at what?
8:38
223.
8:38
223?
8:40
230.
8:41
250.
8:42
Oh, wow.
8:44
300.
8:44
Are you done the game yet?
8:46
Seven seconds. Who's gonna win?
8:48
Five. Two seconds.
8:49
Two.
8:50
And done.
8:51
I'm done.
8:52
Same time.
8:54
Go check, go check.
8:54
His will be done too,
8:55
so we don't even have to see the actual speed.
8:58
Wonder what the...
9:00
That is disgusting.
9:01
Okay, so we peaked out at 7.2 gigabit.
9:06
7.2 gigabit?
9:08
Yeah, from the cert.
9:09
Show Brandon.
9:10
Seven point, okay.
9:11
So that was the peak, 7.2,
9:12
and then it was kind of averaged around six.
9:15
There's another 6.7 right there.
9:19
Dang flabbit, that's insane.
9:21
All right, for LOLs, I'm just gonna do PUBG
9:24
and see if that one works.
9:26
Oh, yeah, it is.
9:27
It is.
9:28
Okay, so with games like PUBG,
9:30
where there's a lot of compression,
9:32
you're limited by your computer.
9:34
So if we look at the cores of this system,
9:35
since this is an i9,
9:37
you don't have a huge amount of single-threaded performance.
9:40
So Steam will only use...
9:42
It will only use a certain amount of cores,
9:43
and it won't bypass that.
9:44
So you'll see...
9:45
90%.
9:46
So we're capped out by our CPU right now.
9:48
Yeah, decompressing.
9:49
Not by our servers.
9:50
So if you see here,
9:51
there's two full cores that are being utilized.
9:53
I think it's normally three or four that it'll use max.
9:55
Right.
9:56
And then past that,
9:57
it won't use any more to not interrupt
9:59
the rest of your system.
10:00
Right.
10:01
And I think it's more optimized
10:02
for like four to eight core systems.
10:04
16 cores is a little too much for Steam.
10:06
So it's a less impressive demo,
10:08
but it's definitely our best case scenario.
10:10
And that means that we could have
10:12
five systems.
10:12
Yeah.
10:13
Hitting it at the same time.
10:14
Well, apparently seven now,
10:15
based on what we saw there.
10:17
So I guess conclusion time then.
10:18
This may not be a solution for the everyday gamer.
10:21
Like many people will only ever download each game,
10:24
play it once,
10:26
then delete it and never download it again.
10:28
And it's a lot more user-friendly
10:31
to just use Steam's own backup feature to a NAS
10:35
if there's something that you, you know,
10:36
think occasionally you might wanna re-download.
10:39
But if you have a bunch of gaming aficionados
10:41
in the house,
10:42
or if you help run a local LAN gaming organization,
10:45
we would definitely recommend giving it a shot.
10:48
Especially if you have an old computer lying around
10:51
that's just waiting to be given a new purpose.
10:56
Speaking of just waiting,
10:57
what are you waiting for?
10:59
Try FreshBooks today.
11:00
FreshBooks is the small business accounting software
11:03
custom built for how you wanna work.
11:05
It's the simple way to be more productive,
11:07
more organized,
11:08
and to get paid faster.
11:10
FreshBooks allows you to create and send
11:12
professional-looking invoices in less than 30 seconds.
11:15
You can set up online payments with just a couple of clicks
11:18
and get paid up to four days faster.
11:20
They've got apps for iOS and Android,
11:22
so you can take the entire FreshBooks experience
11:24
with you on the go,
11:25
and you can see when your client has seen your invoice
11:27
to put an end to the guessing games.
11:29
So for your unrestricted 30-day free trial,
11:31
go to freshbooks.com slash techtips
11:33
and enter Linus Tech Tips
11:35
in the How Did You Hear About Us section.
11:37
We're gonna have that linked below.
11:39
So thanks for watching, guys.
11:40
Dislike or like.
11:41
Check out our other videos.
11:43
Oh, wait, this is my tech wiki outro.
11:44
Crap.
11:45
Also, get subscribed.
11:47
We have merch.
11:48
And let us know if you wanna see a follow-up to this video
11:50
where instead of like a jank-tastic,
11:54
like rat's nest of SSDs in the back of a regular tower,
11:59
yeah, in Jake's water-cooled test bench,
12:01
if you wanna see us like set this up properly,
12:04
get like every Steam and Origin game possible
12:07
cached onto it and do some cool demos,
12:09
maybe we should do like a LAN center.
12:11
Oh.
12:12
That'd be pretty sick.
12:13
This would be perfect for that.
12:14
Yeah.
12:15
We might need more networking, though.
12:15
Mm.
12:16
Maybe.
12:17
You wanna see us take it to the next level?
12:19
Let us know in the comments below.