WEBVTT

00:00:00.320 --> 00:00:04.560
Waiting what seems like an eternity for games to download

00:00:04.560 --> 00:00:06.640
is annoying enough to start with.

00:00:06.640 --> 00:00:11.140
But when there are multiple people in the house or office

00:00:11.140 --> 00:00:15.000
and everyone wants to grab a hot new title at the same time,

00:00:15.000 --> 00:00:18.120
you can run into some serious bottlenecking.

00:00:18.120 --> 00:00:23.120
So we set out to solve that problem once and for all

00:00:24.240 --> 00:00:26.640
without just spending more money

00:00:26.640 --> 00:00:28.500
on a faster internet connection.

00:00:28.500 --> 00:00:31.280
And now, well, not quite now, Jake's fixing it,

00:00:31.280 --> 00:00:34.560
but soon everyone in this building

00:00:34.560 --> 00:00:36.520
will be able to download games

00:00:36.520 --> 00:00:40.690
from services like Steam at full speed.

00:00:40.690 --> 00:00:43.940
And I'm gonna show you guys how

00:00:43.940 --> 00:00:46.080
after Jake fixes the machine.

00:00:46.080 --> 00:00:49.300
And I tell you about Corsair's next generation

00:00:49.300 --> 00:00:51.300
Strafe Mark II keyboard.

00:00:51.300 --> 00:00:54.400
It features a variety of Cherry MX RGB key switches

00:00:54.400 --> 00:00:57.240
and eight megabytes of onboard profile storage.

00:00:57.240 --> 00:00:59.000
Check it out at the link below.

00:01:08.020 --> 00:01:10.860
If you've been to an organized LAN event recently,

00:01:10.860 --> 00:01:13.920
you were probably wowed by game download speeds

00:01:13.920 --> 00:01:17.120
that seemed like they were from the future or something.

00:01:17.120 --> 00:01:20.100
But unless it was DreamHack 2018,

00:01:20.100 --> 00:01:24.120
the event's internet speed is probably nowhere near enough

00:01:24.120 --> 00:01:26.540
to offer those kinds of speeds

00:01:26.540 --> 00:01:28.940
to even just a couple of people.

00:01:28.940 --> 00:01:32.520
So how do they do it?

00:01:32.520 --> 00:01:33.560
Great question.

00:01:33.560 --> 00:01:37.580
And one that can be both simple and complicated to answer.

00:01:37.880 --> 00:01:41.620
In short, those insane speeds are thanks to the event

00:01:41.620 --> 00:01:45.400
having something called a caching server.

00:01:45.400 --> 00:01:48.980
Basically, when a game is first downloaded on the network,

00:01:48.980 --> 00:01:51.000
instead of the files just going straight

00:01:51.000 --> 00:01:52.220
to the downloader's drive,

00:01:52.220 --> 00:01:54.860
like let's say this laptop that used to be here,

00:01:54.860 --> 00:01:57.320
but instead I'll use this hard drive as a prop.

00:01:57.320 --> 00:01:59.740
Instead of them just going straight to this drive,

00:01:59.740 --> 00:02:03.220
they are first saved to a separate machine

00:02:03.220 --> 00:02:07.320
and then kind of relayed to the user.

00:02:07.320 --> 00:02:09.900
So then the next time someone wants to download

00:02:09.900 --> 00:02:14.140
that same game, let's say to this other hard drive,

00:02:14.140 --> 00:02:18.740
instead of pulling it off of Steam or Uplay directly,

00:02:18.740 --> 00:02:21.820
it'll save a ton of bandwidth to the outside internet

00:02:21.820 --> 00:02:24.200
by grabbing it off of that same server.

00:02:24.200 --> 00:02:28.280
This will help keep latency down for all of the gamers

00:02:28.280 --> 00:02:30.560
that are sharing that same connection.

00:02:30.560 --> 00:02:34.070
So the concept is simple,

00:02:34.070 --> 00:02:36.890
but when you get into sending up Nginx, DNx,

00:02:37.350 --> 00:02:40.110
DNS forwarding, dealing with HTTPS,

00:02:40.110 --> 00:02:42.830
and worrying about when to clear the cache,

00:02:42.830 --> 00:02:46.910
the actual deployment can get pretty confusing.

00:02:46.910 --> 00:02:48.170
Now, thankfully for us,

00:02:48.170 --> 00:02:50.090
there are a ton of different solutions

00:02:50.090 --> 00:02:52.410
that mostly revolve around the same built-in

00:02:52.410 --> 00:02:55.290
Nginx caching solution with the most up-to-date

00:02:55.290 --> 00:02:58.970
being the appropriately named Steam Cache.

00:02:58.970 --> 00:03:01.810
It's pre-compiled for Docker, making it quick to set up,

00:03:01.810 --> 00:03:04.950
and despite its name, there's actually a version of it

00:03:04.950 --> 00:03:07.150
that supports Steam, Origin,

00:03:07.350 --> 00:03:11.070
SiteGames, Battle.net, Frontier Launchpad, Uplay,

00:03:11.070 --> 00:03:12.790
and even Windows Update.

00:03:12.790 --> 00:03:16.450
So it's perfect for your next LAN or even general home use,

00:03:16.450 --> 00:03:19.950
because I mean, who needs Epic Games Launcher anyway, right?

00:03:19.950 --> 00:03:21.270
Yeah, right?

00:03:21.270 --> 00:03:24.150
So let's get started on exactly how it works then, shall we?

00:03:24.150 --> 00:03:27.710
For most people, standard one gigabit networking,

00:03:27.710 --> 00:03:31.130
along with a couple of,

00:03:31.130 --> 00:03:33.710
along with a couple of RAID zeroed hard drives

00:03:33.710 --> 00:03:37.630
will be more than sufficient, but come on,

00:03:37.830 --> 00:03:39.590
you guys know how we do.

00:03:39.590 --> 00:03:43.270
So we wanted to plan to allow every single writer

00:03:43.270 --> 00:03:47.250
here in the office to download games at the same time.

00:03:47.250 --> 00:03:50.590
So that would be about one Gigabyte per second

00:03:50.590 --> 00:03:52.050
of sequential read speeds.

00:03:52.050 --> 00:03:56.710
Now, that's child's play for today's high-end NVMe SSDs,

00:03:56.710 --> 00:04:01.230
like this one, but since we also need capacity,

00:04:01.230 --> 00:04:02.610
and that's not what you're gonna get

00:04:02.610 --> 00:04:07.610
from a single Optane drive, we decided on six RAID zeroed,

00:04:07.830 --> 00:04:11.530
480 gig SATA SSDs from Corsair

00:04:11.530 --> 00:04:14.250
that we pulled out of that dual machine build.

00:04:14.250 --> 00:04:16.430
Rip, rip in pieces.

00:04:16.430 --> 00:04:20.230
Now, it should be noted that a single drive failure here

00:04:20.230 --> 00:04:24.610
would result in a complete loss of all the data on the array,

00:04:24.610 --> 00:04:26.970
but it doesn't really matter

00:04:26.970 --> 00:04:29.610
since this server is not mission critical.

00:04:29.610 --> 00:04:32.670
All it's doing is caching readily available games

00:04:32.670 --> 00:04:33.510
and updates.

00:04:33.510 --> 00:04:36.450
We could easily throw a new drive in and redownload it all.

00:04:36.450 --> 00:04:37.590
The other key specs of our system,

00:04:37.590 --> 00:04:41.170
are it's 64 gigs of DDR4 RAM.

00:04:41.170 --> 00:04:43.970
Lots of RAM lets the server cache files in memory

00:04:43.970 --> 00:04:48.270
for quicker transfers and a 10 gigabit network card.

00:04:48.270 --> 00:04:50.590
So remember, even though we wanna download

00:04:50.590 --> 00:04:52.390
from this server at one gigabit,

00:04:52.390 --> 00:04:54.830
we want multiple people to be able to do that

00:04:54.830 --> 00:04:55.670
at the same time.

00:04:55.670 --> 00:04:58.310
So this one needs a bigger pipe.

00:04:58.310 --> 00:05:01.410
Now we're using an X540T2, but that's kind of older.

00:05:01.410 --> 00:05:02.550
It was cause we had it lying around.

00:05:02.550 --> 00:05:04.530
They're actually cheaper options these days

