
Run your own high-end cloud gaming service on EC2 (2015) - tosh
https://lg.io/2015/07/05/revised-and-much-faster-run-your-own-highend-cloud-gaming-service-on-ec2.html
======
benologist
You could use EC2 but Geforce Now has left beta and announced pricing and it
is much cheaper at $5/month.

Doing this on-premise is also pretty tantalizing - I watched a video recently
of Linus Tech Tips where he built a 64 core Threadripper and used virtual
machines to replace four physical computers in his home including two players
simultaneously gaming.

[https://www.youtube.com/watch?v=jvzeZCZluJ0](https://www.youtube.com/watch?v=jvzeZCZluJ0)

~~~
gruez
>Doing this on-premise is also pretty tantalizing - I watched a video recently
of Linus Tech Tips where he built a 64 core Threadripper and used virtual
machines to replace four physical computers in his home including two players
simultaneously gaming.

so basically a mainframe? I can't imagine it's economically viable though. a
64 core threadripper costs more than eight ryzen 3700x and clocks lower.

~~~
chrisseaton
> and clocks lower

And that's the core problem, isn't it? Aren't games notorious for being mostly
sequential workloads?

~~~
stordoff
I'd be interested to know if this has changed recently - the Xbox One and PS4
are both 1.6GHz/1.75GHz 8-core machines.

~~~
p1necone
When you're designing for that known console configuration you probably make
use of the extra cores if you _need_ it. And the really cpu intensive genres
(strategy games mostly) don't tend to get console releases.

As 4 core/8 thread machines become basically the minimum you can assume most
pc gamers will have we'll probably see devs making more use of multithreading
everywhere.

------
smartsystems
Yeah, do not do this. You'll end up with a $1000 bill from Amazon becuase you
forgot to shut it down and discover very quickly they don't care at all once
they already have your money.

~~~
scarecrowbob
FWIW, I did that once for an unrelated project and they ate the 1200 bill for
a running EC2.

I dunno if they'd eat that cost again, and I wouldn't try it on purpose.

But keep in mind that they have an incentive to do this: it's the cost of
acquiring users without scaring them about a possibly humongous bill.

I now have better billing alarms set.

~~~
Bombthecat
They should just add an "shutdown at cost x option" for private users at
least..

~~~
awinder
[https://aws.amazon.com/getting-started/tutorials/control-
you...](https://aws.amazon.com/getting-started/tutorials/control-your-costs-
free-tier-budgets/)

Under section 4, anyone can set up an aws cost budget

~~~
arianestrasse
Yes, you can set up a budget but it's only used for alerting. The services
will happily keep running and building up to that 1k bill if you miss the
alerts or don't react to them.

~~~
thaeli
Those alerts can invoke a Lambda that shuts the service down, which is a
ridiculously baroque solution but it's what you get.

~~~
arianestrasse
Wow, they really made it complex, didn't they? On one hand they advertise how
anyone can spin up a VM and connect to it but you still need to do some
serverless black magic to keep your budget in check. Anyway, thanks for the
heads up. I'll definitely try that out.

~~~
shoo
The aim of the game is for you to be depending on even more AWS services to
help you use the ones you already have

------
jophde
Or just spend $500 one time on a local rig one time that can max out 1080p at
100+frames instead of paying more per year for less.

I know this is for private use but the only point of game streaming is so that
companies can put ads in stream.

~~~
cle
My son plays about 6 hours of BeamNG and X-Plane a week. It’s much cheaper
(and faster) for him to play on an EC2 instance with Parsec at $.50/hr than to
invest the money and space in an equivalent gaming rig. And he can play it
wherever we go.

Setup details: I use Paperspace since it has an image with everything already
configured (doing this is surprisingly tricky, I was never able to get GPU
drivers installed and configured myself after hours of trying and also trying
various AMIs). It has auto-shutdown after an hour of inactivity. I use
VirtualHere to forward a joystick to the host, and Parsec for streaming. It
works great, and I pay $.50/hr plus $5/mo for storage. Over WiFi with the
cheapest Comcast plan, the latency is about 30 ms, which is fine for those
games.

~~~
friedman23
Have you tried alternatives like stadia and gefore now? I'm curious to hear
your thoughts. I have a gaming pc with a 4770k and a 1080ti. I was considering
upgrading it with the excuse that it would be my ML workstation (this is the
lie I tell myself) but with things like colab pro coming out I'm considering
if the future (for my use case) will just be renting hardware.

~~~
cle
I did try GeForce Now, since it has BeamNG. From what I could tell, it was
about the same as Paperspace, except I didn't have access to the underlying OS
so I couldn't install mods outside of Steam. It doesn't have X-Plane. It's
slightly cheaper and easier to use since you don't have to manage the
lifecycle of a host.

And Stadia doesn't have either game.

If you run your own host, you can play whatever game you want, and mod it
however you feel like. Otherwise, you're stuck with whatever curated stuff the
platform provides.

------
anaisbetts
If you're thinking about doing this, it's actually way easier with Parsec,
there are even scripts to set it up for you -
[https://github.com/jamesstringerparsec/Parsec-Cloud-
Preparat...](https://github.com/jamesstringerparsec/Parsec-Cloud-Preparation-
Tool). It'll also set up an auto-shutdown script that prevents you from
leaving it on and racking up a huge bill

~~~
boxerbk
Thanks for sharing Parsec! I'm the co-founder. It's really great that the
script is helpful.

~~~
anaisbetts
I really love the product, it's super fast and dead-easy to use. Have you folx
thought more about Android TV, I'd love to get it working on Shield in a way
that's usable (right now you get to a Windows login screen and you're stuck
b/c you only have a controller)

