Jump to content

Question For Small Servers


HalestormXV

Recommended Posts

Alrighty, I have a basic question. In have been running servers for quite some time know as both owner and administrator. I am currently running a small server for about 5 people with a private modpack. The server has 4gigs of Ram and the mid pack contains about 77 mods. The server is a default forge server as some of the mods are not compatible with cauldron 1.7.10. One of the heavy mods on there is MoCreatures. Now in running many servers in the past I know that the server load is almost half related to Entities and MoCrestures adds quite a few lol. But I've seen "compact" servers running 1g ram use the default MoCreatures settings and run just fine.

So onto my question. Any server side cknfig tips anyone can share for a 4g server or mods that will reduce the CPU/Java usage down? Currently it floats around 90 - 100%.

I ask this because this is a 1.7.10 server, usually I run 1.6.4 servers so not sure about any possible new optimizations.

I know in the past I could reduce the server's viewing distance via the .properties files but does anyone else have any other tips on better optimization without really touching mod configs (since they are working gloriously together after some tweaks).

I apologize for any breviaries/typos as this was typed from my phone.

Edited by HalestormXV
Link to comment
Share on other sites

  • Discord Moderator
  • Use Java 8.
  • Use FastCraft.
  • Make sure you are running off an SSD.
  • Keep your view distance to 6.
  • Play with command line Java options. Google for additional information (not getting into that here).
  • Make sure you are using Opis to keep tabs on what is actually using the most server resources.
Link to comment
Share on other sites

- Java 8 - have to see if my host allows that since I am mainly administrating this one and i don't know if the owner is willing to move to a VPS Linux or not

- FastCraft is implemented (works amazingly)

- View Distance to 6, will definitely do that, currently i think I set it to 10 when it was 16

