Jump to content

Recommended Posts

Posted

On my up-to-date debian buster server installation:

# cat /etc/debian_version
10.7
# java --version
openjdk 11.0.9.1 2020-11-04
OpenJDK Runtime Environment (build 11.0.9.1+1-post-Debian-1deb10u2)
OpenJDK 64-Bit Server VM (build 11.0.9.1+1-post-Debian-1deb10u2, mixed mode, sharing)
# apt-cache policy openjdk-11-jre-headless
openjdk-11-jre-headless:
  Instalados: 11.0.9.1+1-1~deb10u2
  Candidato:  11.0.9.1+1-1~deb10u2
  Tabla de versión:
 *** 11.0.9.1+1-1~deb10u2 500
        500 http://debian.redimadrid.es/debian buster/main amd64 Packages
        100 /var/lib/dpkg/status
     11.0.9+11-1~deb10u1 500
        500 http://security.debian.org/debian-security buster/updates/main amd64 Packages

# uname -a
Linux eneri 4.19.0-14-amd64 #1 SMP Debian 4.19.171-2 (2021-01-30) x86_64 GNU/Linux


model name      : AMD Athlon(tm) 64 X2 Dual Core Processor 4400+
cpu MHz         : 2200.000


Minecraft 1.16.5, Forge 36.0.13. I've also tried previous forge versions (all of them 36.0.x) with the same result

 

When running vanilla server, two java threads are using around 10-20% CPU time when no players are connected. Almost all of this CPU time is user CPU time

 

Same scenario with forge 36.0, one java thread is using around 10-20% CPU, but another one is always using 100% of one complete core with around 75% sys (kern) CPU time

 

I've straced the problematic java thread, and it's running this syscall

clock_gettime(CLOCK_MONOTONIC, {tv_sec=204463, tv_nsec=427087879}) = 0

around 11900 times a second.

 

Is this behavior normal with forge installed or is it a bug ?

Posted (edited)


 

  On 2/4/2021 at 6:36 PM, diesieben07 said:

Do you see the same behavior with a vanilla Minecraft server?

Expand  

No, vanilla server uses far less CPU time than forge.

 

I've just started vanilla server and straced java thread. It seems it's running the same syscall but only around 7500 times per second.

This seems to be the difference that makes forge use much more kern CPU time that vanilla.

 

Edited by Davide
Posted

Forge uses more threads and uses more of your CPU's power, when running your tests were you viewing CPU usage as a single value or was it broken down by core or thread?

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

  Reveal hidden contents

 

  • 1 month later...
Posted
  On 2/12/2021 at 3:57 PM, DaemonUmbra said:

Forge uses more threads and uses more of your CPU's power, when running your tests were you viewing CPU usage as a single value or was it broken down by core or thread?

Expand  

Sorry for my late answer. Still happening in latest forge.

 

What I'm seeing is a single thread always using a full core, regardless of whether the server is loaded or not.

 

The screeshot below was taken with the server idle, no users connected. Thread 30991 is using a complete core by itself. 75% of the CPU usage of this thread is system CPU.

 

imagen.thumb.png.fa1636e829941e520139680b52d7277c.png

 

When there are users connected and the server is loaded, the thread is still consuming a full core by itself. The rest of the load is spread over several threads, but all tied to the idle core.

 

What seems strange is that with the server idle, with no users connected, a full core is being used. This behavior leaves only one free core to serve users when they connect.

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.