Cyclops Core

Cyclops Core

93M Downloads

High CPU time from capabilities of items in RefinedStorage system

OrdinatorStouff opened this issue ยท 6 comments

commented

MC 1.12.2 (forge 2493)
CyclopsCore-1.12-0.10.19.jar

Seeing very high CPU usage from CyclopsCore Capabilities call traces. Initially it looked like RefinedStorage but as I kept drilling down, Cyclops' capabilities method was at the heart of it.

I'm not sure if this is a known thing or not and if anything can be done about it. I know the nature of having hundreds of thousands of items in a single digital storage network is going to tick high, I just don't know if this kind of real-world SMP profiling information can help track down ways to make it better.

31040401-e9ed72aa-a53b-11e7-804c-58a0ccf1efaf 1
snapshot-1506730916397[1].zip

commented

Sorry for the delay, I finally got around to fixing this. The problem in this case must have been that an RS network for some reason contained empty itemstacks. This won't cause a performance issue anymore in CC.

commented

This is weird, things are being called that should not be called (ItemStack#damageItem and Item#getItemFromBlock)...

What mods are you using that depend on CyclopsCore?

Assuming you are using CommonCapabilities, could you try disabling the wrench capability from the config file, and see if that reduces your tick time?

commented

Mods in the pack that depend on CyclopsCore:

  • Colossal Chests
  • Common Capabilities
  • Integrated Dynamics
  • Integrated Tunnels

I disabled wrench in CommonCapabilities. In the current snapshot I can not even find Cyclops methods in the call tree. HOWEVER at the time this sample was taken there were only 3 players online. TPS is still low but perhaps it is a specific player's RS system contents that had the high call times and those chunks might not be currently loaded. snapshot-1506961427501.zip

I will continue to monitor and take some more samples as different players are online to see Cyclops shows back up again.

commented

Will look into it.

commented

Alright I have some more info. I took a 30-minute-long profiler sample. TPS during this time was between 5 and 10 (>150ms per tick). the aforementioned onItemStackLoad() is still profiling at about 15% of total CPU time over this entire 30 minute period.
cyclopscore ver2
snapshot-1506968274014.zip

commented

Sorry for all the reply spam... BUT I noticed when I checked again that the wrench capability was set to true even though I changed it a couple days ago. I changed it without a restart planning it to go into effect next scheduled start but I guess it causes a crash on startup if set to false and was reverted by another server admin that I wasn't aware of. This means that all of the previous profiles/snapshots are with wrench=true still enabled.