------
rcarmo
I have a comparison between NVIDIA's service and an equivalent setup on Azure
here:

[https://taoofmac.com/space/blog/2018/09/30/1600](https://taoofmac.com/space/blog/2018/09/30/1600)

The setup I used is here:

[https://github.com/ecalder6/azure-gaming](https://github.com/ecalder6/azure-
gaming)

...and has been kept up to date (it was annotated last month, and the config
is stable).

~~~
gnerix
> €1.4 an hour for the CPU/GPU alone, plus a couple more Euro for hard disk
> usage and long-term storage (usage was pretty high during setup, which
> accounts at least for half the amount)

The Azure solution sounds much more expensive than the prices quoted in the
article

~~~
rcarmo
At the time I did not have access to preemptible instances, which lowers costs
considerably. You did not quote the next few paragraphs...

------
MrGilbert
I have a gaming / home server at home. Using Unraid, it serves a gaming vm, a
NAS, smart home (with home-assistant and Node-RED), Ad-Blocking (secondary Pi-
Hole), a media server (Plex) and a Unifi-Controller.

It‘s based on a Gigabyte x470 and a Ryzen 5 2600. The rig is watercooled
(using ZMT tubing), which makes it super silent (and I don‘t need a heater in
my office any longer. It‘s amazing how efficient watercooling is - yet, the
heat still has to go somewhere).

The gpu is a Sapphire Pulse Vega 56. All in all, the complete rig consumes 80
watts in idle, and 130 watts when I‘m using the gaming vm for surfing. When
gaming on it, consumption can go up to a reasonable 500ish watts.

I‘m also using a Thinkpad x230 as my „roadwarrior“.

While „the cloud“ might be cheaper, I love to have everything „at home“.

------
ghouse
The paradigm pendulum continues to swing back and forth between geographically
centralized and distributed computing.

------
bjornjajajaja
Curious if it would be possible to do this setup with VR as well.

~~~
crummy
I don't see any reason why it shouldn't be possible, but VR is extremely
latency sensitive so I think the experience would suffer pretty badly.

~~~
erinaceousjones
VR streaming over local 1gbit ethernet is certainly possible -- I use Virtual
Desktop to stream PCVR to my Quest and I wouldn't say the latency is
noticeable, at least for me anyway. It's not really playable on 2.4GHz (so,
max ~300mbit/s) wireless but is nearly flawless on 5GHz (max ~840mbit/s ?).
Although the stream itself maxes out at 50mbps. Reported stream latency is
about 15ms.