00:05:04.530 --> 00:05:06.810
from a Quantia and a SUSE.

00:05:06.810 --> 00:05:07.590
So then,

00:05:07.590 --> 00:05:10.110
now that we have a server primed for caching,

00:05:10.110 --> 00:05:13.150
we can get back to the software side of things.

00:05:13.150 --> 00:05:14.530
As I mentioned earlier,

00:05:14.530 --> 00:05:16.930
Steam cache comes in the form of a Docker container,

00:05:16.930 --> 00:05:19.830
which is kind of like a virtual machine,

00:05:19.830 --> 00:05:23.910
but instead of emulating the entire operating system,

00:05:23.910 --> 00:05:27.330
then with the specific software that we need on top of that,

00:05:27.330 --> 00:05:32.190
Docker can run specific software as if it's on its OS

00:05:32.190 --> 00:05:34.710
without running an entire separate OS,

00:05:34.710 --> 00:05:36.350
making it a lot more efficient,

00:05:36.350 --> 00:05:37.630
especially if you need to run

00:05:37.910 --> 00:05:40.170
multiple instances of the same software.

00:05:40.170 --> 00:05:41.750
And we will need to do that

00:05:41.750 --> 00:05:44.510
since each different service that needs caching,

00:05:44.510 --> 00:05:46.850
Steam, Origin, Battle.net, et cetera,

00:05:46.850 --> 00:05:49.860
will run in its own instance.

00:05:49.860 --> 00:05:52.260
Now we know all of that was a gross oversimplification,

00:05:52.260 --> 00:05:54.440
so we're actually gonna link a video below

00:05:54.440 --> 00:05:57.800
with a better explanation of Docker if you're into that.

00:05:57.800 --> 00:06:00.180
Docker can run on both Linux and Windows,

00:06:00.180 --> 00:06:02.220
but the Windows version has to actually

00:06:02.220 --> 00:06:04.740
virtualize the Linux kernel on top of Windows,

00:06:04.740 --> 00:06:06.140
so we're gonna stick with Linux.

00:06:06.140 --> 00:06:07.980
We went with Ubuntu Desktop 18.04,

00:06:08.420 --> 00:06:11.080
because we love reading butthurt comments

00:06:11.080 --> 00:06:13.040
from the Arch and Mint fanboys.

00:06:13.040 --> 00:06:14.900
Just kidding, love you guys.

00:06:14.900 --> 00:06:17.240
But don't worry, the guide that we're gonna have linked below

00:06:17.240 --> 00:06:20.180
will work on pretty much any flavor of Linux that you like.

00:06:20.180 --> 00:06:24.490
Now our first step is to get Docker up and running.

00:06:24.490 --> 00:06:27.570
Once you have it, make sure that you run your Docker commands

00:06:27.570 --> 00:06:32.550
either with sudo or by adding your user to the Docker group.

00:06:32.550 --> 00:06:36.920
Do not run any of this as root, please.

00:06:36.920 --> 00:06:38.020
Then, for our installation, we're gonna run it on Linux.

00:06:38.020 --> 00:06:38.660
We're gonna run it on Windows.

00:06:38.680 --> 00:06:40.720
We wanna cache all of the services

00:06:40.720 --> 00:06:43.100
that we use on a regular basis here at the office,

00:06:43.100 --> 00:06:47.180
which means that we're going to need six static IPs,

00:06:47.180 --> 00:06:48.800
one for each of them.

00:06:48.800 --> 00:06:51.120
Since this OS has a graphical interface,

00:06:51.120 --> 00:06:53.460
it's actually super easy to set up our IPs.

00:06:53.460 --> 00:06:57.000
We just need to navigate to network settings and enter them.

00:06:57.000 --> 00:06:57.840
Wa-bam.

00:06:57.840 --> 00:06:58.680
Wa-bam, just like that.

00:06:58.680 --> 00:06:59.720
I type pretty fast.

00:06:59.720 --> 00:07:03.060
Now we can start each of the caching Docker containers

00:07:03.060 --> 00:07:06.460
one by one, and then Steam Cache DNS,

00:07:06.460 --> 00:07:08.020
which will forward all of the IPs.

00:07:08.020 --> 00:07:11.940
All of the URLs that need caching to our server

