Hello again,
Network
I worked all day to figure out the ping issues that were plaguing some servers. Especially the issue when one high-ping user comes in, everybody's ping seemed to go up.
Technical:
I kept testing the issue with 3 machines (one real dedicated server I had to deploy on every change, and 2 clients), which is a very tedious process. And I can't even be sure if it is now working for servers with a lot more players. I artificially set the latency of one of the clients to 1000+ (=2000+ ping), and tried to find out why the other client's ping would change even though both are handled in their own threads server-sided, and are also not blocking.
I used wire-shark to check every single packet and their sent/receive times.
Turns out, that one of the bugs was that the output stream flushed on every single packed (for both client and server), which simply means a lot of overhead, since native I/O has to be accessed. I solved this by only flushing when there is currently no more packets to send (otherwise it will flush when the buffer is full).
The other bug was far harder to find, and I still don't know the full reason. I buffered the input stream which is basically a dangerous setting, since it could lead to a latency of the receiving threads wanting to read (they wait for more data).
I also added some debug options to the server cfg, and forced some values to reset on the update. I hope this update will at least get rid of the high-ping-without-server-load thing.
Modified blueprints
I now took off the safety of the modified-blueprint-detector. Admins can now (configured in server.cfg) do one or more of the following automatically if a modified blueprint is detected:
Salvaging
Due to salvage beams being used as a weapon, the following will now change:
Fallback
I also put in an option in the settings.cfg (start once on the new update for it to appear), for players that got less render performance than before from the last update. the option G_USE_TWO_COMPENENT_SHADER has to be set to true to use it (but only use it if you are sure that the new rendering style is causing the problem)
Thank you for playing StarMade,
- schema
Network
I worked all day to figure out the ping issues that were plaguing some servers. Especially the issue when one high-ping user comes in, everybody's ping seemed to go up.
Technical:
I kept testing the issue with 3 machines (one real dedicated server I had to deploy on every change, and 2 clients), which is a very tedious process. And I can't even be sure if it is now working for servers with a lot more players. I artificially set the latency of one of the clients to 1000+ (=2000+ ping), and tried to find out why the other client's ping would change even though both are handled in their own threads server-sided, and are also not blocking.
I used wire-shark to check every single packet and their sent/receive times.
Turns out, that one of the bugs was that the output stream flushed on every single packed (for both client and server), which simply means a lot of overhead, since native I/O has to be accessed. I solved this by only flushing when there is currently no more packets to send (otherwise it will flush when the buffer is full).
The other bug was far harder to find, and I still don't know the full reason. I buffered the input stream which is basically a dangerous setting, since it could lead to a latency of the receiving threads wanting to read (they wait for more data).
I also added some debug options to the server cfg, and forced some values to reset on the update. I hope this update will at least get rid of the high-ping-without-server-load thing.
Modified blueprints
I now took off the safety of the modified-blueprint-detector. Admins can now (configured in server.cfg) do one or more of the following automatically if a modified blueprint is detected:
- Kick the user
- Ban the user by name
- Ban the user by IP
- delete the blueprint (backup will be created)
Salvaging
Due to salvage beams being used as a weapon, the following will now change:
- Only overheating ships can be salvaged
- Stations with active faction module cannot be salvaged (must be destroyed first)
Fallback
I also put in an option in the settings.cfg (start once on the new update for it to appear), for players that got less render performance than before from the last update. the option G_USE_TWO_COMPENENT_SHADER has to be set to true to use it (but only use it if you are sure that the new rendering style is causing the problem)
Thank you for playing StarMade,
- schema