FPS games like Skyrim work great, even latency-sensitive games which require
quick reactions like Thumper do pretty well. I get lower latency / better
image quality using Quest+VD than I do a standard 1080p stream on my Steam
Link.....

I think that the VR video stream is already a 180 degree stereoscopic format
helps with the latency; you're only ever looking at a subset of the stream so
when you move your head around it's the same latency as local VR.

Only noticeable thing is if you move your head really quickly to over your
shoulders it can take a few milliseconds for the footage to appear.

------
shog_hn
This is a nice article to prove it can be done, but honestly I would rather
setup a dedicated gaming rig. If you're serious about gaming you'll soon rack
enough hours where your EC2 Spot costs exceed the initial investment in your
own hardware.

Also the open UDP and TCP to 0.0.0.0/0 in the security group made me cringe.
At least set it to your current IP /32 and perhaps set a script that watches
your public IP and updates the SG automatically when it changes.

~~~
ineedasername
I think a dedicated rig + Hamachi or other VPN of choice is an ideal option
for most use cases.

------
wbraun
I followed this tutorial when I Fallout 4 first came out and I had not yet
built a desktop. It worked pretty well and, given spot prices, was pretty cost
competitive with a gaming desktop if you only cared about one or two games.

AWS inbound traffic is free but persistent storage is not so I downloaded the
entire game whenever I spun up the AWS instance, which probably happened 10+
times. I still wonder how much that cost Steam in terms out outbound
traffic....

------
mentos
Game developer here, I'd love to have a cloud gaming PC as a workstation for
development. Anyone know of any companies/services that offer this?

~~~
tommsy64
Parsec[1] is a Discord-like game-streaming host and client. I've used it a
little and it seems to work just as well or better than Steam Stream or
GeForce Now. Furthermore, it has virtually no setup and works across WAN
without a VPN.

