CPU Usage Climbs #18


  • Defect
  • Waiting
Open
Assigned to _ForgeUser7479062
  • _ForgeUser8494594 created this issue Feb 8, 2013

    Posting my previous comments to the ticket system as a fix hasn't been mentioned.

    DwDNPC v2.6.0
    Spigot-b375

    CPU usage slowly climbs. Woke up this morning to find the CPU sitting at ~ 95%. This is on my dev server with no players on. Restarted server and came back an hour later to find it sitting at ~ 20% CPU usage. Removed DwDNPC came back 2 hours later, CPU usage was at 1% as normal.

    Tried /dwdnpc reload and there was no difference. Server is running Debian Wheezy and OpenJDK7.

    Should mention that i ran NoLagg Examiner and it didn't detect anything with DwWNPC. The odd thing about the report was that NoLagg was lagging. I can submit the whole report, but i'll paste the relevant bits here:

    Total duration: 487.659 ms / 500 ticks
    Average duration: 0.975 ms/tick
    Selected event: EntityRemoveEvent[MONITOR]
    Plugin: NoLagg
    Location: class com.bergerkiller.bukkit.nolagg.itemstacker.NLISListener

    and

    Total duration: 273.03 ms / 500 ticks
    Average duration: 0.546 ms/tick
    Selected task: Task #24
    Plugin: NoLagg
    Location: com.bergerkiller.bukkit.nolagg.itemstacker.StackFormer$1

    I have the feeling that NoLagg was reported as a false positive in this test due to the unknown issue with DwDNPC.

  • _ForgeUser8494594 added the tags New Defect Feb 8, 2013
  • BillyGalbreath posted a comment Feb 9, 2013

    This is a known issue and I'm still trying to peg the exact cause so I can fix it.

    From what I can tell, the plugin seems to be spawning multiple "entities" for the NPC characters, at the look-at-delay interval. So if you have 10 NPCs on the server, and the look-at-delay set to 20 ticks then every 1 second of uptime there are 10 entities spawned on the server.

    This is not 100% verified yet (hard to track "false" entities) but seems to be the major cause of the CPU usage.

    Other people have used 3rd party plugins to view the number of spawned entities and reports as high as 25,000 in a world with only 1 player on with only 7 NPCs.

    For a quick "work-around" type temporary fix you ccan issue the command /dwdnpc reload which seems to kill all the "false" entities and lower the CPU usage to a normal amount.

  • BillyGalbreath removed a tag New Feb 9, 2013
  • BillyGalbreath added a tag Accepted Feb 9, 2013
  • _ForgeUser8494594 posted a comment Feb 10, 2013

    @BillyGalbreath: Go

    So i'm guessing that the newer versions of DwDNPC are still plagued by this :/ Doing /dwdnpc reload did not help when i was testing this. If i set the look-at-delay to something crazy high, what would the negative side effects be?

  • BillyGalbreath posted a comment Mar 24, 2013

    I'm no longer developing this plugin. I have a new plugin called Pl3xNPC which has replaced this one. http://dev.bukkit.org/server-mods/pl3xnpc/

    Pl3xNPC is not plagued by this high CPU usage bug.


    Edited Mar 27, 2013
  • _ForgeUser7479062 posted a comment Apr 7, 2013

    @lANTHONYl: Go

    Please try ouy compatible 1.5.1 Dev release from our Jenkins page HERE

    This was tested on the following: Spigot Build: #735 CraftBukkit Equivalent Build: #2717

    Tell me if this fix things?

    -DwDMadMac

  • _ForgeUser7479062 removed a tag Accepted Apr 7, 2013
  • _ForgeUser7479062 added a tag Waiting Apr 7, 2013

To post a comment, please login or register a new account.