Create

Create

86M Downloads

[CPU usage and memory leak] Deployers lowers the TPS and increasing the frequency of gc.clean() execution

TheTarasus opened this issue ยท 2 comments

commented

Describe the Bug

When the tree farm moving contraption is activated - the TPS is decreased catastrophically.

I have 24 gigs allocated to server (64 total), Xeon E5 1650 v3 (3.5GHz x 6 cores 12 threads)
The RAM is garbaged catastrophically (+1 gigabyte of garbage every second)

When I activate the simple tree farm from create (with 3 deployers and 3 mechanical saws) - the deployers are lagging the game, and it's lags so much that the server has ~1000 MSPT or 1 TPS.

I use:

  • create-fabric 0.5.1.f-build-1333+mc1.18.2
  • carpet-fixes-1.18.x-1.7.11 (maybe issue is with that mod?)
  • carpet-extra-1.18.2-1.4.72
  • fabric-carpet-1.18.2-1.4.69+v22-331

Reproduction Steps

  1. install create-0.5.1.f
  2. build a simple contraption with deployers
  3. watch as your server suffer

Expected Result

no memory and CPU usage leak, better optimization

Screenshots and Videos

No response

Crash Report or Log

https://spark.lucko.me/5x31JxJOhu - spark profiler log

Operating System

Windows 10

Mod Version

0.5.1f

Minecraft Version

1.18.2

Forge Version

[FABRIC] 0.15.7

Other Mods

Suspicious mods:

  • carpet-fixes-1.18.x-1.7.11
  • carpet-extra-1.18.2-1.4.72
  • fabric-carpet-1.18.2-1.4.69+v22-331
  • my self-patched factions mod (a mod for chunk claims and towns) - this is probably another mod that causes problem

Additional Context

Also, may you please add a configurable option to deployers that they may not execute very greedy safeOnUse() method?

commented

factions seems to be at fault

commented

The Mixin factions$onBlockActivated() is calling factions InteractionManager#onUseBlock which calls InteractionManager#checkPermissions which then calls World#getChunk which is the expensive part here, this isn't related to create at all and is related to whatever factions mod you've got that's mixining into create and running expensive stuff, if this factions mod is your own then you should look into some sort of caching to make calls to checkPermissions much less expensive