jsknnr / enshrouded-server

Run Enshrouded dedicated server in a container
MIT License
176 stars 20 forks source link

Performance #40

Open bdbais opened 5 months ago

bdbais commented 5 months ago

Hi we are trying your docker and we has some performance problem, the server said it's overloaded but we are only in 2, is it a temporally caching situation?

jsknnr commented 5 months ago

No there is nothing like that on the image. The image is just Debian 11 with Wine and the server files from Steam. If you are having performance issues it could be related to network performance, or the server where you are running the container is not capable of keeping up. I cannot support issues that aren't directly related to the container image.

broizter commented 5 months ago

According to some random comment on Reddit proton would be better performance wise instead of wine. Could be worth switching over or releasing two different versions.

jsknnr commented 5 months ago

If you are having performance issues with Wine with 2 people I sincerely doubt that Proton would give you that much better performance. I have had requests for a Proton based image with people claiming amazing results, but I am skeptical. However, I have built Proton based images for servers before and could probably have 1 ready quite quick.

broizter commented 5 months ago

One comment claims half the CPU usage with proton so if you have a system that's right on the edge it could be the difference maker!

The current image works fine for me though. I'm seeing around 60% CPU usage on an i3-10100 with 2 people playing.

brettinternet commented 5 months ago

Probably unrelated to this image, but adding here in case someone sees something similar. I'm getting major rubber-banding once a second player joins on a server with 8+ physical cores and 32g+ of memory with the CPU never peaking above 50% load. Looks like the culprit may be packet loss:

[session] Pending packets list is full. Deleted oldest packet from 2(3)

Wondering if it could be related to differing MTU sizes? Seems unlikely.

gary9630 commented 5 months ago

I also ran into this issue. When the server join more than 4 players, suddenly the ping for all players in the game increases insanely high (20ms to over 10000ms). However, I monitor the CPU and MEM usage, there are still quite many resources.

1706544949498

Pretty weird.

gary9630 commented 5 months ago

According to some random comment on Reddit proton would be better performance wise instead of wine. Could be worth switching over or releasing two different versions.

I believe it is this post on Reddit: https://www.reddit.com/r/Enshrouded/comments/1abb0q4/dedicated_server_help_lag_rubberbanding/

jsknnr commented 5 months ago

You guys are forcing my hand. I'll have a proton image shortly.

broizter commented 5 months ago

I have done some testing and I can confirm a significant CPU load reduction switching to Proton. Not half but it went from around 60% to 38%! wine proto

gary9630 commented 5 months ago

@jsknnr If you want to do some quick testing. Here is the dockerhub dev by mornedhels. It contains proton and wine images.

@broizter Great info! But I suspected the lag is coming from the CPU usage. Since when the horrible lag happened, usually the CPU load is not that high.

broizter commented 5 months ago

@gary9630 That's the docker images I used to make the comparison! But yes I agree if people are seeing performance issues but the CPU load is not close to 100% then this change will not help and is caused by something else. I've had no performance issues at all using both images with 2 people playing.

gary9630 commented 5 months ago

@broizter Yeah! The wine-based image is worked just fined when my server with people less or equal than 4. However, once the player number > 4, things went crazy. Initially, I used a 4 cores machine, the CPU load is around 75% when players > 4. So I switch to a machine with 8 cores thinking that the greater CPU will solve the lag issue. But the over-4 lag is still the same. :(

cropse commented 5 months ago

I think even I quit the game with no player login, it took almost same cpu usage, even no one logined at night. perform issue is quite a thing. I install this image in Jan 28 and this is my CPU report in 6 core 12 thread server. image

broizter commented 5 months ago

My CPU usage seems completely unaffected on how many people are connected. At least with only 2 people.

gary9630 commented 5 months ago

@bdbais @broizter @cropse

Just FYI. I am using proton image and it can support players more than 4 people with CPU load around 40% and NO LAG!

My hunch is that wine-based image will encounter some network issues. When the more clients (players) join the server, the handshaking between server and multi-clients will cause ping dramatically increasing.

But I am not the expert of network part, so that's just my guess.

image

image

jsknnr commented 5 months ago

I am still working on a Proton image. I am almost there. Having a steam SDK issue once the server starts and it's being annoying. This has not been as trivial as the other Proton images I have built.

ckooistra commented 5 months ago

Hey just want to add my two cents. First this image has been great and I am up and running thank you for whipping this up so quickly! Like others have mentioned the resource use has been really high for this like much higher than all my other docker images even when no one is connected. image

You can see when everyone left the server last night the cpu usage dropped from almost 600% to 400% excited to see what the proton image will be able to do. I would assume that we will be able to use the persistent data volume to persist the world with the new image? Thanks again!

jsknnr commented 5 months ago

I have a proton image built. I need to do a bit more testing with it and then I am going to quietly release it for folks to test.

jsknnr commented 5 months ago

If any one is willing to give it a test, I have pushed the image to Docker Hub sknnr/enshrouded-dedicated-server:proton-latest

jbgaf commented 5 months ago

If any one is willing to give it a test, I have pushed the image to Docker Hub sknnr/enshrouded-dedicated-server:proton-latest

Hey @jsknnr,

I just installed it via Docker on my Synology server. For now, it's working great! There are 4 of us connected, no more lag! Thanks!

Robert-Langbein commented 5 months ago

If any one is willing to give it a test, I have pushed the image to Docker Hub sknnr/enshrouded-dedicated-server:proton-latest

Amazing! Have had the same issues with server overload >1 player and we couldn't event use meele attacks as they did not hit. Works now great with the proton image. Got an 8 vcore cloud server with 24gb ram and synchronous 400mbit, so the issue couldn't be the server itself as everything else is running smooth on that machine.

Anyways, thanks for the nice work here!

jsknnr commented 5 months ago

@Robert-Langbein I am glad it's working better for you now. One thing to keep in mind is that Enshrouded devs built their own game engine for this so I am sure there is a lot of performance optimizations and bug fixes yet to made on the multiplayer backend. On top of us tricking the server to thinking it's running in a Windows environment :)

