FTB Lag every 2 seconds?

  • Please make sure you are posting in the correct place. Server ads go here and modpack bugs go here
  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

Rawrzxor

New Member
Jul 29, 2019
12
0
0
I have an upper mid-range computer, so I don't see any way that this lag is a result of my hardware; I can run most games on ultra settings, let alone something like minecraft. Could this be an issue with a mod?

For a time, the game runs perfectly smooth. Then, arbitrarily, it starts consistently lagging.

It doesn't matter if I completely lower the graphics at all; it continues to lag out every 2-3 seconds for about 2-3 seconds.

I've tried completely exiting the game, then reentering. Sometimes this works, and I can play an hour or two before the lag kicks in.

First time it happened was in the Nether while I was fighting a ghast. Figures, eh? Before the Nether, I'd had no issues whatsoever.

Anyone know what I can do to fix this? It's really frustrating.
 

YX33A

New Member
Jul 29, 2019
3,764
1
0
I have an upper mid-range computer, so I don't see any way that this lag is a result of my hardware; I can run most games on ultra settings, let alone something like minecraft. Could this be an issue with a mod?

For a time, the game runs perfectly smooth. Then, arbitrarily, it starts consistently lagging.

It doesn't matter if I completely lower the graphics at all; it continues to lag out every 2-3 seconds for about 2-3 seconds.

I've tried completely exiting the game, then reentering. Sometimes this works, and I can play an hour or two before the lag kicks in.

First time it happened was in the Nether while I was fighting a ghast. Figures, eh? Before the Nether, I'd had no issues whatsoever.

Anyone know what I can do to fix this? It's really frustrating.
Gonna ask you a question. What kind of CPU does your computer have? Because Minecraft is not like those other games you run on Ultra-Everything in a few ways.
Sounds like a CPU Bottleneck issue. Did you know that for all the beauty of games like WATCH_DOGS, they use mainly the GPU and "high end gaming computers" have a great GPU, and a CPU that works about as well as potato?
 
  • Like
Reactions: ThatOneSlowking

YX33A

New Member
Jul 29, 2019
3,764
1
0
Intel i5-4570 at 3.2GHz.
Not bad. Not totally sure what's wrong then. I just know that Minecraft is CPU Heavy, unlike "Real AAA Games" that are GPU heavy and can run on potato if one has a good enough GPU, and enough RAM to run it.

Speaking of RAM, what are your launch parameters for Minecraft? Also, this is the last bit I can help with, because I need to go eat soon. But @psp is right, logs help are a MUST, and taking this to the support site doesn't hurt either.
 

rhn

Too Much Free Time
Nov 11, 2013
5,706
4,420
333
Could be caused by either having too little RAM allocated to the game, too much RAM allocated to the game, or your system running out of total memory and resorting to pagefile.

But tbh. no matter what you do you will just sometimes get this behaviour. Downside of the game being programmed in Java.
 

YX33A

New Member
Jul 29, 2019
3,764
1
0
Could be caused by either having too little RAM allocated to the game, too much RAM allocated to the game, or your system running out of total memory and resorting to pagefile.

But tbh. no matter what you do you will just sometimes get this behaviour. Downside of the game being programmed in Java.
Every two seconds is quite impressive, though, isn't it? Sounds like any time the world generates his computer stutters.

Actually, re-reading the OP, sounds normal to me. @Rawrzxor does it go away when you quit the game(not just go to the menu)? If so, it's a non-issue, Java is horrid for games because occasionally one just has to quit to keep the game running smoothly.
 

rhn

Too Much Free Time
Nov 11, 2013
5,706
4,420
333
Every two seconds is quite impressive, though, isn't it? Sounds like any time the world generates his computer stutters.
If for example he was running out of total memory and the game was partly running off the page file, then that is what you would get. The hard disk is hopelessly totally archaic slow compared to your RAM.
 

YX33A

New Member
Jul 29, 2019
3,764
1
0
If for example he was running out of total memory and the game was partly running off the page file, then that is what you would get. The hard disk is hopelessly totally archaic slow compared to your RAM.
Interesting. I edited my post because I realized the issue is just Java being a derp, but I wasn't as aware that the hard disk(aka read/write storage) is that bad compared to Random Access Memory.

Still, do you think the improvements in Solid State Drives will make a difference?
 

rhn

Too Much Free Time
Nov 11, 2013
5,706
4,420
333
Still, do you think the improvements in Solid State Drives will make a difference?
No not really. A SSD will have average speeds in the 2-300 MB/s whereas RAM will be at 10-20 GB/s. And then there is ofc the whole deal of latency/response time and so on. So running out of memory is always VERY bad.
 
  • Like
Reactions: YX33A and Beeze23

No one

New Member
Jul 29, 2019
105
0
0
Are you running Optifine? IIRC,Optifine had a setting that would autosave the game every few seconds,which apparently causes the famous "Lag Spike of Death"
 

Hambeau

