pterodactyl / panel

Pterodactyl® is a free, open-source game server management panel built with PHP, React, and Go. Designed with security in mind, Pterodactyl runs all game servers in isolated Docker containers while exposing a beautiful and intuitive UI to end users.
https://pterodactyl.io
Other
6.66k stars 1.69k forks source link

cpu load #4623

Closed joaoespanhol closed 1 year ago

joaoespanhol commented 1 year ago

Current Behavior

cpu load high use magma

Expected Behavior

use same cpu load forge.

Steps to Reproduce

is problem magma You can't check imagem when the server fully starts it uses less 100% forge, but magma uses above 100%

Magma image

Forge image

when he says the following sentence: done for help type help. problem forge %cpu drops to 30%. Magma use 100%

observation team magma foundation: JustRed23 @JustRed23 · 1 minute ago Maintainer Spark usage shows only 30%. this might just be magma messing with pterodactyl server usage, but it only is 30% more information time: https://git.magmafoundation.org/magmafoundation/Magma-1-18-x/-/issues/141

Panel Version

1.11

Wings Version

1.11

Games and/or Eggs Affected

minecraft forge

Docker Image

java 17

Error Logs

more information: https://git.magmafoundation.org/magmafoundation/Magma-1-18-x/-/issues/141

Is there an existing issue for this?

Software-Noob commented 1 year ago

Resource usage is for the container as a whole reported by Docker and displayed in the Panel. I don't see anything in this that's relevant to being a bug in the Pterodactyl software.

Nor are different applications usually comparable resource usage wise, even if they're based on Forge. 100% is one thread.

joaoespanhol commented 1 year ago

Resource usage is for the container as a whole reported by Docker and displayed in the Panel. I don't see anything in this that's relevant to being a bug in the Pterodactyl software.

Nor are different applications usually comparable resource usage wise, even if they're based on Forge. 100% is one thread.

I don't understand what you mean, can you explain it another way?

joaoespanhol commented 1 year ago

image

top inside the container vs outside the container on pterodactyl THIS IS NOW CONFIRMED, and proven to not be an issue. Also note the total cpu usage in the bottom (system) top prompt being ~20%.

joaoespanhol commented 1 year ago

Resource usage is for the container as a whole reported by Docker and displayed in the Panel. I don't see anything in this that's relevant to being a bug in the Pterodactyl software.

Nor are different applications usually comparable resource usage wise, even if they're based on Forge. 100% is one thread.

this is bug pterodacty image

top inside the container vs outside the container on pterodactyl THIS IS NOW CONFIRMED, and proven to not be an issue. Also note the total cpu usage in the bottom (system) top prompt being ~20%.

parkervcp commented 1 year ago

THIS IS NOW CONFIRMED, and proven to not be an issue. Also note the total cpu usage in the bottom (system) top prompt being ~20%.

Considering the output here are formatted in vastly different ways but also an unclear amount of uptime on those due to that.

are you sure those are even the same processes? You may be seeing java from another container all together.

joaoespanhol commented 1 year ago

THIS IS NOW CONFIRMED, and proven to not be an issue. Also note the total cpu usage in the bottom (system) top prompt being ~20%.

Considering the output here are formatted in vastly different ways but also an unclear amount of uptime on those due to that.

are you sure those are even the same processes? You may be seeing java from another container all together.

yes, that's correct. Magma also confirmed and other devs also confirmed this.

joaoespanhol commented 1 year ago

tested outside pterodactyl, do not use above 100% cpu, when using pterodacty use

image

parkervcp commented 1 year ago

I am going to say that the values you are looking at are most likely a percentage out of the entire machine and not the specific application. This would mean that you are seeing 5% of the whole cpu and not a single thread that the 100% represents.

C0D3-M4513R commented 1 year ago

Magma dev here, and I can confirm that this issue exists. I have diagnosed it myself a while back too.

C0D3-M4513R commented 1 year ago

Outside docker Capture Capture1 Inside Docker top

But If I were to go in with jmx then I'd see that it is not doing anything

C0D3-M4513R commented 1 year ago

Here is jmx/rmi and top in the container together: Java is not doing anything. Capture Here I did a CPU profiling. Notice how all the threads that take active cpu time are sleeping? Java readLine is blocking and will/should wait for a new line to be ready. Capture And here are the other threads Capture1

C0D3-M4513R commented 1 year ago

Okay, since all those Numbers suggested, that magma used 100%, I investigated a little, and found something. Still have to see if the main Magma dev approves of my changes.

Tracked here: https://git.magmafoundation.org/magmafoundation/Magma-1-18-x/-/merge_requests/261

Before that Merge Request, Magma took 14% on my pc (Windows). After it only takes 0.3%. So this issue can be closed.

C0D3-M4513R commented 1 year ago

This should now be solved by Magma 1.18 with the commit 7d684984