00:07:11.940 --> 00:07:13.980
instead of the World Wide Web.

00:07:13.980 --> 00:07:15.380
Then, I mean, don't worry.

00:07:15.380 --> 00:07:18.900
Then if something isn't on our server, it won't just fail.

00:07:18.900 --> 00:07:20.620
If the content isn't cached yet,

00:07:20.620 --> 00:07:22.940
it will then get downloaded to the caching server

00:07:22.940 --> 00:07:25.900
and be forwarded to the downloader seamlessly.

00:07:25.900 --> 00:07:26.900
Cool, right?

00:07:26.900 --> 00:07:28.520
So theoretically then,

00:07:28.520 --> 00:07:31.080
we should be good to start downloading some games, right?

00:07:31.080 --> 00:07:31.920
Not quite.

00:07:31.920 --> 00:07:34.640
So we need to set the cache IP as DNS

00:07:34.640 --> 00:07:35.900
on all the systems we wanna use.

00:07:35.900 --> 00:07:37.360
Right, okay.

00:07:37.360 --> 00:07:40.880
So keep in mind that if you intend to run a solution

00:07:40.880 --> 00:07:44.080
like this long-term, it's a lot more elegant

00:07:44.080 --> 00:07:46.960
to set your primary DNS on your router

00:07:46.960 --> 00:07:49.320
to the IP of your caching server

00:07:49.320 --> 00:07:52.420
instead of setting up the DNS settings

00:07:52.420 --> 00:07:54.940
on a computer by computer basis.

00:07:55.880 --> 00:07:57.580
Don't worry, any unrelated traffic

00:07:57.580 --> 00:07:59.380
will go to the usual location.

00:07:59.380 --> 00:08:00.540
Okay, so we're ready.

00:08:00.540 --> 00:08:02.260
So here's the caching server.

00:08:02.260 --> 00:08:05.280
We've got our diagnostics panel running and all of that.

00:08:05.280 --> 00:08:07.200
And then we've got actually a couple of test victims.

00:08:07.200 --> 00:08:09.940
So first up, we've got this guy,

00:08:09.940 --> 00:08:11.220
one of Jake's test benches,

00:08:11.220 --> 00:08:13.300
and we're just gonna do a quick sanity check,

00:08:13.300 --> 00:08:14.780
make sure everything's working.

00:08:14.780 --> 00:08:16.580
This is actually a 10 gig client

00:08:16.580 --> 00:08:18.700
with an Intel Optane drive as its boot.

00:08:18.700 --> 00:08:19.940
So go ahead and hit that.

00:08:19.940 --> 00:08:21.520
I wanna hit it at the same time as you.

00:08:21.520 --> 00:08:24.160
Okay, three, two, one, go.

00:08:28.120 --> 00:08:29.740
Oh boy, Brandon, you're gonna have to get here

00:08:29.740 --> 00:08:31.880
in the next 23 seconds here.

00:08:31.880 --> 00:08:33.820
You got this?

00:08:33.820 --> 00:08:34.760
I'm at 200 megs.

00:08:34.760 --> 00:08:37.160
I'm coming down at 320 megs a second.

00:08:37.160 --> 00:08:38.000
Sir, you're at what?

00:08:38.000 --> 00:08:38.840
223.

00:08:38.840 --> 00:08:39.680
223?

00:08:40.520 --> 00:08:41.360
230.

00:08:41.360 --> 00:08:42.860
250.

00:08:42.860 --> 00:08:44.020
Oh, wow.

00:08:44.020 --> 00:08:44.860
300.

00:08:44.860 --> 00:08:46.520
Are you done the game yet?

00:08:46.520 --> 00:08:48.290
Seven seconds. Who's gonna win?

00:08:48.290 --> 00:08:49.350
Five. Two seconds.

00:08:49.350 --> 00:08:50.790
Two.

00:08:50.790 --> 00:08:51.630
And done.

00:08:51.630 --> 00:08:52.890
I'm done.

00:08:52.890 --> 00:08:54.050
Same time.

00:08:54.050 --> 00:08:54.890
Go check, go check.

00:08:54.890 --> 00:08:55.830
His will be done too,

00:08:55.830 --> 00:08:58.460
so we don't even have to see the actual speed.

