Stop ui lag, especially against laggers and on setons

Talk about general things concerning Forged Alliance Forever.

Moderators: FtXCommando, Ze Dogfather

Stop ui lag, especially against laggers and on setons

Postby SeraphimLeftNut » 23 Nov 2015, 23:56

You will not see any effects in sandbox games, or in 1v1 games against opponents who have a good connection.

The two main threads that run FA are the Ren thread and the Sim thread. The Ren thread takes care of all the ui stuff.
Ideally the Ren thread should never be affected by any other thread, then you will never have ui issues. The sim thread runs the game.
The sim thread will pause for laggers or for your slow cpu. These oscillations in the sim thread can confuse your stupid system(if it is as stupid as mine).

By default the Ren thread is assigned to core0. The same core that most often takes care of hardware interrupts. These come from shitty usb/network adapter/nvidia drivers.(not much you can do here in many cases and varies across different systems)
If you have a powerful GPU and have your graphics settings turned up, your ren thread will actually use a large fraction of a single core's total potential.
The sim thread is not assigned to any particular core by default and your system decides which core this thread uses. Playing against laggers means your sim thread will actually only use a small fraction of a core's potential and the sim thread will often also use core0.

The issues happen during spikes in sim and ren cpu usage as they are both trying to use core0 and your system is not smart enough to distribute them to different cores automatically.

Using process hacker 2.0, or whatever program you like to use in place of task manager, you can manually set affinities and priorities for different FA threads. http://processhacker.sourceforge.net/

I have found that setting the sim thread to core0 and the ren thread to all the other core but core0, then giving the sim thread low priority and the ren thread high priority, have given me best ui lag results. Perhaps its ok to just put them on two different non core0 cores.

Aften a game starts, tab to the process hacker, and find these two FA threads, they are typically the ones will highest cpu usage. If you attempt to make the changes in lobby, you will onyl find the ren thread, the sim thread is not an obvious choice at that point.

At least for me the difference is drastic, it is the difference between being able to do 100 apm and 20 apm in a late setons game. Perhaps for your system this will not make any difference because your system can automatically balance cpu usage properly.

ALSO Don't forget to unpark your cores. http://www.coderbag.com/programming-c/d ... ng-utility
Avoid the direct registry edit suggestions to turn off core parking.
Attachments
cpu and isr.jpg
cpu and isr.jpg (46.89 KiB) Viewed 6129 times
threads.png
threads.png (869.31 KiB) Viewed 6756 times
Last edited by SeraphimLeftNut on 02 Dec 2015, 00:20, edited 4 times in total.
no ui lag: https://www.youtube.com/watch?v=3MdcVdL2kIY
I think this is going to be fun
User avatar
SeraphimLeftNut
Contributor
 
Posts: 975
Joined: 10 Jul 2012, 19:46
Has liked: 3 times
Been liked: 219 times
FAF User Name: TA4Life

Re: Stop ui lag, especially against laggers and on setons

Postby VoiceofReason » 24 Nov 2015, 06:25

Hey TA4Life, look at this thread
viewtopic.php?f=2&t=9487
and give that a try. What you discussed here reminds me every bit about why I have these settings(from my link) set for FA when I play. I started playing fa on a 1gbRam, PentD computer with a 8500, I over the years found every little way I could to make the game a better playable experience. Even when I built a stupid powerful machine FA, I wanted something 100% responsive, 100% of the time - and even with my beast machine, without these settings, in long FFAs, and Phantoms the UI would be less responsive in different ways - mostly in the crazy most heated moments of a match where 100s, or 1000s of things are happening all at once, or zooming in and out real fast with a screen full of units, shields, rings, you know - all that fun stuff.
Seriously tho, give it a try.
User avatar
VoiceofReason
Priest
 
Posts: 422
Joined: 26 Sep 2011, 04:13
Has liked: 175 times
Been liked: 53 times
FAF User Name: VoRCom

Re: Stop ui lag, especially against laggers and on setons

Postby SeraphimLeftNut » 24 Nov 2015, 06:57

