Content: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Background: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Pattern: Blank Waves Notes Sharp Wood Rockface Leather Honey Vertical Triangles
Welcome to TerraFirmaCraft Forums

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

  • Announcements

    • Dries007

      ATTENTION Forum Database Breach   03/04/2019

      There has been a breach of our database. Please make sure you change your password (use a password manager, like Lastpass).
      If you used this password anywhere else, change that too! The passwords themselves are stored hashed, but may old accounts still had old, insecure (by today's standards) hashes from back when they where created. This means they can be "cracked" more easily. Other leaked information includes: email, IP, account name.
      I'm trying my best to find out more and keep everyone up to date. Discord (http://invite.gg/TerraFirmaCraft) is the best option for up to date news and questions. I'm sorry for this, but the damage has been done. All I can do is try to make sure it doesn't happen again.
    • Claycorp

      This forum is now READ ONLY!   01/20/2020

      As of this post and forever into the future this forum has been put into READ ONLY MODE. There will be no new posts! A replacement is coming SoonTM . If you wish to stay up-to-date on whats going on or post your content. Please use the Discord or Sub-Reddit until the new forums are running.

      Any questions or comments can be directed to Claycorp on either platform.
Gurman8r

Server RAM

11 posts in this topic

I have a server that I rent from mcpowerhosting that has 1 gb of ram. My issue is that when I start the server everything loads correctly but then after a minute or two I get the error:

 

[server] WARNING Can't keep up! Did the system time change, or is the server overloaded?

 

which I assume means that there's not enough ram, and then the server times out.

 

How much ram should I have for a server and if that's not the issue what is?

0

Share this post


Link to post
Share on other sites

Welcome to the Forums!

 

1 gigabyte of RAM is the minimum amount that TFC needs in order to properly run single player, let alone a server. My estimate would be that you would need 3-4 gigabytes just to host a small server with friends, maybe 5-10 people online at once at the maximum.

Also, RAM isn't the only thing that determines the stability of a server. Especially with TFC, you're going to need a decent processor and internet connection to keep up as well. More times than not, rent-able servers that are advertised for hosting Minecraft are going to have the bare minimum specs possible, and aren't going to do a good job keeping up. Your best bet is to find a dedicated server that is advertised for general reasons, not just for MC. That said, a non-MC server is going to be a bit more expensive. 

0

Share this post


Link to post
Share on other sites

When on the server try doing /forge tps

That will show you how long the server needs to calculate one tick, and how many ticks per second it's doing. If the number is 20 then it's all good. If it's lower then the server can't keep up. If you see that message from time to time, that's not a big deal. If you see it all the time then something's wrong.

 

Like Kittychanley said, TFC isn't like regular Minecraft. There is a lot of stuff going on that you don't really see as a player but that the server has to do. A lot more so then with regular Minecraft. If you can't upgrade the amount of RAM for your server (you should), try adding the following to the startup script (if possible): -XX:+AggressiveOpts -XX:+UseFastAccessorMethods

1

Share this post


Link to post
Share on other sites

Indeed, 1 Gb RAM is minimum for starting the server. 2 Gb would be enough for a few friends, but 4 Gb or more would be required for a large server.

 

Notice that RAM is not by definition the limiting factor for a server. The maximum number of players does not scale simply with the amount of RAM. RAM helps because it 1: allows more game data to be loaded in the memory and 2: allows the server to compile and keep more of the java code compiled. But, at the end of the day the processor will just not keep up and problems will start no matter how much RAM you throw at it.

 

About hosting: a dedicated server is ideal, but relatively expensive. A good VPS is an alternative that can work well. Note the good part, there are many shitty ones.

 

Like InsaneJ said, you can play with the java options to optimize how java deals with the code and the memory. Be aware though: there are many guides out there with java options and some just don't make sense. It is hard to determine how effective each setting is.

 

One final note, the TFC player base is already spread quite thin as it is. This is something I didn't realize myself, but is something to consider if you want to start a public server. It might be better for the TFC community as a whole, to join an existing server and help make that one a better / more active server than to create a new server and spread out the players even more.

0

Share this post


Link to post
Share on other sites

Try

-Xmx1024m -Xms1024m

 

or 

 

-Xmx756m -Xms756m

0

Share this post


Link to post
Share on other sites

Similarly, I was spotting memory usage for 1GB allocated creeping into 80-85% usage during single player in a game. At this point seriously considering taking the step to 64bit Java to allocate more to be safe. Question is - why is the usage spiking *that* high in the mod, and if I push more memory availability is it just going to grab all of it?

0

Share this post


Link to post
Share on other sites

Similarly, I was spotting memory usage for 1GB allocated creeping into 80-85% usage during single player in a game. At this point seriously considering taking the step to 64bit Java to allocate more to be safe. Question is - why is the usage spiking *that* high in the mod, and if I push more memory availability is it just going to grab all of it?

 

The biggest memory hog for TFC would be the world generation. You have to take account that in general, the TFC world is twice as tall as the vanilla one, with vanilla sea-level being around 64, whereas TFC's sea-level is around 142. So all those awesome extreme hills in standard vanilla generation? They would be underneath the ocean in TFC. There is also a lot more that the game has to keep track of, with the different layers of rock and all the different trees.

 

As to answer your second question, Yes. Java is a greedy little bugger by nature and will always grab any and all memory that has been allocated to it. That's just the way this language unfortunately works.

0

Share this post


Link to post
Share on other sites

So basically I'm running a world close to the "amplified" type which was added recently? Hmmm. I had noticed the Y coordinate seemed high compared to my usual when checking F3. But just standing in the same area of chunks shouldn't be spiking it quite so high and keeping it there . . . 

 

And thanks for the answer to the second, it's disconcerting to hear hinted I could free it more RAM to use and it wouldn't handle it any better :)

