TickThreading - concurrent entity/tile entity ticks and other optimisations

  • 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

Puremin0rez

New Member
Jul 29, 2019
90
0
0
I assume anything before World Tick Threading is safe to use, so yeah 290 looks fine too, possibly even 291

I tried out the latest build 5 minutes ago and my server ran out of memory within minutes and other strange things (world randomly stopped loading, etc) - so yeah, avoid for now. @Nallar appears to be aware of it.
 

Sp0nge

New Member
Jul 29, 2019
230
0
0
He is, we tested worldthreading straight away (we kinda are in the frontline of testing for this) and he is given the logs. So stick with 290 for now is my suggestion
 

NooBxGockeL

New Member
Jul 29, 2019
93
0
0
I just wanted to say i did use 290 before.
My Server Specs:
vServer cloud based CPU i7 920 (evenly distributed to load and some limitations, f.e. got 4 logical cores
4 Gigs of DDR3 Ram (Alocation for minecraft is a bit wierd, see further down)
Start-Parameter:
Code:
"${BIN_JAVA} -server -Xincgc -Xmx3072M -Xms1024M -XX:NewRatio=2 -XX:CMSFullGCsBeforeCompaction=1 -XX:SoftRefLRUPolicyMSPerMB=2048 -XX:+CMSParallelRemarkEnabled
-XX:+UseParNewGC -XX:+UseAdaptiveSizePolicy -XX:+DisableExplicitGC -Xnoclassgc -oss4M -ss4M -XX:+UseFastAccessorMethods -XX:CMSInitiatingOccupancyFraction=90 -XX:+UseConcMarkSweepGC
-XX:UseSSE=4 -XX:+UseCMSCompactAtFullCollection -XX:ParallelGCThreads=6 -XX:+AggressiveOpts -cp "mindcrack.jar" -jar ${JAR_FILE}"
Added Mods:
Mystcraft
ChargePads

Server without Tickthreading is usually hanging around 25 - 30 % Memory Load and about 30-50 % CPU Load (2-3 Players)
As said couldnt really test server with tickthreading, but it seemed to help prevent our wierd lags...
I think ill try v6 with Tickthreading again today...

The Logs:
(v7)
tickthreading.log: http://pastebin.com/XHaLyKi7
patcher.log: http://pastebin.com/J0JfKvgV
ForgeModLoader-server-0.log: http://pastebin.com/jFiqGAR2

CrashLogs:
Nullpointer: http://pastebin.com/CdPVT8UQ
OutOfMemory: http://pastebin.com/KLA54JzA
NoClassDefFound(intresting for modauthor!): http://pastebin.com/KGZN3eHb
IndexOutOfBounds: http://pastebin.com/zL6yQan2

Have fun reading this logs ;DD I havent got a clue out of them.
All crashes happened in about a 30 minutes Timeframe of the Server running, then i decided to f... well go back to v6 ^^

------------------
(v6 | Tickthreading runned fine before but yesterday crashed and every time on startup this happens):
http://pastebin.com/ndeEXSye
 

Puremin0rez

New Member
Jul 29, 2019
90
0
0
One of the reports you posted some of my users actually crashed with today - I'll go put that on the issue tracker right now
 

Puremin0rez

New Member
Jul 29, 2019
90
0
0
Question:

It appears to be that the algorithm for automatic threads is cores * 3 / 2

So in my case, 2 * 3 / 2 = 3

Since there are now 4 threaded things (Entities, Tile Entities, World Tick, Chunk Tick) does this mean one of them is being killed off at random in order to fit into 3 threads?

I don't completely understand how multi threading works - so I'd appreciate some information :)

From what I understand, there can be more then one thread per core - but the ultimate benefit comes from being able to run them on multiple cores.

Would I need to increase threads to 4 in order to make all of the threaded features actually work?
 

MinerDude333

New Member
Jul 29, 2019
49
0
0
I tried to install it on the Direwolf20 pack v4 and got this error when it started up: http://pastebin.com/Hu7z7UiL
I also have Optifine HD B2 and village info installed.
I have Java 7 Update 10 and Windows 7 64x

*edit* I used build #296, so that might be the problem.
 

nallar

New Member
Jul 29, 2019
270
0
0
I just wanted to say i did use 290 before.
My Server Specs:
vServer cloud based CPU i7 920 (evenly distributed to load and some limitations, f.e. got 4 logical cores
4 Gigs of DDR3 Ram (Alocation for minecraft is a bit wierd, see further down)
Start-Parameter:
Code:
"${BIN_JAVA} -server -Xincgc -Xmx3072M -Xms1024M -XX:NewRatio=2 -XX:CMSFullGCsBeforeCompaction=1 -XX:SoftRefLRUPolicyMSPerMB=2048 -XX:+CMSParallelRemarkEnabled
-XX:+UseParNewGC -XX:+UseAdaptiveSizePolicy -XX:+DisableExplicitGC -Xnoclassgc -oss4M -ss4M -XX:+UseFastAccessorMethods -XX:CMSInitiatingOccupancyFraction=90 -XX:+UseConcMarkSweepGC
-XX:UseSSE=4 -XX:+UseCMSCompactAtFullCollection -XX:ParallelGCThreads=6 -XX:+AggressiveOpts -cp "mindcrack.jar" -jar ${JAR_FILE}"
Added Mods:
Mystcraft
ChargePads

Server without Tickthreading is usually hanging around 25 - 30 % Memory Load and about 30-50 % CPU Load (2-3 Players)
As said couldnt really test server with tickthreading, but it seemed to help prevent our wierd lags...
I think ill try v6 with Tickthreading again today...

The Logs:
(v7)
tickthreading.log: http://pastebin.com/XHaLyKi7
patcher.log: http://pastebin.com/J0JfKvgV
ForgeModLoader-server-0.log: http://pastebin.com/jFiqGAR2

CrashLogs:
Nullpointer: http://pastebin.com/CdPVT8UQ
OutOfMemory: http://pastebin.com/KLA54JzA
NoClassDefFound(intresting for modauthor!): http://pastebin.com/KGZN3eHb
IndexOutOfBounds: http://pastebin.com/zL6yQan2

Have fun reading this logs ;DD I havent got a clue out of them.
All crashes happened in about a 30 minutes Timeframe of the Server running, then i decided to f... well go back to v6 ^^

------------------
(v6 | Tickthreading runned fine before but yesterday crashed and every time on startup this happens):
http://pastebin.com/ndeEXSye
You set your stack size too high, try using the java options the install guide tells you to use.[DOUBLEPOST=1357751490][/DOUBLEPOST]
I tried to install it on the Direwolf20 pack v4 and got this error when it started up: http://pastebin.com/Hu7z7UiL
I also have Optifine HD B2 and village info installed.
I have Java 7 Update 10 and Windows 7 64x

*edit* I used build #296, so that might be the problem.
That's the problem.
 

MinerDude333

New Member
Jul 29, 2019
49
0
0
MinerDude333 said:
“I tried to install it on the Direwolf20 pack v4 and got this error when it started up: http://pastebin.com/Hu7z7UiL
I also have Optifine HD B2 and village info installed.
I have Java 7 Update 10 and Windows 7 64x

*edit* I used build #296, so that might be the problem.​
That's the problem.
Oh, does 297 do anything to fix it?
 

Sp0nge

New Member
Jul 29, 2019
230
0
0
As nallar has written in the first post, 290 is still the recommended build. 297 dont have fixed anything as far as i knopw off. However 290 should have most of the stuff that you need at the moment :)
 

MinerDude333

New Member
Jul 29, 2019
49
0
0
As nallar has written in the first post, 290 is still the recommended build. 297 dont have fixed anything as far as i knopw off. However 290 should have most of the stuff that you need at the moment :)
Thanks!

*edit* I will try 290 and see if it works. Be right back!

*another edit* I installed it, ran the patcher, and it crashes. log: http://pastebin.com/Pdb5zy3t
 

NooBxGockeL

