MalisisCore Raytracing taking up large amounts of server time.
Claycorp opened this issue ยท 34 comments
https://dries007.net/screenshots/2016-08-24_23-15-50.png
https://dries007.net/screenshots/2016-08-24_23-16-17.png
~13% of server time is being used on raytracing for zombie AI. Is there a reason for this?
No it's in a pack. The only thing that adds mobs is enderzoo. I can put up a test server and see if i can replicate it.
From what I see, the issue is not about mobs. It's about ChunkCollision.getRayTraceResult() triggering loading of Chunk when it's definitely NOT supposed to. So I wonder if some mod is messing with the world chunk provider...
EDIT: actually, scratch that, it's not really loading unloaded chunks...
Does the server have loads of Big Doors ?
That's going to be a tough one to track down. I'll mess with it later and see what I can figure out.
If you have any ideas feel free to let me know.
EDIT: AFAIK there's almost no big doors. There's only a few people playing (normally ~5, ~10 on a busy day.) We just added your mods a week ago and I saw one garage door. That's it. It was about 7x5 in size.
For now, I commented out the registration and made a custom build with the same sources (downloaded from curse), and it fixed the issue.
If you want to make a custom build for me to run and help you find what is happening, we are using 4.1.1.
What features are we actually missing by removing this? I don't have time to look any deeper at the moment.
This feature allows blocks that implement IChunkCollidable to provide a bounding box that go past their 1x1x1 space.
Note : Currently, only the Big Doors (Medieval and Carriage doors) and the the Advert block (from MalisisAdvert) use it.
So now people can't open/close the specific doors unless they hit the right spot?
Hi there! We're also seeing this issue with one of our customer's servers, running All the Mods with MalisisCore v4.1.1. Disabling the three Malisis mods brought the server's TPS back from 5 to 20.
WarmRoast snapshot: http://i.3h.io/100pS/1u5B9NqX
Let me know if we can provide any additional information that might help you find the issue.
We just had to remove MalisisCore, Blocks, and Doors, from our install of the All the Mods pack. On a server of 20-ish players MOBs tracking players was taking up about 60% of our CPU and MTPS was down to 3.9 and ... Oh, we're the customer jhead is talking about.
If you want to use my custom build (compatible with 4.1.1) untill a fix can be made:
https://dl.dries007.net/malisiscore-1.9.4-4.1.1-CUSTOM.jar
ALSO: You may wanna let the pack maker know. So they can at the very least add a warning or attempt to find out if its a bad mod interaction to help narrow it down,
What's curious is that it was never an issue before the latest version, right ? I don't really understand what's changed then. I'll see if I can optimize it more for the next version.
I found why it's way heavier than anticipated : https://github.com/Ordinastie/MalisisCore/blob/1.9.4/src/main/java/net/malisis/core/util/chunkcollision/ChunkCollision.java#L129.
I didnt' consider that entities could raytrace to other entities quite far away.
I should process only chunks actually traversed by the raytracing, and not building a full AABB for this.
I'm afraid it's not fixed.
This is not a long term warmroast, so take the exact numbers with a grain of salt, but it does drag my box to a grinding 5tps with 5-7 players active in areas with doors.
@Claycorp updated to 411 instead of 420, sorry
Yeah totally sorry about that. Updating the server as we speak to the latest stuff. I misjudged when I updated last.
Not fixed in 1.7.10, is there a backport of the fix? I've profiled and the root of the lag seems to be MalisisCore...
MalisisReport.zip
No, there is no development for out of date versions anymore. You should update to 1.10.2.
Like I said, 1.7.10 is dead. It's a 3 years old version. There is no development for it anymore.
For people what use the 1.7.10 version, when using malissis doors, the lag cause is the carriege door and medieval door, you can block it.
@HeyZeer0 and @Eufranio This download has the same duct tape fix as my 1.9 version. It removes the raytracing thing all together. It does mean that you can't open the large doors by clicking just any of the blocks.
http://dl.dries007.net/malisiscore-1.7.10-0.14.4-CUSTOM.jar
http://dl.dries007.net/malisiscore-1.7.10-0.14.3-CUSTOM.jar
Please let me know if it doesn't work.
@dries007 Thanks, what you changed in the code? =)
Same thing I did to the 1.9 build we used for a while: I commented out the ASM hook that does the raytracing.
@dries007 lol, thanks =)
@Eufranio I fixed that, see original post. The version pretends to be 0.14.3
I can't update all my 158 mods to 1.10, many are in dev but that's it, modded 1.7 is modded 1.7, many servers still using it, is not so simple. Thank you by the help anyway.
I guess it would be that one : 425611b
But good luck with that...