TickThreading - concurrent entity/tile entity ticks and other optimisations

nallar

New Member
Jul 29, 2019
270
0
0
I need to recheck this again when I get home today, but after the last couple of TT updates, last night I found that my little dispensing station was no longer working. I have an automatic dispensing chest (bukkit plugin) that dispenses an item and a Buildcraft Obsidian pipe used to pick up those items. The problem, is that the Obsidian Pipe is no longer picking up the items. When the items come out of the chest, it looks like something is trying to group them up, then places those items a few blocks away, which is out of reach of the pipe to pick up. The way I got it working for now is to surround the whole area in blocks so that those dispensed items have nowhere to go other than to fall onto the pipe. I have a feeling regardless of how the items are dispenced, the same problem is going to happen (with a dispencer, etc.)

Also, my idle without any players, without any chunk loaders is below 1%. Goes from .7 to 1. When I join, its around 3%, and when I add a few other players, the %'age does not go up... on average, so about 3-4% with a few players. However, when I add a Railcraft "train" with a chunk loader (or just me sitting in the train), the overall usage jumps to an average of 10-12%, and stays there. I have 2 main server based train stations, one east and west, and one north and south. I'm a little unsure why a simple train is using close to 10% of the server, overall and am a little afraid to put up the other North/South train or even let my players use Railcraft. Is it because of the loaded chunks? I'm only showing 550 on average. Any way to have carts force chunks to be unloaded immediately after the trains passes through (might be more of a Railcraft question).

One last thing, is there any way to see how many threads is being used by TT? The config is set to autodetect the threads, but would server as a little piece of mind if I knew TT saw all of my cores.

Everything else is working good.

[Edit] The trains are set to wait for 2 minutes at each station, and even after sitting at the station, the Overall usage still remains @ 10-12%. 10 carts total, 1 Loco, 1 Admin Chunk Loader, and 8 regular carts.

Autodetect just uses as many threads as you have cores.

Can you run `/profile e` after placing a train? Check with `/ticks` that forced chunks actually does increase when using them.
 

saki2fifty

New Member
Jul 29, 2019
73
0
0
Autodetect just uses as many threads as you have cores.

Can you run `/profile e` after placing a train? Check with `/ticks` that forced chunks actually does increase when using them.

Ok, I can do it later on today.

I only ask about the cpu/thread thing because /ttps and my vm show 2 different loads on the cpu. I just remoted in and the load right now with noone on is @ approx. 7% overall, and my vm is only showing 1.7% approx with a chunk loaded train going around. Just didn't know if because they are virtual cpu's if it wasn't picking those up properly (I have 4 physcial cpu's with 4 cores each, I guess it'll pick up cores on another cpu?).

/ttps and /ticks:
7-22-2013 12-46-29 PM.jpg


VM cpu usage:
rrd.png


7-22-2013 1-04-02 PM.jpg


But maybe im misunderstanding the /tps overall number. I might just put the whole MC server outside of the VM and straight on the server itself to see if there is any change.
 

nallar

New Member
Jul 29, 2019
270
0
0
Ok, I can do it later on today.

I only ask about the cpu/thread thing because /ttps and my vm show 2 different loads on the cpu. I just remoted in and the load right now with noone on is @ approx. 7% overall, and my vm is only showing 1.7% approx with a chunk loaded train going around. Just didn't know if because they are virtual cpu's if it wasn't picking those up properly (I have 4 physcial cpu's with 4 cores each, I guess it'll pick up cores on another cpu?).

/ttps and /ticks:
7-22-2013 12-46-29 PM.jpg


VM cpu usage:
rrd.png


7-22-2013 1-04-02 PM.jpg


But maybe im misunderstanding the /tps overall number. I might just put the whole MC server outside of the VM and straight on the server itself to see if there is any change.

Ideally, /tps would be the same as CPU usage, however it isn't.

It measures the percentage of the target time per tick a tick actually took. 50ms is the target. TT doesn't thread everything, some things such as handling most packets from clients are still single threaded, only world entity and chunk ticks are threaded. So if it takes 3ms to handle a packet, during that 3ms no other cores will be doing anything, effectively wasting them for that time.

There are options to make more stuff concurrent (concurrentNetworkTicks / disabling waitForEntityTickCompletion), but they're off by default as they make things more buggy.
 

Ani76

New Member
Jul 29, 2019
9
0
0
Hi
How to make the server be able to restart automatically after a deadlock. The Bukkit-Reboot doesn't work. The server is shutting down and the console window closes itself after the deadlock.


We're using Version TickThreading-1.4.7-1.0.0.2096


The configuration of TickThreading.cfg:


# If the server should shut down when a deadlock is detected
B:exitOnDeadlock=true


Sincere regards,

ANI76
 

Trec93

New Member
Jul 29, 2019
24
0
0
just a little info, removing water flow causes one-two cores to run at 100% which causes a massive tick lag.
for example removing water from a quarry hole.
 

DZCreeper

New Member
Jul 29, 2019
1,469
0
1
Its because every connected water block that isn't already a source block has to recalculate as the source blocks get removed and create/modify the pattern of flowing water.

I personally use WorldEdit to fill the quarry holes with cobble or air to keep lag down.
 

cpy

New Member
Jul 29, 2019
42
0
0
Any word on 1.6.2? Search function does NOT work (gj idiot coders), google search gives only 1st post notice of 1.6.2. I haven't seen nallar talking about 1.6.2.
 

nallar

New Member
Jul 29, 2019
270
0
0
Hi
How to make the server be able to restart automatically after a deadlock. The Bukkit-Reboot doesn't work. The server is shutting down and the console window closes itself after the deadlock.


We're using Version TickThreading-1.4.7-1.0.0.2096


The configuration of TickThreading.cfg:


# If the server should shut down when a deadlock is detected
B:exitOnDeadlock=true


Sincere regards,

ANI76

Use a script like this to start it


while true
do
// Your server start line goes here.
echo "Server restarting in 10 seconds, [CTRL+C] to stop.."
sleep 10
done
 

Ani76

New Member
Jul 29, 2019
9
0
0
Thanks nallar :)

This script is for Windows server:
@echo off
title Ultimate Server
set server="G:\Ultimate\mcpc-plus-legacy-1.4.7-R1.1-SNAPSHOT-f534-L67.jar"

:ultimate
echo (%time%) Ultimate started.
start /B /wait java -Xms8G -Xmx8G -XX:MaxPermSize=512m -XX:UseSSE=4 -XX:+UseConcMarkSweepGC -XX:+UseCMSCompactAtFullCollection -XX:+UseParNewGC -XX:+DisableExplicitGC -XX:-OmitStackTraceInFastThrow -jar %server%
echo (%time%) WARNING: Ultimate Server closed , restarting.
timeout /t 15 /nobreak
goto ultimate


Mfg
Ani76
 

saki2fifty

New Member
Jul 29, 2019
73
0
0
Question, if I place 10,000 TE's in one chunk, would it have a greater impact on the server and TT than if they were spread throughout the map? Or would it not matter?
 

nallar

New Member
Jul 29, 2019
270
0
0
Question, if I place 10,000 TE's in one chunk, would it have a greater impact on the server and TT than if they were spread throughout the map? Or would it not matter?

Total tick time can be no shorter than the tick time of the slowest chunk. As long as the tick time of the slowest chunk is < that it's fine. See /ticks, if you see a chunk with a very very high time and that's about the same as the average effective tick time then you're having this problem.
 

saki2fifty

New Member
Jul 29, 2019
73
0
0
I got home today wondering if I could use NoLagg or Ptweaks along with TT to help out with some of the server lag. I tried out NoLagg but it did not work (regardless of what I turned off in the config), but I did install Ptweaks and I am completely shocked at the difference it made. I do not understand all of the technicalities as a programmer would, but I do understand the basic concept of how each work, and the basic of how Minecraft itself works.

