You are not logged in.

#1 2020-01-09 07:08:18

Lukario45
Member
Registered: 2020-01-09
Posts: 3

[SOLVED]Minecraft Server Running INSANELY slow

Debated on posting this here or on a Minecraft forum, decided on here because I assume I did something wrong installing Arch Linux. I can move to their forums if necessary.

I’m a computer science major, and I am *finally* getting into Linux. I am choosing Arch Linux because it is literally forcing me to learn everything about it. I installed Arch Linux today, following the guide, using an image updated January 1st, 2020. I’m going to be repeating the install at least 3 more times tomorrow (different computers), and if all goes well I’m going to dual boot on to my main computer.

The machine I installed on is only for a Minecraft server, as stupid as it sounds, just learning the OS, install process, etc. The server runs extremely slow, especially when it comes to start up. It takes more than 200 seconds to start up.

The computer specs are:
AMD Athlon 2850e
4gb DDR2 RAM.
~4gb of swap (I feel like I messed swap up though)
500gb hdd

3gb of ram is allocated to the server

I realize that the hardware it’s self isn’t very powerful, but I also distinctly remember running a Minecraft server and the actual Minecraft game at the same time when I still ran windows 7 on this machine. It ran poorly, but never 200+ seconds for startup.

I’m not really running anything else on it. I do have NetworkManager and OpenSSH installed and running. No GUI. Running craftbukkit for the newest version of Minecraft, vanilla though, no mods or plugins.

Did I mess something up when I installed Arch?

Last edited by Lukario45 (2020-01-10 01:37:42)

Offline

#2 2020-01-09 08:45:33

schard
Member
From: Hannover
Registered: 2016-05-06
Posts: 933
Website

Re: [SOLVED]Minecraft Server Running INSANELY slow

Minecraft is running in a JVM and thus has a considerable overhead compared to natively compiled programs.
It is no surprise that it runs slow with your hardware, as it is about at the minimum hardware requirements I tested for my Minecraft servers.
Currently I am running a minecraft server on an old ThinkPad X1 Carbon with 8 GB RAM and a Core i5 CPU.
Furthermore an HDD will slow down things even more, because it has slower i/o than a SSD.
What you really need to consider is more RAM, since you can considerably speed up your Minecraft server when running it from a tmpfs.
If you "feel" like you messed up the SWAP setup, please provide the outputs of

lsblk
free
cat /etc/fstab

Last edited by schard (2020-01-09 08:46:12)

Offline

#3 2020-01-09 14:19:32

Lukario45
Member
Registered: 2020-01-09
Posts: 3

Re: [SOLVED]Minecraft Server Running INSANELY slow

Hey! Thanks for the reply! Sorry for the late response, I accidentally fell asleep before I intended. Unfortunately more ram is not an option as the motherboard of this PC only supports 4gb. I have another PC with a considerably better processor I can run the server from. Still only 4gb max ram. Think I can run a small scale web server on this?

Here are the outputs:

[lukario45@gen-mc ~]$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 465.8G  0 disk 
├─sda1   8:1    0   190M  0 part 
├─sda2   8:2    0   3.8G  0 part 
├─sda3   8:3    0  18.4G  0 part /
└─sda4   8:4    0 443.4G  0 part /home
[lukario45@gen-mc ~]$ free
              total        used        free      shared  buff/cache   available
Mem:        3773512      883944     2233908         936      655660     2669028
Swap:             0           0           0
[lukario45@gen-mc ~]$ cat /etc/fstab
# Static information about the filesystems.
# See fstab(5) for details.

# <file system> <dir> <type> <options> <dump> <pass>
# /dev/sda3
UUID=86df87bb-5b9e-4253-8645-ec27e36885ba       /          btrfs            rw,relatime,space_cache,subvolid=5,subvol=/0 0

# /dev/sda4
UUID=b4e0d75b-430d-4d1f-82bf-634e311b8477       /home      btrfs            rw,relatime,space_cache,subvolid=5,subvol=/0 0       

The first partition was meant to be a boot mount, but I failed at that one too. It’s my first day lol

Offline

#4 2020-01-09 14:37:52

schard
Member
From: Hannover
Registered: 2016-05-06
Posts: 933
Website

Re: [SOLVED]Minecraft Server Running INSANELY slow

Well, you missed to add /boot and the SWAP partition to the fstab.
That's no problem if you still want to use either of it. Just add the corresponding entries following the Wiki.
Just remember to copy any possible kernels, initramfs and bootloader config from your current root partition's /boot directory to the mounted /boot partition then.

Last edited by schard (2020-01-09 14:38:18)

Offline

#5 2020-01-09 15:16:24

romstor
Member
Registered: 2018-08-18
Posts: 45

Re: [SOLVED]Minecraft Server Running INSANELY slow

schard wrote:

Well, you missed to add /boot and the SWAP partition to the fstab.

/boot can be on btrfs root. Since this is an old machine (i.e. BIOS), there is no need for a separate partition (and the machine seems to be booting :-))

Regarding swap -- I think it is very important for a machine with 4GB running memory-hungry Minecraft server JVM to have SWAP mounted and on. Check with the "swapon --show" and "free" commands. After you run Minecraft server some swap must become utilized. Swap size should be at least the size of the memory in this case, but any size will help.

Install "htop" if you haven't already -- it is very convenient view of resource utilization while running Minecraft.

P.S.: You didn't mess up installing Arch - if it boots - it is installed :-)

P.S.S.: Using NetworkManager is fine, it is not that heavy. If you want to make it leaner (just to be clear - you don't need to) you can configure systemd-networkd and systemd-resolved, especially if your machine has wired network. These come pre-installed with systemd. But if you current setup works - I suggest leave it be. Your only real problem here is java that spigot is developed in. There is not much you can change about that. I'd try putting in SSD next if you can't add RAM.

Last edited by romstor (2020-01-09 15:26:43)

Offline

#6 2020-01-10 01:37:05

Lukario45
Member
Registered: 2020-01-09
Posts: 3

Re: [SOLVED]Minecraft Server Running INSANELY slow

I am setting this to SOLVED

romstor wrote:

Install "htop" if you haven't already -- it is very convenient view of resource utilization while running Minecraft.

This ^^^ I ran it and watched it while the server was booting up, which is where most of the issues took place! I turned SWAP on, though im still working on adding it to fstab so it does it itself, but the server was never using more than 800mb of ram. I suppose its because I don't have any players yet, but ill have like 5 players max at a time. The CPU usage was at a SOLID 100% usage for the entire start up. Another machine I had sitting around (much better machine but I dont have enough DDR3 around to make it function) had an AMD Athlon II in it, and I slapped that into this machine. By some stroke of luck the new CPU is compatible with this system. 2 core processor now. Server start up went from 240s to 62s. Significantly better (but still bad, meh it is what it is). Unfortunately BIOS won't let me overclock :-( 

Im going to see if I can get another machine running tomorrow and compare. My Intel processors are a bit stronger, but for the time being this will do though.

Thanks everyone!

Offline

Board footer

Powered by FluxBB