Minecraft server?
I don't know if it would be better to upgrade my current Linode 512 to a Linode 2048 so I have 1GB of RAM for the Minecraft server and 1GB for my WordPress blogs and the operating system.
Or if I should order a Linode 512 for my WordPress blogs and all that and then get a separate Linode 1536 for the Minecraft server.
I've only had experience with having my own Minecraft server hosted on a spare computer. So I'm hoping that one of you has more experience and can give me some tips for setting up a Linode Minecraft server.
7 Replies
Apache/PHP/MySQL
Ventrilo
Mumble
4 BNCs
Munin
Minecraft Server
I don't know if map size is more important or if number of players are, but my single "world" folder is 115MB. I USUALLY have 0-4 players on at a time. A few times I've had 7-8 concurrent users.
My startup command
screen -A -m -d -S minecraft java -Xmx164M -Xms164M -jar minecraft_server.jar nogui
The Minecraft docs recommend 1024M for the min/max memory allocation. Any less than 164M with my setup seems to crash the server with Out Of Memory errors. I've had it up at 196M for a while without a problem and I've been slowly lowering it. This seems to be a good point for my setup. A minecraft server will always crash if you "stress" it by blowing up 1000s of blocks of TNT or something. If you have a bunch of people working normally and blowing up TNT here and there you should be fine.
If you run the server with this little ram you get
[WARNING] Can't keep up! Did the system time change, or is the server overloaded?
in the console all the time. It doesn't seem to cause any harm or degrade performance though.
I guess the bottom line is this: You don't need 1GB like the docs say. You could probably get away with running it on the same Linode as your blog. I'd start there and see if web performance degrades or if you have issues with the Minecraft server. Use top/htop to monitor memory usage. If you find you can't run them both at the same time you can either upgrade to a 1024 and increase the Minecraft memory to 512M, or just get a second 512 and play around with the memory limits. I would probably recommend getting a 1024 and running both at the same time, again monitoring usage with top/htop and checking reliability. If that still doesn't seem to be enough then go with a 1536 for both. I wouldn't separate them unless you need to.
Edit:
Hints that your Minecraft server needs more resources are Out Of Memory crashes in the console and blocks reappearing right after they're destroyed.
It's also worth noting my htop currently shows:
Mem: 261/469MB
Swp: 145/255MB
I'm not thrashing though so I assume that's just the kernel putting stuff that doesn't get used into swap to free up RAM. Also I'd like to point out that MySQL isn't optimized on my system. Minecraft currently has ~12 processing and is using "29.9%" of my RAM, which I assume includes swap.
I actually run a small private Minecraft server on a Linode 512 for my nephew (maybe 3-4 simultaneous users, and nothing else on the Linode), so that's doable for small numbers of clients, but I monitor its memory use and restart occasionally to reclaim what seems to be growth spikes from slower connected users or if it gets close to swapping. As it starts to peak it ends up eating up 400+MB so I'm not sure I'd want anything else on the Linode.
At one point I was going to drop the Java runtime space to fit, but it complains loudly if you don't have it set to at least 1GB, so I ended up leaving it and monitoring since I figured going into swap and slowing down was better than potentially dying hard if the runtime ran out of memory. In the end though I've never really let it run into swap.
I mention that mostly since on the Minecraft Linode side you might start with a 1024 and monitor to see how the memory usage goes - you might not need anything larger.
– David
@Smark:
I run the following off my 512:
Apache/PHP/MySQL
Ventrilo
Mumble
4 BNCs
Munin
Minecraft Server
I don't know if map size is more important or if number of players are, but my single "world" folder is 115MB. I USUALLY have 0-4 players on at a time. A few times I've had 7-8 concurrent users.
My startup command
screen -A -m -d -S minecraft java -Xmx164M -Xms164M -jar minecraft_server.jar nogui
The Minecraft docs recommend 1024M for the min/max memory allocation. Any less than 164M with my setup seems to crash the server with Out Of Memory errors. I've had it up at 196M for a while without a problem and I've been slowly lowering it. This seems to be a good point for my setup. A minecraft server will always crash if you "stress" it by blowing up 1000s of blocks of TNT or something. If you have a bunch of people working normally and blowing up TNT here and there you should be fine.
If you run the server with this little ram you get
[WARNING] Can't keep up! Did the system time change, or is the server overloaded?
in the console all the time. It doesn't seem to cause any harm or degrade performance though.
I guess the bottom line is this: You don't need 1GB like the docs say. You could probably get away with running it on the same Linode as your blog. I'd start there and see if web performance degrades or if you have issues with the Minecraft server. Use top/htop to monitor memory usage. If you find you can't run them both at the same time you can either upgrade to a 1024 and increase the Minecraft memory to 512M, or just get a second 512 and play around with the memory limits. I would probably recommend getting a 1024 and running both at the same time, again monitoring usage with top/htop and checking reliability. If that still doesn't seem to be enough then go with a 1536 for both. I wouldn't separate them unless you need to.
Edit:
Hints that your Minecraft server needs more resources are Out Of Memory crashes in the console and blocks reappearing right after they're destroyed.
It's also worth noting my htop currently shows:
Mem: 261/469MB
Swp: 145/255MB
I'm not thrashing though so I assume that's just the kernel putting stuff that doesn't get used into swap to free up RAM. Also I'd like to point out that MySQL isn't optimized on my system. Minecraft currently has ~12 processing and is using "29.9%" of my RAM, which I assume includes swap.
Interesting. If I remember correctly McMyAdmin said I was using about 400MB of average before. And the system only says it can't keep up when I'm flying really fast or doing something like that.
I think I'll use your tip and not get a really big Linode for Minecraft. Instead maybe I'll just get a 768MB Linode and use that, and upgrade to 1GB or higher if needed. And use a separate 512MB Linode for my blog since the blog is pretty critical as in if it goes down or doesn't have enough resources I'll be in trouble.
I have a 1GB with memory usage at 47%.