MalisisCore

48M Downloads

MalisisCore Raytracing taking up large amounts of server time.

Claycorp opened this issue ยท 34 comments

commented

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?

commented

Is this with only Malisis mods installed ?

commented

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.

commented

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 ?

commented

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.

commented

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.

commented

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.

commented

So now people can't open/close the specific doors unless they hit the right spot?

commented

For the big doors, yes.

commented

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.

commented

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.

commented

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,

commented

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.

commented

I never tested the version before this one so i have no idea.

commented

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.

commented

Should be fixed in 1.10.2-4.2.0. Please reopen if issue still persists.

commented

I'm afraid it's not fixed.
omg the lag
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

commented

You scared the hell out of me ___.

commented

Yeah totally sorry about that. Updating the server as we speak to the latest stuff. I misjudged when I updated last.

commented

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

commented

No, there is no development for out of date versions anymore. You should update to 1.10.2.

commented

Can you please make a backport to 1.7.10 with the fix?

commented

Like I said, 1.7.10 is dead. It's a 3 years old version. There is no development for it anymore.

commented

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.

commented

@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.

commented

@dries007 Thanks, what you changed in the code? =)

commented

Same thing I did to the 1.9 build we used for a while: I commented out the ASM hook that does the raytracing.

commented

@dries007 lol, thanks =)

commented

Clients needed to install the fixed version :X

commented

@Eufranio I fixed that, see original post. The version pretends to be 0.14.3

commented

Really? MalisisDoors is a cool mod, I didn't want remove it from the server :/

commented

Don't remove it, update.

commented

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.

commented

Can you point me to the commits with the fix?

commented

I guess it would be that one : 425611b
But good luck with that...