VoiceofReason wrote:Hey TA4Life, look at this thread
viewtopic.php?f=2&t=9487
and give that a try. What you discussed here reminds me every bit about why I have these settings(from my link) set for FA when I play. I started playing fa on a 1gbRam, PentD computer with a 8500, I over the years found every little way I could to make the game a better playable experience. Even when I built a stupid powerful machine FA, I wanted something 100% responsive, 100% of the time - and even with my beast machine, without these settings, in long FFAs, and Phantoms the UI would be less responsive in different ways - mostly in the crazy most heated moments of a match where 100s, or 1000s of things are happening all at once, or zooming in and out real fast with a screen full of units, shields, rings, you know - all that fun stuff.
Seriously tho, give it a try.


This looks like a similar solution to what I am suggesting. My big problem is that I am constantly bitching about ui lag and no one ever links this for me. There are many people out there who have no idea and who think that ui lag is a normal part of the game. I also thought I build a powerful machine that should get 100% responsiveness but ran into many problems with everything from ssd to gpu etc. But at the end of the day this problem was still there.

This seriously should be front page of FAF all the time and all new incoming players should be shown this.

The big reason people don't pay attention to these fixes is they try them in some replay or in sandbox and don't see that it is a big deal, others have systems that don't have these problems to the same degree. The problem really occurs like you said, during the most heated moments in big games.
no ui lag: https://www.youtube.com/watch?v=3MdcVdL2kIY
I think this is going to be fun
User avatar
SeraphimLeftNut
Contributor
 
Posts: 975
Joined: 10 Jul 2012, 19:46
Has liked: 3 times
Been liked: 219 times
FAF User Name: TA4Life

Re: Stop ui lag, especially against laggers and on setons

Postby VoiceofReason » 24 Nov 2015, 08:08

I swear I have tried to mention this to you once before in clanchat, maybe I didn't ping you hard enough. I've told BRNK about this too. I've tried spreading the things I've found out to anyone whose ever wanted the best possible performance they can get. I usually tried to privately tell people this though, because its too easy to initiate a massive trollfest against myself by saying you get can better performance by doing these weird tricks, as you can see in the thread I linked - and the thread that started it all; like you touched on, just a bunch of ppl arguing for the sake of it.


...and btw this was added to the FAF WIKI after that thread I linked.
User avatar
VoiceofReason
Priest
 
Posts: 422
Joined: 26 Sep 2011, 04:13
Has liked: 175 times
Been liked: 53 times
FAF User Name: VoRCom

Re: Stop ui lag, especially against laggers and on setons

Postby VoiceofReason » 24 Nov 2015, 08:16

Oh, and also - If you use the program "Process Lasso" you can change your settings once FA is open, and set it under the "always" menu for those performance settings you want to change, and anytime FA runs it will be launched using your preferences.
I actually play all games like this now. Priority-high and affinity set to NOT use on Core0 for the game.exe, but instead all others.
I always get a noticeable improvement.
User avatar
VoiceofReason
Priest
 
Posts: 422
Joined: 26 Sep 2011, 04:13
Has liked: 175 times
Been liked: 53 times
FAF User Name: VoRCom

Re: Stop ui lag, especially against laggers and on setons

Postby SeraphimLeftNut » 24 Nov 2015, 08:18

VoiceofReason wrote:I swear I have tried to mention this to you once before in clanchat, maybe I didn't ping you hard enough. I've told BRNK about this too. I've tried spreading the things I've found out to anyone whose ever wanted the best possible performance they can get. I usually tried to privately tell people this though, because its too easy to initiate a massive trollfest against myself by saying you get can better performance by doing these weird tricks, as you can see in the thread I linked - and the thread that started it all; like you touched on, just a bunch of ppl arguing for the sake of it.


...and btw this was added to the FAF WIKI after that thread I linked.


I see it in the wiki now, but it has the word "SIM" in large latters. The point is that SIM doesn't matter as long as you are not the slowest one in the game.
I do remember something vaguely about the thread you linked, but it didn't stick with me as a way to fix ui lag, just some way to make sim speed improve by 5%.

