Ask HN: How to guesstimate the needed resources of a server?

1 points by Pooge ↗ HN
Ever since I was a kid, I've always wondered what it took to host a World of Warcraft server with 1000 connected players.

I want to host my personal website/blog pretty soon, so of course that should really need little resources, but I'm wondering if there are some articles giving examples of common services and the resources you need to run them for an expected load. I have a server at home, so I'm thinking of deploying it on that.

9 comments

[ 160 ms ] story [ 693 ms ] thread
I don’t know of any such list unfortunately. What kind of hardware does your server have?
CPU is Intel® Xeon® Processor E5-2630 v4[1], and I have 64GB of RAM at 2133Mhz (if I'm not mistaken, but that sounds about right).

[1]: https://www.intel.com/content/www/us/en/products/sku/92981/i...

Holy cow! Nice gear, I’m jealous. In my past I’ve hosted several website and game servers from my home, never had anything near as nice as this for that.

I’m guessing the server is equipped with SSD:s? Back in the day I omce setup a local website and forgot to rotate session files created by PHP. Cost me a hard drive that did.

Are you building your website from scratch or do you intend using some platform? What kind of bandwidth do you have?

Yeah, I actually got it without storage for $250 from a company that migrated to "the cloud". I bought 4x2TB WesternDigital SSDs.

My bandwidth is 1Gb/s for each Ethernet port, but I'm using my ISP's router so I don't think it's the best, unfortunately. In the sense that, sure each port is 1Gb/s but if 1 port consumes that 1Gb/s, all the others will be throttled (even though the router supports "Up to 10Gb/s").

I haven't decided yet, but I'm probably going to use Astro[1]; lots of beautiful themes and easy set up.

[1]: https://astro.build/

Sounds like you got a really good deal on your hardware mate. Seems a little overkill for a simple website/blog, but I’m guessing you intend doing more with this?

I’m unfamiliar with Astro unfortunately so can’t really say too much about it.

What kind of speed do you get from your ISP? You get good latency?

Oh yeah I have all kinds of things hosted with Docker Swarm: Jellyfin, FreshRSS, Gitea that I use the most. Otherwise I also have TeamSpeak just for the sake of it. When needed I spin up an Assetto Corsa or World of Warcraft private server, too :)

Just did a speedtest on Fast.com and got 1Gbps download, 950Mbps upload and 0ms unloaded and 33ms loaded. Granted, that's not on my server.

Man I just keep getting more jelaous xD

1gps/1gps is my wet dream. The house I live in is tied into a pretty shitty ISP, didn’t know that though until after I bought the place. You live and you learn, someday I too will have a setup this beautiful.

Sorry I couldn’t be of any real help :)

Yeah it's a pretty good set-up I'm not gonna lie. Sometimes the server gets a bit noisy but it's not under heavy-load very often so it's very livable :) Maybe one day I'll put it in a datacenter or something (I wonder if it's even possible).

No worries, if you have any questions I'd be happy to help :)

This is a big topic but I can give you and rough way to make an educated guess. Develop your stack, content and configuration locally on a VM that has less resources than your physical server. Find tools to load test your setup. The most basic being Apache Benchmark but I am sure you can find other tools that would work with whatever you plan to do. Make many different passes / iterations of load testing, tuning application and web server configuration so that you find a balance of performance and keeping memory usage low. Keep this VM. When you are happy with the basic performance and security, deploy that setup to the web. Keeping the VM around you can test out any potential changes you wish to make and even test out deploying your web content before it is live. That could be "staging.yourdomain.tld". This is also useful should a provider for whatever reason close your account assuming you are colocating your server vs running it at home. Simply create an account somewhere else and push your configuration and content to a VM whilst you move your physical server. Nothing is lost, especially if you rsync your logs back to your local VM via cron or save them to a NAS or USB NVME. A VM is also a good place to test out security hardening changes, patches and so on.

You did not get into details of your stack, but I assume NGinx for the web server? The primary determining factor of memory and performance is number of workers and number of files and sockets each worker is permitted to open. This is a big topic however. It is unlikely we could go down the rabbit hole on HN. One of the rabbit holes is configuring things like vm.panic_on_oom = 2, vm.min_free_kbytes, vm.admin_reserve_kbytes and vm.user_reserve_kbytes so that the server reboots and self heals when people run it out of memory rather than depending on the OOM killa' though your goal should be to tune the stack so that the highest load is unlikely to do that.

If you want a personal challenge, configure the VM so that it has half the memory and CPU resources of your physical server. If you can make your site performant in the minimal VM, then it will surely perform on the physical server.