Page 1 of 1
Everyone lagging out massively on small supreme battlefield
Posted: 22 Nov 2013, 22:34
by klapmongool
Pretty common small supreme battlefield game:
http://replays.springrts.com/replay/fe4 ... 879b8f899/
This went a lot better in 94.1.
There was a giant freeze somewhere at 35 mins when a hundred hovers or so attacked and got bombed by over a 100 sea bombers.
Any tips on how to get better fps are greatly appreciated. I´m especially curious how to disable smoke effects.
Re: Everyone lagging out massively on small supreme battlefi
Posted: 23 Nov 2013, 01:20
by Forboding Angel
That map has some fairly serious issues and really needs to be repackaged. I may do it a bit later for the hell of it.
Re: Everyone lagging out massively on small supreme battlefi
Posted: 23 Nov 2013, 14:40
by dansan
That'd be really appreciated!
Re: Everyone lagging out massively on small supreme battlefi
Posted: 23 Nov 2013, 14:42
by klapmongool
Cool, that would be great. Any idea why the lagging got so bad at the time it did?
Re: Everyone lagging out massively on small supreme battlefi
Posted: 23 Nov 2013, 23:26
by Kloot
klapmongool wrote:Any idea why the lagging got so bad at the time it did?
Running the demo reveals Lua memory usage suddenly jumps up to ~2GB (after remaining below 20MB the whole game) around time index 35:09, then it gets freed all at once which triggers a CPU spike.
This happens consistently (even after /luaui disable) so the
only valid explanation is that it originates in synced BA luarules code, and you can confirm for yourself the spike disappears by issuing /cheat /luarules disable just prior to 35:09.
Re: Everyone lagging out massively on small supreme battlefi
Posted: 24 Nov 2013, 00:00
by klapmongool
Kloot wrote:klapmongool wrote:Any idea why the lagging got so bad at the time it did?
Running the demo reveals Lua memory usage suddenly jumps up to ~2GB (after remaining below 20MB the whole game) around time index 35:09, then it gets freed all at once which triggers a CPU spike.
This happens consistently (even after /luaui disable) so the
only valid explanation is that it originates in synced BA luarules code, and you can confirm for yourself the spike disappears by issuing /cheat /luarules disable just prior to 35:09.
Ok, what conclusions can we draw from this?
Re: Everyone lagging out massively on small supreme battlefi
Posted: 24 Nov 2013, 00:51
by zer_ver
klapmongool wrote:Ok, what conclusions can we draw from this?
That there is a bug in Spring 95 or in BA 7.84.
Re: Everyone lagging out massively on small supreme battlefi
Posted: 24 Nov 2013, 08:42
by klapmongool
I mean a bit more specific. And please don't turn this thread into a MT war. I'm trying to find out why there was such a sudden spike. Maybe devs or game devs can find out what causes it.
Re: Everyone lagging out massively on small supreme battlefi
Posted: 25 Nov 2013, 15:19
by Beherith
You can reduce the number of smoke effects by reducing the maxparticles.
Re: Everyone lagging out massively on small supreme battlefi
Posted: 25 Nov 2013, 19:30
by klapmongool
Beherith wrote:You can reduce the number of smoke effects by reducing the maxparticles.
Thx, that is what nixtux said as well when I spoke him earlier. The downside to that is that it would limit the nanospray as well (right?) and I like to have that on so i know if stuff is building or not (or reclaiming).
Re: Everyone lagging out massively on small supreme battlefi
Posted: 25 Nov 2013, 21:57
by luckywaldo7
klapmongool wrote:Beherith wrote:You can reduce the number of smoke effects by reducing the maxparticles.
Thx, that is what nixtux said as well when I spoke him earlier. The downside to that is that it would limit the nanospray as well (right?) and I like to have that on so i know if stuff is building or not (or reclaiming).
No, nano particles are done seperately. (MaxNanoParticles instead of MaxParticles)
Re: Everyone lagging out massively on small supreme battlefi
Posted: 27 Nov 2013, 03:18
by Kloot
I'm trying to find out why there was such a sudden spike. Maybe devs or game devs can find out what causes it.
The attacking player who sent the wave of 100+ hovers gave an area-attack order while all of them were selected, with a radius large enough to include 100+ targets within the command's area.
As a result
each of the 100+ units received a queue with 100+ attack commands in it, and because at least one* of BA's gadgets requests the
entire command queue of every unit within gadget:AllowCommand which is called for each
individual queue command, those commands need to be copied over into Lua memory 100*100*100 = ONE MILLION times.
Spring can handle that up to a point, but the Lua allocater can not. Even worse, the gadget doesn't actually care about the commands, just the size of the queues, so copying them is a complete waste of time and memory.
* unit_target_on_the_move.lua
And just to kill any discussion pre-emptively: no, this did not "go a lot better in 94.1" (you can reproduce it as easily there as in 95.0), and no, MT would not have mattered either.
Re: Everyone lagging out massively on small supreme battlefi
Posted: 27 Nov 2013, 03:26
by Silentwings
Yes, this was entirely the fault of target_on_the_move - ticketed
http://imolarpg.dyndns.org/trac/balatest/ticket/508
Re: Everyone lagging out massively on small supreme battlefi
Posted: 27 Nov 2013, 07:15
by klapmongool
Kloot wrote:I'm trying to find out why there was such a sudden spike. Maybe devs or game devs can find out what causes it.
The attacking player who sent the wave of 100+ hovers gave an area-attack order while all of them were selected, with a radius large enough to include 100+ targets within the command's area.
As a result
each of the 100+ units received a queue with 100+ attack commands in it, and because at least one* of BA's gadgets requests the
entire command queue of every unit within gadget:AllowCommand which is called for each
individual queue command, those commands need to be copied over into Lua memory 100*100*100 = ONE MILLION times.
Spring can handle that up to a point, but the Lua allocater can not. Even worse, the gadget doesn't actually care about the commands, just the size of the queues, so copying them is a complete waste of time and memory.
* unit_target_on_the_move.lua
And just to kill any discussion pre-emptively: no, this did not "go a lot better in 94.1" (you can reproduce it as easily there as in 95.0), and no, MT would not have mattered either.
Thanks for analyzing this!
Thanks!
Re: Everyone lagging out massively on small supreme battlefi
Posted: 27 Nov 2013, 23:30
by albator
how to disable it ?
Re: Everyone lagging out massively on small supreme battlefi
Posted: 27 Nov 2013, 23:43
by Silentwings
Not possible to disable - wait for update, sorry!