Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-154629

server v1.14.2 running in kvm guest uses 100% of CPU on host

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Duplicate
    • Affects Version/s: Minecraft 1.14.2
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
    • Confirmation Status:
      Unconfirmed
    • Category:
      (Unassigned)

      Description

      Running the 1.14.2 jar in a Debian 9.9 or 10 guest uses 100% of a core on the host when idle, with no players. With players, it uses at least 100% of a core. A `top' on the guest indicates the running server is using 6 to 8 percent of the vCPU.

       

      /proc/interrupts shows the local timer interrupts increasing at around 180K/sec on the guest and host.

       

      To reproduce:

      1) On a Debian 9.9 system, craft a qemu-kvm guest with sufficient memory  and disk

      2) Download the 1.14.2 jar, start it with the flags given on the download page

      3) Wait for the world to be created

      4) Enjoy the "can't keep up" messages.

       

      Profiling with visualvm seems to indicate a large majority of the time is spent in netty/epoll-wait. Really, like, almost all...

       

      An strace, on the guest, of the most active thread just pours out the following:

       

      futex(0x7f5be0a2d468, FUTEX_WAIT_PRIVATE, 0, {tv_sec=0, tv_nsec=733}) = -1 ETIMEDOUT (Connection timed out)
      futex(0x7f5be0a2d418, FUTEX_WAKE_PRIVATE, 1) = 0
      futex(0x7f5be0a2d468, FUTEX_WAIT_PRIVATE, 0, {tv_sec=0, tv_nsec=724}) = -1 ETIMEDOUT (Connection timed out)
      futex(0x7f5be0a2d418, FUTEX_WAKE_PRIVATE, 1) = 0
      futex(0x7f5be0a2d468, FUTEX_WAIT_PRIVATE, 0, {tv_sec=0, tv_nsec=753}) = -1 ETIMEDOUT (Connection timed out)
      futex(0x7f5be0a2d418, FUTEX_WAKE_PRIVATE, 1) = 0
      futex(0x7f5be0a2d468, FUTEX_WAIT_PRIVATE, 0, {tv_sec=0, tv_nsec=742}) = -1 ETIMEDOUT (Connection timed out)
      futex(0x7f5be0a2d418, FUTEX_WAKE_PRIVATE, 1) = 0
      futex(0x7f5be0a2d468, FUTEX_WAIT_PRIVATE, 0, {tv_sec=0, tv_nsec=669}) = -1 ETIMEDOUT (Connection timed out)
      futex(0x7f5be0a2d418, FUTEX_WAKE_PRIVATE, 1) = 0
      futex(0x7f5be0a2d468, FUTEX_WAIT_PRIVATE, 0, {tv_sec=0, tv_nsec=710}) = -1 ETIMEDOUT (Connection timed out)
      futex(0x7f5be0a2d418, FUTEX_WAKE_PRIVATE, 1) = 0
      futex(0x7f5be0a2d468, FUTEX_WAIT_PRIVATE, 0, {tv_sec=0, tv_nsec=743}) = -1 ETIMEDOUT (Connection timed out)
      futex(0x7f5be0a2d418, FUTEX_WAKE_PRIVATE, 1) = 0
      futex(0x7f5be0a2d468, FUTEX_WAIT_PRIVATE, 0, {tv_sec=0, tv_nsec=700}) = -1 ETIMEDOUT (Connection timed out)
      futex(0x7f5be0a2d418, FUTEX_WAKE_PRIVATE, 1) = 0
      futex(0x7f5be0a2d468, FUTEX_WAIT_PRIVATE, 0, {tv_sec=0, tv_nsec=736}) = -1 ETIMEDOUT (Connection timed out)
      futex(0x7f5be0a2d418, FUTEX_WAKE_PRIVATE, 1) = 0
      futex(0x7f5be0a2d468, FUTEX_WAIT_PRIVATE, 0, {tv_sec=0, tv_nsec=729}) = -1 ETIMEDOUT (Connection timed out)
      futex(0x7f5be0a2d418, FUTEX_WAKE_PRIVATE, 1) = 0
      futex(0x7f5be0a2d468, FUTEX_WAIT_PRIVATE, 0, {tv_sec=0, tv_nsec=710}) = -1 ETIMEDOUT (Connection timed out)

       

      Seems a rather short time to wait...

       

      On the host side, the qemu-kvm profiling seems to indicate that the guest thread is spending all of it's time servicing timer interrupts.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              leeward Lee Ward
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: