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

nallar

New Member
Jul 29, 2019
270
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
That's fixed, thanks. I don't want to mess around too much with the java parameters, as correct GC settings can be environment specific and it's easy to make something that works well for me and badly for others.

The issue with the previous parameters was the stack size, if you want to use them just remove the parameters for the stacksize and it should be fine.
 

NooBxGockeL

New Member
Jul 29, 2019
93
0
0
Code:
2013-01-11 01:46:41 [INFO] [STDOUT] Something's taking too long! 'root.levels.world.entityTick.entities.regular' took aprox 129.625573 ms
2013-01-11 01:46:41 [INFO] [STDOUT] Something's taking too long! 'root.levels.world.entityTick.entities' took aprox 130.619311 ms
2013-01-11 01:46:41 [INFO] [STDOUT] Something's taking too long! 'root.levels.world.entityTick' took aprox 130.720601 ms
2013-01-11 01:46:41 [INFO] [STDOUT] Something's taking too long! 'root.levels.world' took aprox 140.23872 ms
2013-01-11 01:46:41 [INFO] [STDOUT] Something's taking too long! 'root.levels' took aprox 257.216034 ms
2013-01-11 01:46:41 [INFO] [STDOUT] Something's taking too long! 'root' took aprox 291.909293 ms
2013-01-11 01:46:42 [INFO] [STDOUT] Something's taking too long! 'root.levels' took aprox 173.959129 ms
2013-01-11 01:46:42 [INFO] [STDOUT] Something's taking too long! 'root' took aprox 190.939098 ms
2013-01-11 01:46:42 [INFO] [STDOUT] Something's taking too long! 'root.levels' took aprox 181.823961 ms
2013-01-11 01:46:42 [INFO] [STDOUT] Something's taking too long! 'root' took aprox 204.211762 ms
2013-01-11 01:46:42 [INFO] [STDOUT] Something's taking too long! 'root.levels' took aprox 183.831011 ms
2013-01-11 01:46:42 [INFO] [STDOUT] Something's taking too long! 'root' took aprox 187.799428 ms
2013-01-11 01:46:42 [INFO] [STDOUT] Something's taking too long! 'root.levels' took aprox 145.464943 ms
2013-01-11 01:46:42 [INFO] [STDOUT] Something's taking too long! 'root' took aprox 147.202553 ms
2013-01-11 01:46:42 [INFO] [STDOUT] Something's taking too long! 'root.levels' took aprox 151.634964 ms
2013-01-11 01:46:42 [INFO] [STDOUT] Something's taking too long! 'root' took aprox 153.109858 ms
2013-01-11 01:46:43 [INFO] [STDOUT] Something's taking too long! 'root.levels' took aprox 122.987931 ms
2013-01-11 01:46:43 [INFO] [STDOUT] Something's taking too long! 'root' took aprox 124.002247 ms
Thats about yeah 3 second xD will do longer debug tomorow
it repeated most of it...

EDIT:
@nallar: saw your post now, thanks i will try that tomorrow too.
 

nallar

New Member
Jul 29, 2019
270
0
0
Code:
2013-01-11 01:46:41 [INFO] [STDOUT] Something's taking too long! 'root.levels.world.entityTick.entities.regular' took aprox 129.625573 ms
2013-01-11 01:46:41 [INFO] [STDOUT] Something's taking too long! 'root.levels.world.entityTick.entities' took aprox 130.619311 ms
2013-01-11 01:46:41 [INFO] [STDOUT] Something's taking too long! 'root.levels.world.entityTick' took aprox 130.720601 ms
2013-01-11 01:46:41 [INFO] [STDOUT] Something's taking too long! 'root.levels.world' took aprox 140.23872 ms
2013-01-11 01:46:41 [INFO] [STDOUT] Something's taking too long! 'root.levels' took aprox 257.216034 ms
2013-01-11 01:46:41 [INFO] [STDOUT] Something's taking too long! 'root' took aprox 291.909293 ms
2013-01-11 01:46:42 [INFO] [STDOUT] Something's taking too long! 'root.levels' took aprox 173.959129 ms
2013-01-11 01:46:42 [INFO] [STDOUT] Something's taking too long! 'root' took aprox 190.939098 ms
2013-01-11 01:46:42 [INFO] [STDOUT] Something's taking too long! 'root.levels' took aprox 181.823961 ms
2013-01-11 01:46:42 [INFO] [STDOUT] Something's taking too long! 'root' took aprox 204.211762 ms
2013-01-11 01:46:42 [INFO] [STDOUT] Something's taking too long! 'root.levels' took aprox 183.831011 ms
2013-01-11 01:46:42 [INFO] [STDOUT] Something's taking too long! 'root' took aprox 187.799428 ms
2013-01-11 01:46:42 [INFO] [STDOUT] Something's taking too long! 'root.levels' took aprox 145.464943 ms
2013-01-11 01:46:42 [INFO] [STDOUT] Something's taking too long! 'root' took aprox 147.202553 ms
2013-01-11 01:46:42 [INFO] [STDOUT] Something's taking too long! 'root.levels' took aprox 151.634964 ms
2013-01-11 01:46:42 [INFO] [STDOUT] Something's taking too long! 'root' took aprox 153.109858 ms
2013-01-11 01:46:43 [INFO] [STDOUT] Something's taking too long! 'root.levels' took aprox 122.987931 ms
2013-01-11 01:46:43 [INFO] [STDOUT] Something's taking too long! 'root' took aprox 124.002247 ms
Thats about yeah 3 second xD will do longer debug tomorow
it repeated most of it...

EDIT:
@nallar: saw your post now, thanks i will try that tomorrow too.
The debug log saves its information to a file in the debug folder in your server directory, I'll need to see that. Although that is definitely very slow... :(
 

nallar

New Member
Jul 29, 2019
270
0
0
I'm going to try the most recent builds on my singleplayer world. I'll post any crashes that I run into.

[edit] *sigh* I crashed again. Logs: http://pastebin.com/dKbv4MFB
Looks like there's a patcher issue, it's breaking the IntegratedServer class by modifying the MinecraftServer class, will need to look into that later. For now, getting TT working on clients isn't top priority.

edit: Fixed-ish-maybe, can you try repatching with the latest build? If it gives an error, it'll actually be a useful one at least :)

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
Actually, that report isn't a full report. You need to pastebin the contents of tickthreading.log.
 

NooBxGockeL

New Member
Jul 29, 2019
93
0
0
Okay here is the first debug with my old parameter that are listed in the install.md:
Server was nearly empty, sometimes one player joined and stayed for a bit, overall test lasted ~3,5 hours.
http://pastebin.com/fKAiiwrR

If you really need the normal Log or Forgeloader log, just say it, didnt uploaded it because its veeeery big(damn ic2.api errors)
 

NooBxGockeL

New Member
Jul 29, 2019
93
0
0
Its not nallar causing them and i think nallar dont has access/permission to change IC2 or Advanced machines.​
Its a known bug aswell and got fixed (read that somewhere, i think u need to update IC2 and forge).​
Just use our little friend google and you'll find something.​
 

Puremin0rez

New Member
Jul 29, 2019
90
0
0
Its not nallar causing them and i think nallar dont has access/permission to change IC2 or Advanced machines.​
Its a known bug aswell and got fixed (read that somewhere, i think u need to update IC2 and forge).​
Just use our little friend google and you'll find something.​

I know it's not nallar causing them, but his patcher will probably have the ability to remove the debug message such as that.

He's already changing code in mods by patching them, so if he doesn't have permission to do so, it's already a little too late XD

Yeah I'm already aware of how to fix it, but I would need to force my users to update IC2 too - don't want to do that
 

nallar

New Member
Jul 29, 2019
270
0
0
Random error: http://pastebin.com/apxGrbpD
Build 290

Now suddenly 8000 entities appear at my base when I log in, and I get around 0.5 FPS. Is this something related to TickThreading?
This is the error I'm getting when it happens: http://pastebin.com/wbkCCAJF

Have you fixed ChunkLoaders and ComputerCraft?
I'm unable to fix CC as the log was incomplete due to a bug with the logging :(

The logging issue is fixed in the latest build, and I believe the chunkloading issue is also fixed. No idea if 8000 entities appearing is related to TT, if it happens again report it.

Also, logs are now saved in the TickThreadingLogs directory.

Okay here is the first debug with my old parameter that are listed in the install.md:
Server was nearly empty, sometimes one player joined and stayed for a bit, overall test lasted ~3,5 hours.
http://pastebin.com/fKAiiwrR

If you really need the normal Log or Forgeloader log, just say it, didnt uploaded it because its veeeery big(damn ic2.api errors)
Try /ticks, it will list the slowest ticking chunks. TT actually is the slowest thing there! Although you are still managing ~20TPS. Lag spikes (and also slightly lower than 20 TPS) may be caused by the world saving minecraft does every 45 seconds. In one of the recent builds I added the option to change the save interval, you may want to try that.

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?
More threads are used than cores because some time will be spent waiting for other things to finish, and not doing any work. For example, if two tick regions next to each other are ticking, they will never tick entities next to each other at the same time. Adding more threads means that while that's waiting, another tick region can be ticked.

I could probably work on better ordering of ticks instead, but this method is easier and also works in any situation, while better ordering would help only with that example.
 

gustav9797

New Member
Jul 29, 2019
23
0
0
Okay, thanks. The latest builds are running really good! Can you make build 321 with the chunkloading fix?
Also the 8k entity issue was twilights boars, they bred themselves spawning 3000 entities in one place.
 

nallar

New Member
Jul 29, 2019
270
0
0
.... I know right?

Could you patch out the IC2 logging errors by any chance nallar?
Try replacing only the EnergyNet.class and EnergyNEt$Something.class files in IC2 from the new IC2 jar before patching. (Or put it into the IC2 jar in the TickThreadingBackups directory and repatch)
 

Puremin0rez

New Member
Jul 29, 2019
90
0
0
Try replacing only the EnergyNet.class and EnergyNEt$Something.class files in IC2 from the new IC2 jar before patching. (Or put it into the IC2 jar in the TickThreadingBackups directory and repatch)

Good idea! Will try soon.