00:08:58.460 --> 00:09:00.100
Wonder what the...

00:09:00.100 --> 00:09:01.740
That is disgusting.

00:09:01.740 --> 00:09:06.720
Okay, so we peaked out at 7.2 gigabit.

00:09:06.720 --> 00:09:08.200
7.2 gigabit?

00:09:08.200 --> 00:09:09.300
Yeah, from the cert.

00:09:09.300 --> 00:09:10.340
Show Brandon.

00:09:10.340 --> 00:09:11.180
Seven point, okay.

00:09:11.180 --> 00:09:12.540
So that was the peak, 7.2,

00:09:12.540 --> 00:09:15.710
and then it was kind of averaged around six.

00:09:15.710 --> 00:09:19.450
There's another 6.7 right there.

00:09:19.450 --> 00:09:21.830
Dang flabbit, that's insane.

00:09:21.830 --> 00:09:24.830
All right, for LOLs, I'm just gonna do PUBG

00:09:24.830 --> 00:09:26.940
and see if that one works.

00:09:26.940 --> 00:09:27.780
Oh, yeah, it is.

00:09:27.780 --> 00:09:28.620
It is.

00:09:28.620 --> 00:09:30.580
Okay, so with games like PUBG,

00:09:30.580 --> 00:09:32.520
where there's a lot of compression,

00:09:32.520 --> 00:09:34.360
you're limited by your computer.

00:09:34.360 --> 00:09:35.940
So if we look at the cores of this system,

00:09:35.940 --> 00:09:37.440
since this is an i9,

00:09:37.440 --> 00:09:40.580
you don't have a huge amount of single-threaded performance.

00:09:40.580 --> 00:09:42.020
So Steam will only use...

00:09:42.020 --> 00:09:43.660
It will only use a certain amount of cores,

00:09:43.660 --> 00:09:44.700
and it won't bypass that.

00:09:44.700 --> 00:09:45.520
So you'll see...

00:09:45.520 --> 00:09:46.360
90%.

00:09:46.360 --> 00:09:48.460
So we're capped out by our CPU right now.

00:09:48.460 --> 00:09:49.460
Yeah, decompressing.

00:09:49.460 --> 00:09:50.460
Not by our servers.

00:09:50.460 --> 00:09:51.300
So if you see here,

00:09:51.300 --> 00:09:53.580
there's two full cores that are being utilized.

00:09:53.580 --> 00:09:55.800
I think it's normally three or four that it'll use max.

00:09:55.800 --> 00:09:56.640
Right.

00:09:56.640 --> 00:09:57.480
And then past that,

00:09:57.480 --> 00:09:59.520
it won't use any more to not interrupt

00:09:59.520 --> 00:10:00.620
the rest of your system.

00:10:00.620 --> 00:10:01.460
Right.

00:10:01.460 --> 00:10:02.300
And I think it's more optimized

00:10:02.300 --> 00:10:04.960
for like four to eight core systems.

00:10:04.960 --> 00:10:06.920
16 cores is a little too much for Steam.

00:10:06.920 --> 00:10:08.880
So it's a less impressive demo,

00:10:08.880 --> 00:10:10.920
but it's definitely our best case scenario.

00:10:10.920 --> 00:10:12.020
And that means that we could have

00:10:12.020 --> 00:10:12.860
five systems.

00:10:12.860 --> 00:10:13.680
Yeah.

00:10:13.680 --> 00:10:14.520
Hitting it at the same time.

00:10:14.520 --> 00:10:15.360
Well, apparently seven now,

00:10:15.360 --> 00:10:17.000
based on what we saw there.

00:10:17.000 --> 00:10:18.760
So I guess conclusion time then.

00:10:18.760 --> 00:10:21.320
This may not be a solution for the everyday gamer.

00:10:21.320 --> 00:10:24.960
Like many people will only ever download each game,

00:10:24.960 --> 00:10:26.020
play it once,

00:10:26.020 --> 00:10:28.480
then delete it and never download it again.

00:10:28.480 --> 00:10:31.020
And it's a lot more user-friendly

00:10:31.020 --> 00:10:35.100
to just use Steam's own backup feature to a NAS

00:10:35.100 --> 00:10:36.560
if there's something that you, you know,

