Jump to content

Single player server lag, white screen-black screen. 0.18.2


Morpheus2014

Recommended Posts

My system info:

CPU: AMD E1-2100 APU with Radeon HD Graphics    2 Cores

RAM: 8 GB

OS: Windows 8.1

Avorion server Beta 0.18.2 r12552 cc51b37dadf5

Single player

 

1st Problem, long loading time coupled with black and white screen.

 

Initial /status

Performance[ void Server::update(float): 437.2 ms; 100% ]

  [ void SectorDatabase::update(): 275.827 ms; 63.1% ]

  [ void Galaxy::update(float): 82.122 ms; 18.8% ]

    [ void Galaxy::updateSectors(float): 80.269 ms; 18.4% ]

    [ void Galaxy::updateJumpingEntities(): 1.662 ms; 0.4% ]

    [ void Galaxy::updateAlliances(float): 0.509 ms; 0.1% ]

    [ void Galaxy::updateWormHoleResults(): 0.038 ms; 0% ]

    [ void Galaxy::updateEntityTransfers(): 0.007 ms; 0% ]

  [ void Server::updatePlayerCommunicatorAdministration(float): 1.483 ms; 0.3% ]

  [ void FactionDatabase::update(float, bool): 1.189 ms; 0.3% ]

  [ void Server::updateDebugDiagnostics(): 1.167 ms; 0.3% ]

 

Detailed script memory usage:

Total memory used by scripts: 173.46MB

 

I did an inventory cleanup once the game plays normally after everal minutes, and performance improved a bit.

 

/status after inventory cleanup

 

Performance[ void Server::update(float): 69.518 ms; 100% ]

  [ void Galaxy::update(float): 27.386 ms; 39.4% ]

    [ void Galaxy::updateSectors(float): 26.674 ms; 38.4% ]

    [ void Galaxy::updateJumpingEntities(): 0.556 ms; 0.8% ]

    [ void Galaxy::updateWormHoleResults(): 0.065 ms; 0.1% ]

    [ void Galaxy::updateEntityTransfers(): 0.008 ms; 0% ]

    [ void Galaxy::handleFinishedScriptPacketCallbacks(): 0.003 ms; 0% ]

  [ void SectorDatabase::update(): 5.335 ms; 7.7% ]

  [ void Server::updateDebugDiagnostics(): 2.549 ms; 3.7% ]

  [ void Server::updatePlayerCommunicatorAdministration(float): 0.753 ms; 1.1% ]

  [ MessageServer update: 0.098 ms; 0.1% ]

 

2nd problem, server-client desync (shot not registering, ships rubberbending).

 

Kinda solved the problem by setting avorionserver.exe priority on "above normal", the problem is now the avorionserver.exe sometimes used more than 80% CPU. This might be one of the reason why avorion.exe is mostly  not responding.

 

3rd Problem, white screen after exiting build mode with pause mode.

 

Always got white screen (avorion.exe) not responding. I uncheck "pause in building mode" and the problem is fixed.

I think its got something to do with pausing the server and restarting it.

 

4th Problem. over 10 minute lag between server-client during server triggered events. (avorionserver on "above normal" priority)

 

Some line from the client log:

2018-08-05 19-58-14| <Server> Danger! A large fleet of alien ships appeared!

2018-08-05 19-58-14| Danger! A large fleet of alien ships appeared!

2018-08-05 20-10-14| Entity with index 6ede42b6-5448-4497-aa25-c4ab2796cda3 has no script with index '0'.

2018-08-05 20-10-15| Entity with index c2474a41-4aa7-48b0-b4b8-b209e27254da has no script with index '0'.

2018-08-05 20-10-15| Entity with index 422c5816-ac2e-4531-a6ad-816f303b1f72 has no script with index '0'.

 

Notice the 10 minute+ lag  between the server triggered event and the client respond. If I checked the server log, it works normally with several lines logged in those 10 minutes.

 

Above problem kinda gone when I jumped into safe sector (no server triggered event).

 

I will post the client and server log once I found my pastebin account  :-\

 

Additional info:

- My Galaxy is an old one with over 700+ explored sector

- I have 5 sector with POS (player owned station), one sector is an industrial sector with over 6 POS

- I have dozens of ships separated into outer rim fleet, galaxy boundary fleet and two galaxy core fleet (each fleet consist of 4-5 ships).

- All the above problem does not existed in a fresh new Galaxy (less than 5 sectors explored with a single ship).

 

/status log:

2018-08-05 20-29-32| <Server> 1 players online, in 1 sectors