[1] [https://parsecgaming.com/features/](https://parsecgaming.com/features/)

~~~
boxerbk
Thanks for sharing Parsec!

------
Havoc
> <50ms

I don't think that's gonna be much fun. Especially not if you're used to
playing on a powerful local machine

~~~
p1necone
My experience is that anything with direct camera control via mouse doesn't
feel good unless you're streaming from a machine on a local network, but if
you're using a controller it's not really noticeable.

~~~
stordoff
It's probably going to vary from user to user - even streaming on my local
network (1Gbps wired), playing with a controller feels less than great.

------
dang
Discussed at the time:
[https://news.ycombinator.com/item?id=9364748](https://news.ycombinator.com/item?id=9364748)

also
[https://news.ycombinator.com/item?id=9864534](https://news.ycombinator.com/item?id=9864534)

------
Ideabile
Same year I release this video
[https://www.youtube.com/watch?v=fB8htu_Bxpo](https://www.youtube.com/watch?v=fB8htu_Bxpo)

Is basically the same implementation, I must say that keep the instance open
const me a bunch of money in the end.

------
acd
Its good for occasional cloud gaming. Otherwise I hope the PC game industry
will remain alla carte dinner instead of all you can eat buffet cloud gaming.
Reason being income sent to the game industry its healthier to pay for
computer games directly to the developers.

~~~
bigdict
It's "a la carte". If you want to be extra fancy, you include the accent on
the "a".

~~~
dmos62
A la carte is French, and alla carta is Italian. Alla carte is both :)

------
jmakov
So is Steam so optimized or how come VNC/x2go is still reloading the screen so
slowly?

~~~
Nextgrid
I believe they use the GPU for video encoding, while most Remote Desktop
solutions are CPU-only. Also, I wouldn't be surprised if the encoding used by
Steam is lossy, which is fine for games and fast-moving video but would be
completely unusable for text.

~~~
nickflood
Most remote desktop solutions don't even use video and instead transmit parts
of the screen that have changed as still images.

When not consuming media content this approach is better because the fine
details look more crisp. In video the finer details are limited by a bitrate &
key frame frequency.

------
JOnAgain
I tried doing something like this last year. It took a long time to get right.
When it finally worked, the bill was far higher than i had estimated due to
bandwidth.

Overall, i love the idea, but it was a huge pain and not worth my time.

------
myhf
This still seems like a better option than Stadia or GeForce Now, because it
should support all PC games (including store-exclusive titles like
Satisfactory, Untitled Goose Game, and The Outer Worlds).

------
CapacitorSet
>$0.11/hr Spot instance of a g2.2xlarge

I'm not an AWS user, but don't spot instances risk being shut down/paused/etc
at any moment? It seems like a bad solution for remote gaming.

~~~
vijaybritto
Yes they may get terminated within 2 minutes of creation. Thats why they are
cheaper. Still this is a demo of what can be done and what's possible now.
This can never be used for any reasonable gaming as its volatile.

------
arcticbull
Haha I posted this years ago. Glad it’s still helpful! Funny it’s made it’s
way back to the front page so many years later.

------
lawrenceyan
Using a commercial service like Google Stadia would be far cheaper than this
no?

------
ramon
Lightsail for fixed pricing a month.

~~~
Operyl
Does Lightsail have GPU instances?

~~~
ramon
FPGAs and GPUs only with EC2
[https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amaz...](https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-
lightsail-frequently-asked-questions-faq)

------
Joyfield
mbit != Mbit.

------
NicoJuicy
I'm not sure, but cloud gaming seems to be one of the "new" overrated hypes.

Based on that it's done before and didn't get that far ( Gaikai and OnLive ),
but nobody seems to remember that.

~~~
tmerr
Another way to view it is that like electric vehicles cloud gaming is not a
question of if, but when.

OnLive was released when most internet connections were still crummy, and
before HD capable computers were embedded in TVs, smartphones and tablets.
Despite all of that it still worked pretty well, but at that time I thought if
I can run the game on my desktop why bother? Nowadays I don't have a gaming
desktop capable of the newest games, so I think about it differently.

~~~
NicoJuicy
Electric cars didn't even take off yet. It's 1-2% of total car sales and
valued like 90%

There is also a lot of gouvernement subsidies die electric cars and the range
was not good.

There internet in those days was as good as it is now in Western countries.

We'll c, but I'll be happy to place an online money bet.

------
fzaninotto
I'm really surprised that none of the cool kids here comment about the
astronomical ecological cost of such rigs.

Reminder: IT is responsible for nearly 4% of CO2 emissions worldwide [1].
Video streaming represents 60% of that [2].

In a nutshell, cloud gaming is like switching on an oven at full power with
the door open. If a majority of people use that kind of solution, the
catastrophic effects of global warming will be even worse.

The true problem is that we're not paying the real price of AWS and other
cloud services. We're expecting our children to pay for the ecological impact.

[1]: [https://theshiftproject.org/wp-
content/uploads/2019/03/Execu...](https://theshiftproject.org/wp-
content/uploads/2019/03/Executive-Summary_Lean-ICT-Report_EN_lowdef.pdf) [2]:
[https://www.dw.com/en/is-netflix-bad-for-the-environment-
how...](https://www.dw.com/en/is-netflix-bad-for-the-environment-how-
streaming-video-contributes-to-climate-change/a-49556716)

~~~
bskap
Does that account for data centers getting built primarily in areas with easy
access to renewable energy? I suspect the fuel mix for your average Amazon
data center to be considerably greener than running the same power rig out of
your home. I don't know if it's enough to offset the cost of the networking
equipment between the DC and your house, but it's not so clear cut that this
would be worse than buying a gaming rig and running the game yourself.