Over-Achiever
Jul 24, 2013
2,598
1,531
213
If you are running Win 7 or 8 and have at least a USB 2.0 port, you can use an appropriately sized SD or microSD card (my system with 8GB ram uses 4GB on a card) and use "Readyboost" to run your swapfile from SD to keep from reading/writing fron the HD/SSD.

My laptop runs about 20FPS without doing this and over 40FPS with readyboost enabled.

For that matter, if you have enough ram and feel comfy with OS tweaks, you could download a ram disk program, create a ram disk and run your swapfile on it to run circles around any HD/SSD.

It's possible with a LOT of ram to make a bigger ram disk, say 6-8 GB, and create a script to copy your entire Minecraft/FtB folder to the ram disk and run it from there, including the swapfile, copying the saved files back to the MC/FtB folder on your HD/SSD when you quit. This would probably be the fastest solution.
 

Eyamaz

New Member
Jul 29, 2019
2,373
0
0
More than likely, you are suffering from stw event from the gc.

Click the options tab. Click advanced. Check the "settings for fast computers" box (or whatever they named it.) This should turn on my smaller set of recommended java arguments.
 

rhn

Too Much Free Time
Nov 11, 2013
5,706
4,420
333
More than likely, you are suffering from stw event from the gc.

Click the options tab. Click advanced. Check the "settings for fast computers" box (or whatever they named it.) This should turn on my smaller set of recommended java arguments.
Wth, when was this added? (it is actually found on the Options page, not in the Advanced tab).
And what exactly does it do? Should we remove stuff added in the additional parameters box?
 

Eyamaz

New Member
Jul 29, 2019
2,373
0
0
Wth, when was this added? (it is actually found on the Options page, not in the Advanced tab).
And what exactly does it do? Should we remove stuff added in the additional parameters box?

Don't remember when we added it, but it's the 4 arguments listed in the BnB description. That's as far as I've got with profiling atm.
 

rhn

Too Much Free Time
Nov 11, 2013
5,706
4,420
333
Don't remember when we added it, but it's the 4 arguments listed in the BnB description. That's as far as I've got with profiling atm.
Think it would be a great if you would add that information somewhere else that is noticeable for people that don't necessarily are interested in BnB. I am personally not really interested in the "hardmode" packs, so never set foot in that thread. Maybe a sticky somewhere would spread the message to more?
 

Eyamaz

New Member
Jul 29, 2019
2,373
0
0
Think it would be a great if you would add that information somewhere else that is noticeable for people that don't necessarily are interested in BnB. I am personally not really interested in the "hardmode" packs, so never set foot in that thread. Maybe a sticky somewhere would spread the message to more?

I was going to post it somewhere, and never did. I will when I freeze the packs.
 

Rawrzxor

New Member
Jul 29, 2019
12
0
0
I have 8 gigs of ram, so it shouldn't be an issue. I tried to update java, just in case. Looks like it fixed the issue. I've been playing for a few hours with no lag. Well, a one second lag spike, but that's to be expected, I suppose.

I really don't feel comfortable messing with my os. I've heard that readyboost is almost completely useless unless you barely have enough ram (at least, when using a USB), as 8 gigs of storage from the USB doesn't translate to the same amount of ram.
 

Eyamaz

New Member
Jul 29, 2019
2,373
0
0
I have 8 gigs of ram, so it shouldn't be an issue. I tried to update java, just in case. Looks like it fixed the issue. I've been playing for a few hours with no lag. Well, a one second lag spike, but that's to be expected, I suppose.

I really don't feel comfortable messing with my os. I've heard that readyboost is almost completely useless unless you barely have enough ram (at least, when using a USB), as 8 gigs of storage from the USB doesn't translate to the same amount of ram.

You should never have more than 4gb of RAM set for client side. Java has issues with gc starting around that point. Only servers will ever even need more than this.
 

rhn

Too Much Free Time
Nov 11, 2013
5,706
4,420
333
If you are running Win 7 or 8 and have at least a USB 2.0 port, you can use an appropriately sized SD or microSD card (my system with 8GB ram uses 4GB on a card) and use "Readyboost" to run your swapfile from SD to keep from reading/writing fron the HD/SSD.

I really don't feel comfortable messing with my os. I've heard that readyboost is almost completely useless unless you barely have enough ram (at least, when using a USB), as 8 gigs of storage from the USB doesn't translate to the same amount of ram.
Readyboost has nothing to do with RAM. It allows USB flash drive memory to function as cashe for conventional hard drives. The USB is hopelessly slow compared to the bandwidth of a hard drive, but there is next to no "lookup" time(compared to the disk having to rotate to the right spot and the pickup having to move to it) which means that regular used data can be retrieved faster from this cashe. This speeds up read/write speeds to conventional harddrives(which does include pagefile data), but it will not serve to "extend" your RAM.

Bear in mind that Readyboost is useless with SSDs as they are basically one big cashe(and Windows does actually also disable Readyboost when using SSDs). Newer conventional hard drives are also made with built-in cashes.