2018-08-05 20-29-32| 1 players in memory, 1 registered

2018-08-05 20-29-32| 10 factions in memory, 90 registered

2018-08-05 20-29-32| 12 sectors in memory, 739 sectors in total

2018-08-05 20-29-32| Memory used by scripts: 218.82MB

2018-08-05 20-29-32| Sectors Updated: 12

2018-08-05 20-29-32| avg. server load: 42%

2018-08-05 20-29-32| avg. update: 25 ms

2018-08-05 20-29-32| max. update: 112 ms

2018-08-05 20-29-32| min. update: 11 ms

 

Was hoping someone can help with to understand the problems and make temporary fix on it.

Link to comment
Share on other sites

You said its an old galaxy. Did it work better earlier? Please try to reproduce in a new galaxy. Give us some informations about systems CPU and memory usage in the old and in a new galaxy.

 

Try to turn down graphic settings (although /status looks like its not depending on graphic power).

 

Please post your server.ini and server logs of the old and a new created galaxy (upload on pastebin).

Link to comment
Share on other sites

Gameplay was fine in 0.16 something during the economic update, getting a bit sluggish at 0.17 but still playable.

 

Here's some data on my old galaxy, note that on both galaxy, AvorionServer.exe is set to "above normal" priority

 

Task Manager info:

Avorion.exe    CPU 40-46%  Memory 460Mb

AvorionServer.exe  CPU 17-20% Memory 670Mb (no server event)

 

Avorion.exe            CPU  3% Memory 480Mb

AvorionServer.exe  CPU  82% Memory  699Mb (After calculating jump, means target sector is loaded)

 

Performance[ void Server::update(float): 63.512 ms; 100% ]

  [ void Galaxy::update(float): 27.602 ms; 43.5% ]

    [ void Galaxy::updateSectors(float): 26.802 ms; 42.2% ]

    [ void Galaxy::updateJumpingEntities(): 0.577 ms; 0.9% ]

    [ void Galaxy::updateAlliances(float): 0.136 ms; 0.2% ]

    [ void Galaxy::updateWormHoleResults(): 0.062 ms; 0.1% ]

    [ void Galaxy::updateEntityTransfers(): 0.007 ms; 0% ]

  [ void Server::updateDebugDiagnostics(): 2.946 ms; 4.6% ]

  [ void Server::updatePlayerCommunicatorAdministration(float): 0.602 ms; 0.9% ]

  [ void FactionDatabase::update(float, bool): 0.132 ms; 0.2% ]

  [ MessageServer update: 0.096 ms; 0.2% ]

 

Server ini file:

https://pastebin.com/TFkSG7D2

 

Server log file:

https://pastebin.com/nk8CaxcF

 

New Galaxy

 

Task Manager info:

Avorion.exe    CPU 38-45%  Memory 420Mb

AvorionServer.exe  CPU 17-20% Memory 570Mb

 

Performance[ void Server::update(float): 55.757 ms; 100% ]

  [ void Galaxy::update(float): 19.234 ms; 34.5% ]

    [ void Galaxy::updateSectors(float): 18.722 ms; 33.6% ]

    [ void Galaxy::updateJumpingEntities(): 0.393 ms; 0.7% ]

    [ void Galaxy::updateWormHoleResults(): 0.061 ms; 0.1% ]

    [ void Galaxy::updateEntityTransfers(): 0.008 ms; 0% ]

    [ void Galaxy::handleFinishedScriptPacketCallbacks(): 0.004 ms; 0% ]

  [ void Server::updateDebugDiagnostics(): 2.745 ms; 4.9% ]

  [ void Server::updatePlayerCommunicatorAdministration(float): 0.711 ms; 1.3% ]

  [ void FactionDatabase::update(float, bool): 0.111 ms; 0.2% ]

  [ MessageServer update: 0.095 ms; 0.2% ]

 

Server ini file:

https://pastebin.com/3uKZkWLe

 

Server log file:

https://pastebin.com/KuZyVM7A

Link to comment
Share on other sites

It seems your CPU is a little overloaded. Try to edit your server.ini. Change this

workerThreads=1

to

workerThreads=2

 

This may help, or may not help...

 

But at all I have to say that your notebook is not designed for gaming, the result will always be huge lags, stuttering and so on. Because Avorion is a server based game it even run a server when you play offline. When the hardware gets overloaded you can get huge lags, rubberband and so on, just like you know from online games where servers are overloaded.

 

