szporwolik / perun

Perun toolset for DCS World server admins. Reads simulation data and pushes it MySQL database.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature: move communication to 2nd thread, improve latency issues

szporwolik opened this issue · comments

As in title - work to improve game loop latency issues

We've tried to use Perun on our public server, but it introduced heavy lags in the game.
It's not a matter of CPU, or database load : these parameters were in the green.
But still, the planes were drifting, everything was laggy as hell.

We've got two servers running on the same machine, one with a heavy mission and lots of player slots, that may explain the lags.
Already, we've had to change the data type of the pe_dataraw_payload column to MEDIUM TEXT, as the default 64kB was not enough.
Now that I see the content of this column, I don't understand : it's less than 2kB...

Maybe this new feature could solve our problem...
How can we help ?

I attached our mission file, along with a JSON export of the pe_dataraw_payload.

VEAF_OpenTraining_Caucasus_20210202.zip
server 2.json.zip
server 1.json.zip

Well one person is currently working/doing some test with moving communication to 2nd thread in the dll library - that is something new for us, so the update time is unknown, but I still believe we will figure this out. Once we have this ready and have it stable I will share the code/dlls.

As a containment solution, you can use the attached hook file. It's slightly changed to avoid the issues you mentioned (rubberbanding, lags etc.). Btw. those issues are visible on missions with lots of slots available.

With the attached file you will not get the available list of slots updated, but if you are interested in the stats/logs this shall work for you. Please take a look at the dev branch, you will also need config file : https://github.com/szporwolik/perun/tree/dev/01_DCS .
Perun-hook.zip

Thanks ! We'll try this

Improved with 8aa0a8e - v0.12.0 in the final testing stage. Shall bring lots of performance improvements and... more.

commented

The brief update is dll is in the dev branch.

Cool ; any instructions on how to compile it ?

Visual Studio Community will work, but we will release binaries within a week or two.

(deleted)
I found out that I needed the C++ toolpack installed in my VS - duh !

Could you please elaborate on how to install it in DCS ?
I tried putting the perun.dll I compiled in the mods/services/perun/dll folder, had an error message saying that it couldn't load the module and was trying a lot of things including mods/services/perun/bin.
So I renamed the dll folder to bin and restarted, but still I have an error :

2021-02-28 10:19:17.104 DEBUG   LuaGUI: Failed to exec user hook script Perun-hook.lua: error loading module 'perun' from file 'C:\Users\veaf\Saved Games\private_server_2.5.6\/Mods/services/Perun/bin/perun.dll':
	The specified module could not be found.