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.
100_Sheep

Insane lag all of the sudden [SOLVED]

7 posts in this topic

Here's my problem, a few days ago, I could play TFC with max graphics at 40-60 fps, the chunks would load properly, they would load fast, with no problems at all. But lately when I log in, I would be lucky to reach 20 FPS, standing in one spot. and the chunks around the area which I have already generated, takes a long time to load. My computer is fine overall, I haven't had any fps fluctuation in vanilla minecraft. only in TFC. I don't have any other mods installed, I have updated all my drivers, defragged my hard drive, closed all other background programs, deleted all my config files, and nothing seems to work.

All computer specs and information are in the attached file

Thank you

:)

DxDiag.txt

0

Share this post


Link to post
Share on other sites

Have you happened to place a bunch of plank items in the world, or used the detailed mode of the chisel a lot? Rendering both of these can be pretty resource heavy, which would explain your drop in FPS.

 

Edit: Have you tried changing your JVM parameters at all? Using the specs you provided, if you are willing to allocate 3GB out of the max 4GB that your system has just to TFC, you should try the following argument string. Simply delete everything in the JVM Arguments input box on the profile editor of the vanilla launcher, make sure the box is checked, and replace it with this:

-Xmn1G -Xms3G -Xmx3G -XX:NewSize=512M -XX:PermSize=128m -XX:MaxPermSize=128m -XX:SurvivorRatio=2 -XX:+DisableExplicitGC -XX:ParallelGCThreads=2 -d64 -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalPacing -XX:+AggressiveOpts 

You can also change the 3G in the 2nd and 3rd argument to 2G if you want to only allocate 2GB as the max.

0

Share this post


Link to post
Share on other sites

With 16gigs of ram what you recommend setting it to?  I simply changed the -Xmx1g to 4g on mine but I didnt place all those things you listed.  Is it worth setting the min?  

0

Share this post


Link to post
Share on other sites

Heck, that's a lot of JVM arguments. Care to explain each one of them, Kitty?

0

Share this post


Link to post
Share on other sites

With 16gigs of ram what you recommend setting it to?  I simply changed the -Xmx1g to 4g on mine but I didnt place all those things you listed.  Is it worth setting the min?  

 

Because java is a dirty little hog and will use any and all memory that you allocate to it whether it needs it or not, I strongly suggest that you don't set a single player world higher than 4GB. Setting the maximum too high can actually cause just as many problems as not setting it high enough. In my opinion, it's definitely worth setting the minimum amount, and you should see performance changes if you do so.

 

Heck, that's a lot of JVM arguments. Care to explain each one of them, Kitty?

 

The laptop that I used to use is like 10 years old, and a piece of crap. So I did a lot of research into VM arguments so that I could get the absolute best out of the little specs that I did have. Specifically these sites helped: 

http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html

http://docs.oracle.com/cd/E15523_01/web.1111/e13814/jvm_tuning.htm

 

Without getting too far into detail, this is a basic breakdown:

  • -Xmn1G: Sets minimum memory to 1GB
  • -Xms3G: Sets initial heap size to 3GB. Set this equal to Xmx to minimize garbage collection.
  • -Xmx3G: Sets maximum memory to 3GB. If the heap size ever gets larger than this, an Out of Memory error/crash will occur.
  • -XX:NewSize=512M: Sets new generation heap size to 512MB.  Should be about 1/4th average heap size.
  • -XX:PermSize=128m: Sets goal permanent generation size to 128MB.
  • -XX:MaxPermSize=128m: Sets maximum permanent generation size to 128MB.
  • -XX:SurvivorRatio=2: Sets Ratio of eden/survivor heap space size to 2
  • -XX:+DisableExplicitGC: Disables calls to System.gc(), garbage collection is only performed as needed.
  • -XXParallelGCThreads=2: Sets the number of threads used during parallel phases of the garbage collectors. Set this equal to the number of processor cores you have.
  • -d64: Forces use of java 64 bit over 32 bit.
  • -XX:+UseConcMarkSweepGC: Enables use of concurrent mark-sweep collection for the old generation. 
  • -XX:+CMSIncrementalPacing: Enables automatic adjustment of the incremental mode duty cycle based on statistics collected while the JVM is running.
  • -XX:+AggressiveOpts: Turn on point performance compiler optimizations that are expected to be default in upcoming releases. +

Edit: The main focus of all of these arguments is to make garbage collection while the game is running as smooth as possible. A lot of times when players are experiencing lag spikes or fluctuations in FPS, it is due to a bunch of garbage collection happening at once.

1

Share this post


Link to post
Share on other sites

This stuff all look way above my pay grade hehe.  I really haven't had issues except an occasional pause when loading new chunks or it looked a little sketchy when it started to snow and freeze water.  Thank you for the explanations and the site links.  I am trying out in this order -Xms4G -Xmx4g -Xmn2g XX:+DisableExplicitGC -XX:+AggressiveOpts  

 

Hopefully the order its put in doesn't matter, probably going to add the -d64 though I would think it would automatically do that on a new machine like mine but just in case.  

0

Share this post


Link to post
Share on other sites

I used the new JVM arguments, and it worked! Thank you all for responding to my problem :D!

0

Share this post


Link to post
Share on other sites