0

Share this post


Link to post
Share on other sites

As to answer your second question, Yes. Java is a greedy little bugger by nature and will always grab any and all memory that has been allocated to it. That's just the way this language unfortunately works.

It's a programmer issue, not a Java issue. It's because of programmers relying on Java's garbage collection to clear up memory after it's no longer being used by the application. If programmers would clean up after themselves, Java applications would use way less RAM and run a lot better. Garbage collection takes quite a lot of CPU time to do. However clearing stuff after use makes for more complex programming which is why so many Java devs don't do it. It's also one of the reasons why developing for Java is relatively easier then say C++. It's just one of those things you don't really have to worry about (let the program users worry about getting enough RAM/CPU) and instead you can focus on getting the job done easier/faster. Then again, CPU and RAM are relatively cheap. Even a low-end $400 PC has 8GB RAM and a quad-core CPU right nowadays. So it really shouldn't matter that much for most people. It's only an issue for people who can't (or won't) upgrade their old computers. And by old I mean anything older then the core i3/5/7 of which the first came out in November 2008 and with less then 2GB RAM. Even a 6 year old Core2Quad from 2007 will also run Minecraft quite well.
1

Share this post


Link to post
Share on other sites

It's not a Vanilla Minecraft issue - I run Minecraft quite well on a 3yr old Intel Mac Mini with 2GB. However, some mods (TFC being one of them, Millenaire being another) really . . . and I mean really . . . tend to peg the needle for memory. On the machine with 2GB of RAM, I need to be not running anything else and even then it can get unstable. (Probably for reasons other than RAM.)

 

On the computer I am now running TFC on, it has 8GB of RAM but I'm running 32bit Java since Chrome is my browser of choice. And Chrome does not support 64bit Java. Thankfully, from what I recall I only got two crashes - one when a ton of zombies on fire killed me and it spat up an "Out of Memory" error. The other was the known crash seeming to deal with Sequoia trees. 

 

I posted in here wondering if pushing the allowed RAM to 2GB would make things better, and the answer I did get says "not likely".

0

Share this post


Link to post
Share on other sites

Welcome to the Forums!

 

1 gigabyte of RAM is the minimum amount that TFC needs in order to properly run single player.

 

I have a lot more than 1 gigabyte of RAM and still Iag a lot and sometimes crash. Maybe it's the exception ticking world crash bug?

0

Share this post


Link to post
Share on other sites