Someone needs to change this http://wiki.faforever.com/index.php?tit ... _Sim_Speed. To include the UI part, completely separate from that whole useless sim discussion.
no ui lag: https://www.youtube.com/watch?v=3MdcVdL2kIY
I think this is going to be fun
User avatar
SeraphimLeftNut
Contributor
 
Posts: 975
Joined: 10 Jul 2012, 19:46
Has liked: 3 times
Been liked: 219 times
FAF User Name: TA4Life

Re: Stop ui lag, especially against laggers and on setons

Postby Cuddles » 24 Nov 2015, 10:05

Awesome, will give this a go.
Turinturambar defended very valiantly
User avatar
Cuddles
Contributor
 
Posts: 692
Joined: 29 Mar 2013, 14:19
Has liked: 132 times
Been liked: 118 times
FAF User Name: Scoot

Re: Stop ui lag, especially against laggers and on setons

Postby d-_-b » 24 Nov 2015, 10:29

this works quite well.

after using the LOD mod to draw rocks/trees from further distances i found when trying to playback replays as fast as possible (+10, or whatever it can do, therefore maxing out the sim thread), the render thread itself started having serious issues, and i had incredibly bad fps at +10, yet fine fps at +0, even though its drawing the same amount of stuff...

forcing the render and sim threads to different cores seems to have completely removed that interplay, and my fps will be the same regardless of simspeed.

moreover, i found that if your CPU uses turboboost or something, forcing the two threads onto two cores can have a positive impact. With 2 cores utilised my old i5-750 will clock itself at 3.4ghz as opposed to 2.6, considering my shit mobo has no tools for overclocking, this is as good as it can get, however, as a nice side effect, i actually gained about +1.5 simspeed on hard replays.

nicely done, also, i was previously using processexplorer to set affinities, was looking for a tool to set thread affinity individually!
User avatar
d-_-b
Avatar-of-War
 
Posts: 93
Joined: 19 Jun 2015, 01:58
Has liked: 6 times
Been liked: 20 times
FAF User Name: d-_-b

Re: Stop ui lag, especially against laggers and on setons

Postby Petricpwnz » 25 Nov 2015, 10:05

Ok I wasn't expecting much since I'm fairly tolerant to lag anyway and just don't care, but decided to try this out after ta's persistent spamming in aeolus... No shit now I know what a smooth game is xD Watching replays at high speed is much smoother and all the stuttering is gone. 10/10 recommend.
Blackheart wrote:actually i love lolis and want petry to be my waifu


Scientifically proving that Blackheart is a weeb - https://imgur.com/a/J436c | https://clips.twitch.tv/AssiduousAverageOxMikeHogu

Best meme of 2017 - https://puu.sh/yLsvH/abbf54eb99.mp4
User avatar
Petricpwnz
Priest
 
Posts: 464
Joined: 30 Aug 2012, 01:48
Has liked: 442 times
Been liked: 473 times
FAF User Name: Fremy_Speeddraw

Re: Stop ui lag, especially against laggers and on setons

Postby Morax » 25 Nov 2015, 16:41

Petricpwnz wrote:Ok I wasn't expecting much since I'm fairly tolerant to lag anyway and just don't care, but decided to try this out after ta's persistent spamming in aeolus... No shit now I know what a smooth game is xD Watching replays at high speed is much smoother and all the stuttering is gone. 10/10 recommend.


Okay now I have to give it a go. The only UI lag I ever notice is using the brackets "[" and "]" to change firing mode verse using the mouse clicks.

The true test will be playing against Inquisitor or TitaniumACU
Maps and Modifications Councilor

M&M Discord Channel

Come join us and help create content with the artists of FAF.
User avatar
Morax
Councillor - Maps and Mods
 
Posts: 2865
Joined: 25 Jul 2014, 18:00
Has liked: 1167 times
Been liked: 662 times
FAF User Name: Morax

Next

Return to General Discussions

Who is online

Users browsing this forum: No registered users and 1 guest