ckooistra commented 5 months ago

Hey I would like to try it out. Can I just swap that image and attach it to the volume I already created?

jsknnr commented 5 months ago

@ckooistra You can. The volume is basically just the save.

ckooistra commented 5 months ago

Hi so far looking good the CPU usage has dropped significantly! image Thanks again @jsknnr!

ckooistra commented 5 months ago

Actually I cannot connect to the instance? I keep getting this error but I don't see any log output on the docker container. Do you know where else I could look? image

jbgaf commented 5 months ago

@ckooistra You need to restart your docker container, it will upgrade the server. And upgrade your game version on Steam.

You can't play with two different versions.

ckooistra commented 5 months ago

Great thanks lol that fixed it! I had thought redeploying the stack would have done it.

eric-beaudoin commented 5 months ago

I confirm the Proton-based container is significantly better. 5-player game on Wine was so laggy it was unplayable. With Proton it is smooth. Thanks @jsknnr

marcus-jan commented 5 months ago

Confirming as well that the proton container performs much better. My server has 3 players and all have seen the improvement instantly. Good work @jsknnr !

TrueOsiris commented 5 months ago

I also ran into this issue. When the server join more than 4 players, suddenly the ping for all players in the game increases insanely high (20ms to over 10000ms). However, I monitor the CPU and MEM usage, there are still quite many resources.

We encounter similar issues, with a 4th player lagging often. Spinned up my Xeon with only 1 docker container running this. Is the problem wine? are u using wine32?

I'm testing the proton version.

UPDATE: no problems since switching to proton!

cgarnier commented 5 months ago

Did you manage to switch without loosing the save ?

jbgaf commented 5 months ago

I switched from wine to proton and I didn't lost anything... (with docker / DSM 7). Deleted wine image, installed proton image with same name for container. Nothing to do if you already had a savegame with jsknnr/enshrouded wine image.

cgarnier commented 5 months ago

Great @McAwsm94 , good job @jsknnr

Juwi2 commented 4 months ago

If any one is willing to give it a test, I have pushed the image to Docker Hub sknnr/enshrouded-dedicated-server:proton-latest

Hey @jsknnr,

I just installed it via Docker on my Synology server. For now, it's working great! There are 4 of us connected, no more lag! Thanks!

Hi @jbgaf, how do you manage the Enshrouded world savegame within the Synology Container Station, because I want to copy a local Enshrouded savegame to my dedicated Server folder? What are your "Environments variables" in Synology Container Station? Can you share a Screenshot? Refer to my config under attachments (1).

I was able to start @jsknnr latest proton release and can connect via steam to my Server but when I change the persistant storage (ENSHROUDED_PATH) to my synology path outside the docker, I am unable to start the sknnr Enshrouded dedicated server, although I made "chown -R 10000:10000 /volume1/docker/enshrouded" including subfolders. Refer to my error message under attachments (2.)

Attachments

  1. My Container Station environments variables: sknnr-enshrouded-dedicated-server config

  2. My protocoll from jsknnr Enshrouded Dedicated Container: sknnr-enshrouded-dedicated-server logfiles-protocoll

Thank you in advance! Yours sincerly Juwi.

jbgaf commented 4 months ago

If any one is willing to give it a test, I have pushed the image to Docker Hub sknnr/enshrouded-dedicated-server:proton-latest

Hey @jsknnr, I just installed it via Docker on my Synology server. For now, it's working great! There are 4 of us connected, no more lag! Thanks!

Hi @jbgaf, how do you manage the Enshrouded world savegame within the Synology Container Station, because I want to copy a local Enshrouded savegame to my dedicated Server folder? What are your "Environments variables" in Synology Container Station? Can you share a Screenshot? Refer to my config under attachments (1).

I was able to start @jsknnr latest proton release and can connect via steam to my Server but when I change the persistant storage (ENSHROUDED_PATH) to my synology path outside the docker, I am unable to start the sknnr Enshrouded dedicated server, although I made "chown -R 10000:10000 /volume1/docker/enshrouded" including subfolders. Refer to my error message under attachments (2.)

Attachments

  1. My Container Station environments variables: sknnr-enshrouded-dedicated-server config
  2. My protocoll from jsknnr Enshrouded Dedicated Container: sknnr-enshrouded-dedicated-server logfiles-protocoll

Thank you in advance! Yours sincerly Juwi.

Hey,

Why do you change your ENSHROUDED PATH ?

I first launch Enshrouded server with proton image. I launch game and go into server. Game will create save files into the container.

Then, I shut the container off and I copy my local savegame files into container with commands lines. For that, you need to use command "docker cp" (and you need to install docker).

As you can see, I didn't need to change Environments variables.

image