New Member
Jul 29, 2019
93
0
0
To be hones, this tickthreading is wierd.
With the new parameter and Tickthreading installed no crashes so far but it runs on 100% CPU nearly all the time and now theres often a block-lag/chest-open delay.
With the old parameter and without Tickthreading it ran on ~50% CPU and no blocklag at all, just the wierd lags (every 5 minutes a 5-10 seconds lag)

I dont know what i should think about this, and cant decide to keep or throw it away...
 

Puremin0rez

New Member
Jul 29, 2019
90
0
0
To be hones, this tickthreading is wierd.
With the new parameter and Tickthreading installed no crashes so far but it runs on 100% CPU nearly all the time and now theres often a block-lag/chest-open delay.
With the old parameter and without Tickthreading it ran on ~50% CPU and no blocklag at all, just the wierd lags (every 5 minutes a 5-10 seconds lag)

I dont know what i should think about this, and cant decide to keep or throw it away...

I actually get that "lag" every few seconds too - but I'm pretty sure its from the Vanilla save mechanics

MC saves every 90 seconds so the server will "pause" during this - nallar said he will be adding an option to change this timer :)

TickThreading has done alot of good for my server, but I will agree - it has some issues. It's currently not perfect and does have quite a few imperfections - but that's why there's testing :)
 

NooBxGockeL

New Member
Jul 29, 2019
93
0
0
I think the recommended start parameter has to be refined, before i was on my old parameter with tickthreading and that was flawless, except the ocassional out of memory... well and the other 3 crashes ^^
And btw, threres a typo in it...

Change this
Code:
-XX:useSSE=3
to this
Code:
-XX:UseSSE=3
 
  • Like
Reactions: nallar

Puremin0rez

New Member
Jul 29, 2019
90
0
0
I should mention 290 is pretty stable Server-side

I have no idea what it's like if you patch your client with it
 

gustav9797

New Member
Jul 29, 2019
23
0
0
How come build 290 makes ic2 machines so slow?
Using MindCrack v7

Example: In singleplayer one item is smelted in 6 seconds, in the server with 20TPS according to /tps it smelts in 18 seconds.

EDIT: And now suddenly it's fast again. But the furnace bar freezes sometimes, then continues with normal speed, and freezes again.

EDIT2: Error: http://pastebin.com/uUE8avFp
 

NooBxGockeL

New Member
Jul 29, 2019
93
0
0
@gustav9797
Thats the kind of lag we're getting atm too.
More testing is needed to determine if we deinstall tickthreading again.
Or maybe that option Puremin0rez is talking about with saveoff.
 

nallar

New Member
Jul 29, 2019
270
0
0
@gustav9797
Thats the kind of lag we're getting atm too.
More testing is needed to determine if we deinstall tickthreading again.
Or maybe that option Puremin0rez is talking about with saveoff.
As noted in the main post, the TPS command in TickThreading is kinda' broken - it only measures time ticking tile/entities.

Can you please include a profiling log, using /debug start and /debug stop commands in minecraft, with a decent gap in between them? That way we can see what's being slow here.

In other news, the latest build works again, but has very little testing and is likely to cause issues. If you're interested in helping out, running it on a test server and messing about would be helpful, if you make issues for any exceptions. Having an issue with a heisenbug - changing to the end can cause it to crash, but it never crashes when I have a debugger attached. :/[DOUBLEPOST=1357851749][/DOUBLEPOST]
How come build 290 makes ic2 machines so slow?
Using MindCrack v7

Example: In singleplayer one item is smelted in 6 seconds, in the server with 20TPS according to /tps it smelts in 18 seconds.

EDIT: And now suddenly it's fast again. But the furnace bar freezes sometimes, then continues with normal speed, and freezes again.

EDIT2: Error: http://pastebin.com/uUE8avFp
Thanks for the report, haven't had much testing of TT with ComputerCraft as it's disabled on most large servers. I'll try to get that fixed soon. Can you follow the same instructions I gave to NooBxGockeL above, so we can see what's causing lag?