00:10:36.560 --> 00:10:39.240
think occasionally you might wanna re-download.

00:10:39.240 --> 00:10:41.780
But if you have a bunch of gaming aficionados

00:10:41.780 --> 00:10:42.660
in the house,

00:10:42.660 --> 00:10:45.460
or if you help run a local LAN gaming organization,

00:10:45.460 --> 00:10:48.700
we would definitely recommend giving it a shot.

00:10:48.700 --> 00:10:51.880
Especially if you have an old computer lying around

00:10:51.880 --> 00:10:56.610
that's just waiting to be given a new purpose.

00:10:56.610 --> 00:10:57.930
Speaking of just waiting,

00:10:57.930 --> 00:10:59.230
what are you waiting for?

00:10:59.230 --> 00:11:00.990
Try FreshBooks today.

00:11:00.990 --> 00:11:03.530
FreshBooks is the small business accounting software

00:11:03.530 --> 00:11:05.830
custom built for how you wanna work.

00:11:05.830 --> 00:11:07.390
It's the simple way to be more productive,

00:11:07.390 --> 00:11:08.230
more organized,

00:11:08.230 --> 00:11:10.610
and to get paid faster.

00:11:10.610 --> 00:11:12.190
FreshBooks allows you to create and send

00:11:12.190 --> 00:11:15.410
professional-looking invoices in less than 30 seconds.

00:11:15.410 --> 00:11:18.030
You can set up online payments with just a couple of clicks

00:11:18.030 --> 00:11:20.010
and get paid up to four days faster.

00:11:20.010 --> 00:11:22.210
They've got apps for iOS and Android,

00:11:22.210 --> 00:11:24.250
so you can take the entire FreshBooks experience

00:11:24.250 --> 00:11:25.090
with you on the go,

00:11:25.090 --> 00:11:27.710
and you can see when your client has seen your invoice

00:11:27.710 --> 00:11:29.750
to put an end to the guessing games.

00:11:29.750 --> 00:11:31.450
So for your unrestricted 30-day free trial,

00:11:31.450 --> 00:11:33.410
go to freshbooks.com slash techtips

00:11:33.410 --> 00:11:35.230
and enter Linus Tech Tips

00:11:35.230 --> 00:11:37.570
in the How Did You Hear About Us section.

00:11:37.570 --> 00:11:39.850
We're gonna have that linked below.

00:11:39.850 --> 00:11:40.970
So thanks for watching, guys.

00:11:40.970 --> 00:11:41.810
Dislike or like.

00:11:41.810 --> 00:11:43.310
Check out our other videos.

00:11:43.310 --> 00:11:44.690
Oh, wait, this is my tech wiki outro.

00:11:44.690 --> 00:11:45.530
Crap.

00:11:45.530 --> 00:11:47.190
Also, get subscribed.

00:11:47.190 --> 00:11:48.230
We have merch.

00:11:48.230 --> 00:11:50.650
And let us know if you wanna see a follow-up to this video

00:11:50.650 --> 00:11:54.230
where instead of like a jank-tastic,

00:11:54.230 --> 00:11:59.230
like rat's nest of SSDs in the back of a regular tower,

00:11:59.490 --> 00:12:01.550
yeah, in Jake's water-cooled test bench,

00:12:01.550 --> 00:12:04.450
if you wanna see us like set this up properly,

00:12:04.450 --> 00:12:07.470
get like every Steam and Origin game possible

00:12:07.470 --> 00:12:09.910
cached onto it and do some cool demos,

00:12:09.910 --> 00:12:11.790
maybe we should do like a LAN center.

00:12:11.810 --> 00:12:12.650
Oh.

00:12:12.650 --> 00:12:13.470
That'd be pretty sick.

00:12:13.470 --> 00:12:14.310
This would be perfect for that.

00:12:14.310 --> 00:12:15.150
Yeah.

00:12:15.150 --> 00:12:15.990
We might need more networking, though.

00:12:15.990 --> 00:12:16.830
Mm.

00:12:16.830 --> 00:12:17.670
Maybe.

00:12:17.670 --> 00:12:19.610
You wanna see us take it to the next level?

00:12:19.610 --> 00:12:20.990
Let us know in the comments below.
