The Cloud is Just Someone Else's Computer

Publikováno: 17.2.2019

When we started Discourse in 2013, our server requirements were high:

  • 1GB RAM
  • modern, fast dual core CPU
  • speedy solid state drive

I'm not talking about a cheapo shared cpanel server, either, I mean a dedicated virtual private server with those specifications.

We were OK with that, because we were

Celý článek

When we started Discourse in 2013, our server requirements were high:

  • 1GB RAM
  • modern, fast dual core CPU
  • speedy solid state drive

I'm not talking about a cheapo shared cpanel server, either, I mean a dedicated virtual private server with those specifications.

We were OK with that, because we were building in Ruby for the next decade of the Internet. I predicted early on that the cost of renting a server with those specs would drop to $5 per month, and courtesy of Digital Ocean that indeed happened in January 2018.

The cloud got cheaper, and faster. Not really a surprise, since the price of hardware trends to zero over time. But it's still the cloud, and that means it isn't exactly cheap, because it is, after all, someone else's computer.

there-is-no-cloud

But wait … what if you could put your own computer "in the cloud"?

Wouldn't that be the best of both worlds, super fast and reliable connectivity, plus a nice low monthly price for extremely fast hardware? If this sounds crazy, it shouldn't – Mac users have been doing this for years now.

mac-colocation-2019-1

I suppose it's understandable that Mac users would be on the cutting edge here since Apple barely makes server hardware, whereas the PC world has always been the literal de-facto standard for server hardware.

mac-stadium-colocation

Given the prevalence and maturity of cloud providers these days, it's even a little controversial these days to colocate servers, but we've also experimented with colocating mini-pcs in various roles. But I'm still a little curious why there isn't more of a cottage industry for colocating mini PCs. Because I think there should be.

I originally wrote about the scooter computers we added to our Discourse infrastructure in 2016, plus my own colocation experiment that ran concurrently. Over the last three years of both experiments, I've concluded that these little boxes are plenty reliable, with one role specific caveat that I'll explain in the comments. I remain an unabashed fan of mini-PC colocation. I like it so much I put together a new 2019 iteration:

2016 — $6702019 — $820
i7-7500u
2.7-3.5 Ghz, 2c / 4t
i7-8750h
2.2-4.1 Ghz, 6c / 12t
16GB DDR3 RAM32GB DDR4 RAM
500GB SATA SSD500GB NVMe SSD

This year's iteration of the scooter computer offers 3× the cores, 2× the memory, and 3× faster drive. It is, as the kids say … an absolute unit. ????

2019-scooter-computer-top-interior-1

2019-scooter-computer-bottom-interior

It has a rather elegant dual-sided internal layout.

I vetted each box via my recommended burn in and stability testing and they all passed with flying colors, though I did have to RMA one set of bodgy RAM sticks in the process. The benchmarks tell the story, as compared to the average Digital Ocean droplet:

Per-core performance
sysbench cpu --cpu-max-prime=20000 run

DO Droplet2,988
2017 Mini-PC4,800
2019 Mini-PC5,671

Multi-core performance
sysbench cpu --cpu-max-prime=40000 --num-threads=8 run

DO Droplet2,200
2017 Mini-PC5,588
2019 Mini-PC14,604

Disk performance
dd bs=1M count=512 if=/dev/zero of=test conv=fdatasync hdparm -Tt /dev/sda

DO Droplet701 / 8818 / 471 MB/sec
2017 Mini-PC444 / 12564 / 505 MB/sec
2019 Mini-PC1200 / 17919 / 3115 MB/sec

Discourse rebuild
time ./launcher rebuild app

DO Droplet6:59
2017 Mini-PC3:41
2019 Mini-PC3:24

Power consumption could be a concern, as the 2017 version had a much lower 15 watt TDP, compared to the 45 watts of this version. That 3× increase in core count isn't free! So I tested that, too, with a combination of i7z, stress, and my handy dandy watt meter.

2019-mini-pc-i7z-testing

(idle login)800 Mhz10w
stress --cpu 14.1 GHz30w
stress --cpu 24.1 GHz42w
stress --cpu 34.0 GHz53w
stress --cpu 43.9 GHz65w
stress --cpu 53.7 GHz65w
stress --cpu 63.5 GHz65w
stress --cpu 123.3 Ghz65w

I'd expect around 10-15 watts doing typical low-load stuff that isn't super CPU intensive. Note that running current-ish versions of mprime jacks power consumption up to 75w ???? and the overall clock scales down to 3.1 Ghz … let me tell you, I've learned to be very, very afraid of AVX2 extensions.

(If you're worried about noise, don't be. This cooling solution is clearly overkill for a 65w load, because it barely spun up at all even under full core load. It was extremely quiet.)

So we're happy that this machine is a slammin' deal for $820, it's super fast, and plenty reliable. But how about colocation costs? My colocation provider is EndOffice out of Boston, and they offer very competitive rates, at $29/month for colocating a mini-pc.

endoffice-mini-pc-colocation

There are discounts for colocating more than one. I personally colocate three Mini-PCs for redundancy and just-in-case. Here they are racked up and in action. Of course I labelled the front and rear before shipping because that's how I roll.

endoffice-colocated-2019-mini-pcs

Let's break this down and see what the costs of colocating a Mini-PC are versus the cloud. Let's assume a useful life of say, three years? Given the plateauing of CPU speeds, I think five years is more realistic, but let's be conservative.

  • $880 mini-pc 32GB, 6 CPUs, 500GB SSD
  • $120 taxes / shipping / misc
  • $29 × 12 × 3 = $1,044

That's $2,044 for three years of hosting. How can we do on Digital Ocean? Per their current pricing page:

  • 32GB, 8 vCPUs, 640GB SSD
  • $160/month
  • $160 × 12 × 3 = $5,760

This isn't quite apples to apples, as we are getting an extra 140GB of disk and 2 bonus CPUs, but let's assume the CPUs can be partially consumed by multi-tenancy compared to our dedicated, isolated CPUs. Still, you pay almost three times as much for a cloud server. ????

Now, I'm not saying this is for everyone. If you just need to spin up a quick server or two for testing and experimentation, there's absolutely no way you need to go to the trouble and up-front cost of building and then racking colocated mini-pcs. There's no denying that spinning servers up in the cloud offers unparalleled flexibility and redundancy. But if you do have need for dedicated computing resources over a period of years, then building your own small personal cloud, with machines you actually own, is not only one third the cost but also … kinda cool?

your-own-personal-cloud

Why not do our part to keep the internet fun and weird!

If you'd also like to embark upon this project, you can get the same Partaker B19 box I did for $490 from Amazon, or $460 direct from China via AliExpress. Add memory and drive to taste, build it up, then check out endoffice.com who I can enthusiastically recommend for colocation, or the colocation provider of your choice.

Nahoru
Tento web používá k poskytování služeb a analýze návštěvnosti soubory cookie. Používáním tohoto webu s tímto souhlasíte. Další informace