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