ViaVersion / ViaProxy

Standalone proxy which allows players to join EVERY Minecraft server version (Classic, Alpha, Beta, Release, Bedrock)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

optimization?

KweezyCode opened this issue · comments

image

DMV works much better in that way

UPD: ViaProxy loads my PC more than minecraft 1.19.4 lol

commented

Are you sure this is the ViaProxy process (How did you find that out)? How many cores does your system have? How did you get that high CPU usage? I need more information.

commented

That only answers one of the questions. Provide more details of your pc specs and how to reproduce that

i leave it running on Intel Pentium J5040

commented

And what client version to what server version are you translating to?

1.5.2, not even using it, just running in background

commented

If its just running in the background thats a bug for sure then. To diagnose that I need you to do some debugging on your end. I am not sure how familiar you are with Java and Java profiling, but I recommend you download the VisualVM profiler on that computer (https://visualvm.github.io/download.html) and run a CPU profiler:

You do that by starting it, selecting ViaProxy in the list and then press "Sampler"
image
In that window click the "CPU" button and let it run for roughly 30 seconds before pressing "Stop".
After that you press the Snapshot button:
image
and in that snapshot click the save button:
image
Upload the saved snapshot here

I have also noticed high CPU usage with ViaProxy in the background.

commented

Are you sure that is the ViaProxy process that is taking up all the CPU? I don't see much anything taking up CPU time. If you have multiple ViaProxies make sure to pick the one using all the CPU time and not a newly started one

i am running one ViaProxy instance

commented

Well the collected data shows its not doing anything in the background

i can record video for you if you don't believe me :P

commented

I believe you, but I can't do much if there is no data. Just to be sure you can record a video yes

https://tmpfiles.org/1439332/2023-05-2201-06-59.mkv

issue exists even in oracle JRE, so don't look at temurin. In video i didn't even press the "Start" button to get high load

commented

This is very weird and not normal behaviour. Can you also record to process of creating a performance snapshot file, just to make sure there are no errors there

commented

I actually managed to reproduce it from one of the videos where you showed the exact java version. I usually test with Java 17 where this issue does not occurr for me. Only in Java 8 it does. I will look into it when I have time

let me test with java 17

image

pretty smooth on java 17

commented

So yeah its fixed for you as well in Java 17