The end result is all I'm concerned with and the playability, and right now, I'm ecstatic. I've used PTweaks many times before, but don't think I've ever seen this kind of performance before. Has to be TT. But what do I know.

PTweaks "MonsterLimiter" has been disabled completely, so all mobs are spawning naturally.

PlayerSimulator "players" are static, and do not move. However, chunks do load around them along with everything else just as though a real player is standing there. The only difference, is that the "bot" is standing still.

I am getting a few errors in the console from TT, but the tests were working perfect.

Server : MCPC+ latest 1.5.2 build
Mods : TickThreading
Plugins : bPermissions / PlayerSimulator / pTweaks / Vault / WorldEdit / RoyalCommands

Spawning 4000 doors. Client lagged, but the server looking good. Look at those E's, TE's, C's, and P's!!!! :
TT01.png


This time I spawned 4000 doors with only 1 player on (me!):
TT02.png


Spawned 1000 pigs. Client dropped to 28fps from 120 or so. Server still a tickin':
TT03.png


Spawned 1000 cows on top of the little piggies:
TT04.png


Spawned 1500 ocelots on top of the piggies and cows. Client lagged so I had to use the server to get the details. Overall usage @ 8% :
TT05.png

And the big daddy. Almost 100,000 TE's!!!
TT06.png

This is unreal. What completely amazes me is even though I don't understand what's exactly is happening here, everything in game is completely, and 100% lag free. When I drop a block... instant. When I hit a mob, instant. The only thing that is laggy (and its only client side), is moving around a bunch of animated TE's like the above screenshot.

I love it!

Now the REAL TEST, is putting my mods back on and testing with some REAL TE's!!! None of that vanilla stuff. If I can get 50-75 players at 100,000 TE's, man that would be great! Hopefully, im not overlooking something... I usually am.

Got work tomorrow, and am pretty happy this worked out.

[Edit]
Oh, and i'm using Java 8 as the Average Effective Tick Time was @ .15 on Java 7 and on Java 8 it was at .05 (No players, and @ idle). 3 times as responsive??? Just gonna live with it not auto-rebooting for now.
 

saki2fifty

New Member
Jul 29, 2019
73
0
0
Yes, I would have to say so!

I had an old server that we/I dont use anymore, so I provisioned it for MC solely.

Quad core, Quad cpu 8000 series Opteron CPU's @ 2.8ghz each (16 cores total). Ha, what we paid for those vs. how much you can get them for now is ridiculous.
(4) OCZ 256GB SSD Vertex III Maxiops 6Gb/s drives in RAID 10 format.
128GB ECC/Registered Server Ram.
Redundant P/S's
Colocated, so we own it.
100Mbps dedicated
Proxmox with one VM created specifically for MC use, with all resources thrown to that one VM.
Java 8.

Those cpu's are old school now, and can be had for a dime a dozen.
 

Ani76

New Member
Jul 29, 2019
9
0
0
I have a big problem with Buildcraft Pipes :(
pastbin

After the last update, we have a couple of errors with
2013-07-27 17:34:56 [WARNING] [Buildcraft] Pipe failed to load from NBT at 24,75,-2447
2013-07-27 17:34:56 [WARNING] [Buildcraft] Detected pipe with unknown key (-1). Did you remove a buildcraft addon?

i use :
mcpc-plus-legacy-1.4.7-R1.1-SNAPSHOT-f534-L67
TickThreading-1.4.7-1.0.0.2100
and the Ultimate pack

The server crashes after about 1-2 hours at about 40 players. what can I do?

Ani76
 

nallar

New Member
Jul 29, 2019
270
0
0
You already replied to my response to this issue where I linked to https://github.com/nallar/TickThreading/issues/933#issuecomment-21386935

As that states, restore to a backup from before updating to one of the broken builds, and use the latest build of TT. You've now waited far too long to restore a backup, and will presumably have some angry players losing stuff. If you haven't made backups, nothing I can do. (and I do tell people repeatedly to make them...)