Hosting a server at home with 50 people.

  • Please make sure you are posting in the correct place. Server ads go here and modpack bugs go here
  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

PsionicArchon

New Member
Jul 29, 2019
147
0
0
I should have been more clear now that I reflect on what I wrote. The thread that the game uses for all in world logic is single threaded. Tasks like networking, audio, and rendering can be split into different threads but that can introduce issues. So for the most part, Minecraft is single threaded. Having a second core to offload networking and other lightweight tasks to can be beneficial and even necessary on larger server. Beyond 2 cores though, I would expect to see little difference in performance with each additional core.

As I understand it, the Minecraft game loop is single threaded. There is not a thread per user or anything like that. Additional threads might be used for supplementary tasks by the OS, but increasing the number of CPU cores will not help your ability to process more players, more ticking entities, or anything like that.
The CPU graphs presented actually seem to show a rather inefficient situation of a single thread being scheduled across multiple cores - ideally you would get better overall performance if a single core was dedicated to the minecraft principal gameloop thread, and was running at 100%.

Everything else stands however. The bytes/persecond coupled with the data requirements of mods are what is going to make scaling hard. Vanilla is one thing, but data hungry mods are difficult to account for especially, as with MFFS, they scale per usage.

By that logic, a basic Core2Duo running at smiler speeds would adequately support my current modpack, yet it does not. Multicore usage increases as demand on the server increases proportionally. This is far less efficient then dedicating individual tasks to individual cores however, still better then forcing a single core to run every server calculation.

If you don't believe me (which appears to be the case) you can test the Minecraft single core myth yourself. Grab VMWare or Virtual Box, set it to a single core and, install your OS of choice. For my tests I installed a 64bit copy of Windows XP I had laying around. I was unable to produce a stable tick rate under a single core. Alternatively, tinker with the processor affinity.

Here are some basic tests having done just that: https://i.imgur.com/A11IhZI.png It does not paint a pretty picture. I could barely type out the TPS command so generating chunks is out of the question.
Two cores: https://i.imgur.com/NvsFtvc.png Only a marginal increase in tickrate. I'm not generating chunks under this load either.
With all four cores activated: https://i.imgur.com/CPzKpJ5.png I've circled a few things. Red circles indicate idle activity. Blue circles indicate chunk generation. The increase is near symmetrical across every core, even a few of the extra threads are being used. A single thread yes, but scaled across multiple cores.

If you're hosting a server, and for what every mysterious reason you wish to leave yourself with less headroom don't let me stop you. In layman's terms, you have two full glasses of liquid, and four empty glasses of equal size to the first two glasses. If you pour everything into a single glass some of the liquid is going to spill over. If you pour everything into two glasses they'll both fill up without spilling however, there's no more room for anymore liquid. What do you propose is going to happen when I come along with two more glasses of liquid? Now, if distributed across the four empty glasses you're left with plenty of room for more liquid. It's a rather juvenile explanation, but it works.

I don't have a machine with sixteen cores or multiple physical processors so I can't test against that platform. So long as you're using a modern OS with an updated version of java it should still scale across the two chips.
 

loboca

New Member
Jul 29, 2019
416
0
0
assuming each user will use a max of 256kbps, you're going to need around 128mbps if you intend on sustaining fifty concurrent users.
Not to nitpick, and I generally agree with you, but your math is off by a factor of 10. 256kbps * 50 is 12.8mbps
 

DZCreeper

New Member
Jul 29, 2019
1,469
0
1
By that logic, a basic Core2Duo running at smiler speeds would adequately support my current modpack, yet it does not.

The Core2Duo is on an entirely different, much older architecture. You can't directly compare that chip something more modern like your I7 chip which I would hazard to guess is it at least a 2600K. Also, if running a server on a single core on an I7 chip is causing TPS issues on a fresh world, you have a problem somewheres else.
 

PsionicArchon

New Member
Jul 29, 2019
147
0
0
Not to nitpick, and I generally agree with you, but your math is off by a factor of 10. 256kbps * 50 is 12.8mbps

I was using megabits not megabytes. Datacenters usually go by megabits when advertising their bandwidth. I did this to illustrate that not even a one hundred megabit line (common for most budget plans) is going to sustain fifty users even on a good day.

The Core2Duo is on an entirely different, much older architecture. You can't directly compare that chip something more modern like your I7 chip which I would hazard to guess is it at least a 2600K. Also, if running a server on a single core on an I7 chip is causing TPS issues on a fresh world, you have a problem somewheres else.

Quite a few people believe that their Core2's are good enough thanks to the whole single core single thread myth. The world we're looking at is a rip of my old server world. It's quite large. I'm going to assume that at fifty users a world will expand quickly so this should be a good estimate. Anyone who believes for an instant that two cores give you enough headroom for a large modded server hasn't been running them for very long.
 
Last edited:

loboca

New Member
Jul 29, 2019
416
0
0
So did you mean 256KBps (256 KiloBytes per second) or 256Kbps (Kilobits per second) for the average user? because either way, if you stay in the same units, 256,000 x 50 is 12,800,000.

And I'm pretty sure you meant to refer to datacenters, not databases.
 

PsionicArchon

New Member
Jul 29, 2019
147
0
0
So did you mean 256KBps (256 KiloBytes per second) or 256Kbps (Kilobits per second) for the average user? because either way, if you stay in the same units, 256,000 x 50 is 12,800,000.

And I'm pretty sure you meant to refer to datacenters, not databases.

Correct. Bit of a hasty typo. I've been setting up a Prism database for the past two days so I have databases on the mind :). To be frank, I'm not sure where my mind was in my initial post. Using a bit calculator leaves me at 102.4mbps not 128. This is based off of the assumed 256kb/s (Kilobytes not bits). Hopefully, now that I've had some sit down time to re-read my posts, this makes more sense to you. You're going to need a datacenter plan that allows for 1Gbps if you expect to see fifty concurrent users on simultaneously. Sorry for the initial confusion, I was juggling several activities along side writing that post.
 

GreenZombie

New Member
Jul 29, 2019
2,402
-1
0
Performing emperical tests is good science, and there is no doubt that adding cores to a minecraft server helps as there are a lot of tasks that an asynchronous operating system can perform in parallel.
However, it is nonsesical to claim that a single thread can 'scale across multiple cores'. In fact, it is the goal of good thread schedulers to keep threads on the same core: each core has its own local cache, and sceduling a thread on the same core then maximizes the chance that that cores' cache will contain data relevent to the thread in question.
This does not detract from the observation that a minecraft server does run better with more cores.
 
  • Like
Reactions: ThatOneSlowking

immibis

New Member
Jul 29, 2019
884
0
0
Assume each person uses 2Mbps.

You're net connection will not support 50 people. Sorry.

What you can do though is contact a data center(s) and ask if you can host your box on their grounds. Some Data centers do offer deals like that, where your hardware, their connections/power.

I recommend doing that as your internet connection is no where near as much as what's needed
2 Mbps is high even for Minecraft. Unless you have a mod that is wasting bandwidth (which has happened in the past; I've seen Modular PowerSuits, Mekanism and JABBA spam stupid amounts of data, like 2 Mbps per player) expect to use around 20 kBps (160 kbps). 50 (400) at most. Players will need more than this to load chunks when they initially connect, teleport, or travel quickly.

Assuming 10 Mbps connection (clients mostly download stuff, so servers mostly upload stuff, so your upload matters more) and 50 kbps per player, you could handle 200 players on that connection. So the connection probably won't be a problem.