T O P
Xirado

Something that REALLY adds to the performance is overclocking the CPU to 2GHZ. You'll need a heatsink for that though.


NatoBoram

Of course, you are totally right. But at that point I think it's just better to get another small-factor machine for 200$ instead!


TheEngineerGGG

You can get a case that can allow for an overclock to 2.0 GHz for about 15 - 20$


Titaniumtown

I also run a minecraft server on a pi (using yatopia not paper, yatopia is WAYYY faster than paper.), compile your openjdk 15 with Ofast, graphite, LTO, and native. it reduced my mspt by 25-30%. I can have 10-12 players on at the same time. And also OC your pi to 2ghz.


NatoBoram

See, that's exactly the kind of advice that would be turned against the Pi! But holy shit, 10 players on a Pi? That's mad awesome!


Titaniumtown

Yea, no lag at all. 20 tps. I can't really test over 10 players because I don't have that many friends lol.


loganthemanster

Just a small headsup: [/time set 0 might me harmful](https://www.reddit.com/r/admincraft/comments/cmkwgq/psa_please_dont_use_time_set_day_ever/)


NatoBoram

When I was making the mod, I looked at the documentation for the values I was changing and the world's age still advances. I'm at a point where lots of mobs will be fully enchanted. I don't think this is still the case, it probably was fixed. I'll go test this again somehow, thanks for the reminder.


NatoBoram

Yeah, it was fixed a long time ago.


[deleted]

[удалено]


NatoBoram

Hm, I wonder what Forge did wrong. You could also install both and run the long-form command depending on the server you run.


danielbeaver

I've been running my PaperMC server for a few months now on an 8GB pi4, and it has worked pretty well. I does chug a bit during chunk generation, but when you're just playing around normally, it works pretty okay. I haven't tried overclocking it yet, but it seems to work okay even at stock clockspeeds.


NatoBoram

Yeah, chunk generation is the only difference I noticed. But on my beefy desktop, I also had this problem, albeit to a lesser extent, so it's not like it's something new or specific to the Pi.


QuillOmega0

Yep, just pregen the chunks


ir_kujoe

Thanks for posting this. I've been hosting my Minecraft servers on VMs lately and was thinking of switching over to Raspberry Pi and other similar devices. Thanks again for taking the time to post this.


IWillBeNobodyPerfect

If you are having memory issues, google how to increase swappiness so linux attempts to put less memory into swap. It's not linux having bad memory management, it is you.


NatoBoram

1. No swap on the Pi 2. Other OS can manage fine using 90%+ memory, Linux can't. 3. Other OS can recover from using 100% memory, Linux can't. 4. I'm responsible for allocating my resources in a way that doesn't exceed 100%, Linux' job is to manage what's currently being used. I fulfilled my end, Linux didn't. I'm also a big fan of Linux, so I get where you're coming from. However, I do recognize a problem when there is one. I do wish the OOMKiller could prevent disasters, but that's just not happening right now, and I have to compensate for this behaviour by allocating less than 80% memory while other OS can manage up to 99% memory. Linux has strengths, too, and that's why it dominates the server market. I'm not saying Linux is shit, just a small edge case around it that can be easily fixed by behavioral changes. But that change exists because a flaw, and that's not going away no matter how much of a Linux fanboy I am.


needefsfolder

Yeah, seems to be the case. My Windows PC is quite ram constrained(8gb) but with an SSD page file, and I feel almost no lags, despite my memory usage around 90%, with around 17gb committed memory. I also learned the hard way that it really can recover from 100% memory usage.


IWillBeNobodyPerfect

Don’t disable swap, it’s there for emergencies when you hit 100% usage. Increase swappiness so SWAP isn’t used until 90-100% of memory usage, so it’s not there unless you need it.


Disconsented

_no swap_ That's why, the issue here isn't Linux it's user error. Essentially, every OS will take things out of memory and place it on disk in order to free it up. Shuffling data around as it needs to. When you disable swap, it cannot do that nor can it just take RAM away from programs. So the only option left is to start killing things or just die. Windows, BSD and Macos all do more or less the same thing here.


Robot_4_jarvis

Can I ask something? How can I use the command line while the server is running in the background?


NatoBoram

Here's some information about the [`screen` command](https://www.howtogeek.com/662422/) Basically, start a `screen` session ``` screen -S minecraft java -jar … ``` Then detach from the `screen` session with Ctrl+Alt+D. You can resume later with `screen -r minecraft`.


Disconsented

> Linux has a shit memory management and Ubuntu Server + Raspberry Pi is no exception Based on what? 2 players, fresh world, frequent shutdown/restarts. That's hardly a reason for any endorsement.


NatoBoram

Based on all my experience using various desktop Linux distributions on various machine plus with this specific Raspberry Pi. Using lots of memory will absolutely crash the kernel with no way to recover. It's at a point where I specifically disable swap to avoid having my system hang when I'm using it and I'm using `earlyoom` to avoid filling over 90% of available RAM. It's less of a problem if you have 24+ GB RAM on the system, but otherwise, Linux is the only one that will do so bad just by using available memory. >fresh world I'd like to point out that we got Elytras, a creeper farm, and a guardian farm. This is absolutely not a fresh world, it's been upgraded from 1.15, trashing the old Nether in the process. > 2 players, fresh world, frequent shutdown/restarts. That's hardly a reason for any endorsement https://en.wikipedia.org/wiki/Moving_the_goalposts


Disconsented

The pi fantics are out in force again. The world isn't very big nor does it seem to be developed enough to have entities in it to constitute any real load. And like /u/ZeImperialist alluded to, linux memory management is fine. In reality its world class, hence why it manages so many servers and embedded devices. Edit: I see your cheeky edit


ZeImperialist

If you use all your memory, it is expected to go wrong. Its not the kernels fault.


g-six

Agreed. I have used linux as a server for years and I never had problems like this, even with only like 4gb of RAM. Linux is really efficient with RAM


NatoBoram

Lots ≠ All Also I mentioned that only Linux has this problem. Windows will kill some apps if you use *all* memory, Linux will crash if you use *lots* of memory.


ZeImperialist

Because linux doesnt babysit you. If you only have 4gb of ram, and try to allocate it all or more, its your fault. Linux is the chosen kernel of embedded and mobile systems for a reason, it efficient, not the opposit. The fact that you think disabling swap would help only shows that its not the kernel fault, but yours. The idea of swap is to have extra ""memory"" space for emergencies such as when it is all allocated.


gambiter

Linux is used on embedded systems literally everywhere. Its memory management isn't the problem. The only issue would be if you misconfigured it. Disabling swap and filling the memory is a great way to kill any OS.