You could try to give the server process a higher priority then the client. May cause more stuttering and fps drops, but the lags may decrease.

 

Well maybe there is any kind of bug, I dont really know the hardware you have. But to me it seems your hardware is not good enaugh.

 

Ps.: did you have ships/stations in different sectors when you did the tests? Or only in one sector? The economy mod made sectors keeping active without any player inside, when there is any ship/station inside of any player thats currently online. This may also take some resources.

 

 

Edit:

If it does not help edit server.ini:

workerThreads=1
generatorThreads=2
scriptBackgroundThreads=2

to

workerThreads=2
generatorThreads=1
scriptBackgroundThreads=1

Link to comment
Share on other sites

When I did the test, this is the Galaxy breakdown:

 

Old server, 5 sector with stations, one sector is populated with over 6-7 stations in a Targeting System production chains. My ships are scattered across the galaxy in several sectors as well.

 

New galaxy, 1 sector with 2 turret factory, 1 ship in a different sector.

 

I guess the server load on the old galaxy is much much more higher than the new one.

 

 

I also notice an error line in the old galaxy server log file such as:

 

2018-08-07 08-42-39|

2018-08-07 08-42-39| error constructing Entity: Entity with index "4e36a1f7-f526-4098-9733-9c5b8c81f4a9" doesn't exist at

2018-08-07 08-42-39| stack traceback:

2018-08-07 08-42-39|    [C]:-1: in function Entity

2018-08-07 08-42-39|    data/scripts/entity/merchants/factory.lua:1304: in function updateDeliveryShuttleStarts

2018-08-07 08-42-39|    data/scripts/entity/merchants/factory.lua:1100: in function ?

2018-08-07 08-42-39|

 

Which is related with some station can't launch/retrieve her shuttles, so I swith to the sector where my stations are heavily using shuttles and try to fix the problem.

After careful examinations, all my stations are working prefectly and doesnt have problem with shuttles launch/delivery.

I will try to look into this problem by boarding each of the stations one by one later on.

 

By changing the server ini files according to your suggestion, the performance does improved a bit, the lag previously introduced by server generated events are much tolerable now.

I'm using the entity debug mode to force the server to spawn pirates and xsotan on one of my "fortress sector" which are populated by a heavily armed equipment dock, one battleship and three cruiser, as well as 48 fighters from the station.

 

This time I managed to land some shots on the enemy  :P

 

/status log:

Performance[ void Server::update(float): 52.195 ms; 100% ]

  [ void Galaxy::update(float): 16.133 ms; 30.9% ]

    [ void Galaxy::updateSectors(float): 15.672 ms; 30% ]

    [ void Galaxy::updateJumpingEntities(): 0.354 ms; 0.7% ]

    [ void Galaxy::updateWormHoleResults(): 0.047 ms; 0.1% ]

    [ void Galaxy::updateEntityTransfers(): 0.008 ms; 0% ]

    [ void Galaxy::handleFinishedScriptPacketCallbacks(): 0.004 ms; 0% ]

  [ void Server::updateDebugDiagnostics(): 2.222 ms; 4.3% ]

  [ void Server::updatePlayerCommunicatorAdministration(float): 0.692 ms; 1.3% ]

  [ MessageServer update: 0.095 ms; 0.2% ]

  [ void FactionDatabase::update(float, bool): 0.083 ms; 0.2% ]

 

Detailed script memory usage:

Total memory used by scripts: 199.81MB

 

Below are the old Galaxy server log file:

https://pastebin.com/grn0U3mn

 

Btw, I noticed that even I've changed :

workerThreads=2

 

After I closed the game the workerThreads reverted back to workerThreads=1. Does the game  override the game ini files during server startup as the changes I made on the workerthreads does not shows up in the server log.

Link to comment
Share on other sites

You have to edit server.ini when the game is turned off. But it seems you did... the server just dont wanna use 2 worker threads, so changed setting to 1 again. When using an offline galaxy it does the same for me (changes worker threads to 3 while having 4 real cores)... not sure if this is a bug or a feature. You could try setting up your galaxy as a server on your laptop and change worker threads to 2 again. Also you should edit 2 more settings in server.ini as soon as you setup your galaxy as a server:

 

sectorUpdateTimeLimit=300
aliveSectorsPerPlayer=500

Change to

sectorUpdateTimeLimit=30
aliveSectorsPerPlayer=0

 

Did you turn down graphic settings?

 

But at all I recommand using hardware wich is designed for gaming. It must not be expensive stuff but your hardware is designed for simple office work.

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...