- Java Option - currently the host launches with 2G and I know there is a ton of other ones to use as I use them on my Linux Box (once again can't really change that as it is a host thing an I only administer this one, so I am stuck with the hosts settings)

- Opis - totally forgot about that one. Will have to add that in

 

Thank you Plowmanplow. Amazingly helpful as always.

 

Anyone have any other suggestions or any more suggestions?

Edited by HalestormXV
Link to comment
Share on other sites

  • Discord Moderator

That covers a large part of the low hanging fruit for optimizations. There are more complex options, but since you are currently just admining it might not be helpful. Things like VisualVM, system level performance monitoring, that type deal.

Link to comment
Share on other sites

Thanks a lot for this thread...helped me quite a lot myself.

Heard of Opis, not used it so far, will certainly in the future.

Used fastcraft before, so there is a +1 from my side. Did not have any issues so far.

 

Just a few questions though:

  • I am not a programmer: Why Java 8? I mean, of course, Java 7 is EOL and therefore a switch has to occure in terms of security and updates. However, seeing that Java 7 would run still perfectly fine....what are the upsides (performance wise) to Java 8? Any short insights? Or is it mainly the PermGen stuff that was changed on Java 8?
  • Surely SSD is preferred over HDD, am I right to say that this most likely affects loading times (server load time, chunk loading)? As soon as chunks are loaded or stuff is in RAM that should not be an issue?! (well, maybe world backups).

Thanks a lot

Link to comment
Share on other sites

  • Discord Moderator
  • I am not a programmer: Why Java 8? I mean, of course, Java 7 is EOL and therefore a switch has to occure in terms of security and updates. However, seeing that Java 7 would run still perfectly fine....what are the upsides (performance wise) to Java 8? Any short insights? Or is it mainly the PermGen stuff that was changed on Java 8?
  • Surely SSD is preferred over HDD, am I right to say that this most likely affects loading times (server load time, chunk loading)? As soon as chunks are loaded or stuff is in RAM that should not be an issue?! (well, maybe world backups).

 

  • In my experience (the servers I run), I seem to be seeing better memory management in general when using Java 8. This is anecdotal in nature so I wouldn't take a strong stance just for that, but there are so many compelling reasons to switch to Java 8, and so few not to, that it just makes good sense at this point.
  • There is always a decent amount of HD I/O going on ranging from "some" to "a crapton" (technical term). The system will run MUCH better on an SSD, especially when lots of folks are generating a lot of chunk churn, and when backups hit.
Link to comment
Share on other sites

I run 42 mods and approximately 30 plugins including mocreatures, towny, multiverse, TC and other not-so-lightweight mods and plugins.
I am on a VPS with 2 gigs of ram, and we can easily take 10 users, even with chunk sized smelteries.. and with all this, i've allocated less than 1.5 gigs for the server.

Usually ram is at about 80% when we are 10 concurrent users doing our things, of course that's not a lot of extra room, but what really matters is CPU. It always is. The CPU decides whether youre getting 11-12 TPS or a consistent 20. My VPS offers me 4 CPU cores with nice Xeon E3 cpus. These are not the newest, coolest Xeons, but Minecraft is primarily singlethreaded, so maybe take a look at this - when it really comes to it, a lot of the newer CPU's fare worse in this regard. (I even chose my desktop's cpu based on this, the i7-4790K)

I am using fastcraft, but my render distance is 16 chunks. I am using OpenJDK 7.0 on Ubuntu 14.04 LTS - Why? It works. It's stable. At the time i set up the server, you couldn't say this about Java 8. Things might've changed, but why fix what is not broken.

Also my VPS uses SSD. It makes for a lot faster persistency operation. With four cores, it's no performance hog to run an SQL server too. I even handle teamspeak and nginx with my Solder repository and everything on it too. No biggie. 20$ a month. 

Of course I will have to attribute a lot of my server stability to using Cauldron, as it uses Spigot and thus utilising multi-threaded networking, and perhaps the daily reboot at 10:00am.

What plugins are you using that does not support Cauldron? Did you try using it anyway? Can you live without them? Because hands down, the difference on the Vanilla server software and Spigot is enormous. I wouldn't use anything else. If not. Maybe wait for Sponge and see what happens.

Cheers.

Edited by nicholaiiii
Link to comment
Share on other sites

[..] and perhaps the daily reboot at 10:00am. [...]

 

Please scratch the "perhaps", because all you said you voided yourself with this tiny little information.

I do not intend to be mean or condescending, but if you restart (or even reboot?) your server on a daily basis, there is simply nothing you can see or estimate in the long run.

You certainly are on the safe side concerning all issues which might occur when your server might run more than 24h.

 

That being said, of course I understand that you (and me! and many others) can not be bothered to the check tons of parameters of a server for hours with no end just to find every root cause of issues that might arise or not. Quite impossible actually, considering that each and every mod is made by someone else and can potentially screw things pretty bad for everyone.

So I do understand this approach. However, this very approach makes all the other information anecdotal at best.

 

As for Java 8:

There is a PPA for Ubuntu (webupd8team) which offers Oracle JDK 8 (newest at the moment which is either u31 or u33), rather easy to install. You also have the possibility to change back to OpenJDK 7 if needed.

My server is running for approx. 48h with Java 8 (yes, that is not much yet) without any troubles. I'd say that Java 8 can be considered stable by now.

Now that I looked into it, it appears (but I am still not a programmer) that the memory management had some (positive) changes. Beside the fact that Java 7 is EOL soon, it seems to be a low risk to go to Java 8 (and a fallback is rather easy anyhow).

Link to comment
Share on other sites

  • Discord Moderator

Yeah, the current state of mods, and specifically mod interactions, in SMP is a bit sketchy on 1.7.10 because server development has essentially halted. The most recent Cauldron is good, but obviously not perfect. My Tekkit Lite server sees weeks of uptime before I end up restarting it. My less complex 1.7.10 packs (on Forge/MC/Cauldron #1272) seem pretty stable. My big pack seems to have a memory leak somewhere which starts causing issues in the 20-24H mark. No big deal to restart when nobody is on and just something we have to deal with given the current state of things.

Link to comment
Share on other sites

I don't agree, Roversword. My server runs perfectly fine under any load i has put it under, the only reason I do the restart (at this specific time) is because -some- mod is fucking shit up with a sudden crazy memory leak if the server has been idling for days on end. If I had activity on the server every day, this would not be an issue. Pertaining to the original question of cpu and ram usage, all my answers were fitting and the reboot does not fix any of either. I still maintain 99.93% uptime, this was impossible for me before using spigot or derivatives, and changing to a proper host with better cpu.

Link to comment
Share on other sites

I was using Cauldron but there is a mod somewhere in my pack with Cauldron that was making it incompatible and causing the server to enter a constant crash loop, although that set of mods was giving me some issues with Forge also. Since I removed the problematic mods the Forge server starts up just fine but I haven't retried my cauldron setup with the same mods, but there is only about 6 or 7 of us so it is no big deal for us. Anyone have log advise on how to reduce the file size of the log. I know there used to be a log.properties with forge that was never created by default and you had to manually create one. Is that still the case? Or are you able to tweak the log settings on a forge server differently?

Link to comment
Share on other sites

The only source I can think of is my host or maybe the fact they use MultiMC? because it does the same thing on a basic forge server with no mods. Even so, message like "Server can't keep up" I know they happen also but I don't want to see them either. I am sure it may not be normal in most cases but I still want to hide/filter it to prevent my log from filling up. It may not be the best practice to "hide" the messages but as this is a server with 4 or 5 close friends and not a public high population server I don't have a problem doing things un-kousher. I know in prior versions a logging.properties file would go into the config folder. I was curious if that is still the case.

 

I can always give it a shot and report back but I just wanted to know if anyone knew for sure that this was still the case.

Edited by HalestormXV
Link to comment
Share on other sites

  • 2 weeks later...

Yeah I did actually, but to no avail. (I attempted on 1291) I am beginning to wonder if default forge does not allow you to do it. Perhaps a shell script that could truncate it that runs on a cron job then saves the file without deleting it? This way the new data will get written into it instead of looking for it. (as I do have root access to my VPS)

Edited by HalestormXV
Link to comment
Share on other sites

i recomend adjusting the setings of the mods to be faster, for example, mo creatures spawn a lot of mobs but you can limit it to the normal minecraft behaviour so if with vanilla spawn 10 mobs with mo creatres 5 of that mobs will be the ones from mo creatures

And dont allow chunk loaders, a chunk loader is just some mb of ram removed from the server

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...