Vicio "Hasted" perk costly in server CPU usage
Naxdar opened this issue · 5 comments
Astral sorcery 1.12.2-1.9.4
Forge : 14.23.4.2705
Taking the first vicio perk adds quite a bit of CPU uage per tick, according to LagGoggles. Before taking that perk Astral sorcery is insignificant on the profile screen, after taking it it goes up to 600µs (singleplayer with a minimal amount of mods) or 4-5 ms on a multiplayer server with more mods.
Do you have any images of 5 ms? Maybe a jvm profiler output?
I feel like you underestimate exactly how small 600 microseconds actually is, and how insignificant it is.
600 µs is not much alone but it is for only one player, and you get only 50 ms every tick before the server starts to slow down.
Here is what I got with the perk on the multiplayer server I play on :
Without the perk it goes down to ~500µs.
The server does have a worse CPU than I have.
I can't really get more immediately, I never got to learn how to use jvisualvm.
Okay, so you have 50,000 microseconds to play with before you even TOUCH the TPS barrier. Have a bunch of people take perks and check it, or pull a visualvm reading of the event after taking it, since it doesn't do much of anything before you take any perks. Need to see what the stack looks like, and I've not seen values like that outside of something else hijacking the event thread. There's plenty of tutorials out there for it, specifically for MC servers.
Also, a vanilla hopper not doing anything takes just shy of 100 microseconds. Just sitting there. Not moving anything, just existing and seeing if there's something it should pull or push. Per hopper.
I managed to make two visualvm snapshots in a local server with one player.
The first one is without any attunement or perk (astralsorcery_noperk.nps), the second one is with the vicio attunement and the first perk "Hasted" taken (astralsorcery_vicioperk.nps).
Each one is a profile of one minute of idling.
Most of the time spent is in the PlayerPerkHandler.tick "Self time" line :
I'll leave it to you to decide if that difference of time is concerning or not.