BVE WorldWide
Would you like to react to this message? Create an account in a few clicks or log in to continue.

[SOLVED] FPS - the further on route, the lower the framerate..?

2 posters

Go down

[SOLVED] FPS - the further on route, the lower the framerate..? Empty [SOLVED] FPS - the further on route, the lower the framerate..?

Post by Talkless Fri Mar 20, 2020 8:13 pm

Hi,

I'm running v1.7.1.2 on Debian Sid, on ASUS N551JM laptop with i7-4710HQ CPU @ 2.50GHz and GeForce GTX 860M.

What I've noticed so far is that in routes I've tried - Birmingham Cross-City South v1.31 [0], First Brno Track [1], and Kilmagranny modern era - it all starts with rather high FPS (more than ~50), but the further I go (the nearer the end of route), the lower framerate (rather gradually) gets.. (down to ~12).

Could it be some sort of resource leak? Some object not culled away? Or is that just approaching final station that has more details..?

Visibility 1000, no motion blur, not antialiasing. 1920x1080 (full screen), 32 sounds allowed.

I really like how OpenBVE "Feels", but.. that performance Sad .

[0] https://www.railsimroutes.net/bve_trainsim/x-city_south.php
[1] http://brnobve.eu/?page_id=772
[2] http://www.celtictrainsim.com/irishroutes.html#grp_473


Last edited by Talkless on Mon Mar 23, 2020 8:05 pm; edited 1 time in total

Talkless

Posts : 9
Join date : 2020-02-08

Back to top Go down

[SOLVED] FPS - the further on route, the lower the framerate..? Empty Re: [SOLVED] FPS - the further on route, the lower the framerate..?

Post by Talkless Sat Mar 21, 2020 4:28 pm

I've just finished Portarlington [0] route.

At the first station, I have ~50 fps and ~630MB of RAM usage.
At the last station, there's only ~11 fps and ~1200MB of ram usage!

Something's not right...

[0] http://www.celtictrainsim.com/irishroutes.html#pic_273

Talkless

Posts : 9
Join date : 2020-02-08

Back to top Go down

[SOLVED] FPS - the further on route, the lower the framerate..? Empty Re: [SOLVED] FPS - the further on route, the lower the framerate..?

Post by leezer3 Sat Mar 21, 2020 7:55 pm

I can't see anything abnormal on Windows, will try Linux in a minute.

RAM usage here:
First station ~190mb
Fluctuates from there on upto a peak of about 230mb in the countryside (Lots of induvidual trees I suspect without digging into it)

FPS here:
190 - 230, consistant throuhout the route.

First port of call is probably Mono updates, although Sid does appear to be running the most recent (highly unusual Razz )

leezer3

Posts : 1955
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

[SOLVED] FPS - the further on route, the lower the framerate..? Empty Re: [SOLVED] FPS - the further on route, the lower the framerate..?

Post by leezer3 Sat Mar 21, 2020 9:57 pm

Second page of options, Advanced Options box:
Tick Unload Unused Textures

This should sort (well, workaround anyway....) the issue.
Assuming it fixes it nicely for you, I'd be tempted to set this as on by default for non-Windows platforms.

I haven't got any immediate answers as to why Mono is slowing marginally for each texture loaded, but I'd suspect its something in libgdiplus.
I also get the suspicion that it's using the swap file on your end, which would definitely terminally slow things down.....

(Also, 1.7.1.3 should be faster which helps!)

leezer3

Posts : 1955
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

[SOLVED] FPS - the further on route, the lower the framerate..? Empty Re: [SOLVED] FPS - the further on route, the lower the framerate..?

Post by Talkless Sun Mar 22, 2020 9:53 am

Thanks for your reply!

Yes, Sid does not have latest Mono, so I use one from upstream repository.

And I have 16GB of RAM, there's no swap involved.

I'll try that unloading option, I haven't noticed that...

Talkless

Posts : 9
Join date : 2020-02-08

Back to top Go down

[SOLVED] FPS - the further on route, the lower the framerate..? Empty Re: [SOLVED] FPS - the further on route, the lower the framerate..?

Post by Talkless Sun Mar 22, 2020 10:40 am

Wow, there's bunch of options!

I've enabled new renderer, and texture unloading, but result is the same Sad (just finished another ride on Portarlington).

Could it be that .deb download is accidentally built in Debug mode, for example?

Talkless

Posts : 9
Join date : 2020-02-08

Back to top Go down

[SOLVED] FPS - the further on route, the lower the framerate..? Empty Re: [SOLVED] FPS - the further on route, the lower the framerate..?

Post by leezer3 Sun Mar 22, 2020 2:12 pm

The deb is definitely built in release mode (It's all done automatically anyway).

Haven't got anything else really useful at the minute I'm afraid-
Unloading unused textures here gives me a very minor memory growth over Portarlington (starts at ~350mb goes to about 500mb by the end), which is reasonable in my book.
FPS remains nice and constant at around 50, and would likely be a lot higher if VMWare's graphics drivers were any good Razz
No change in FPS whether I'm unloading textures or not, just greater memory growth.


Even at 1.5gb memory usage it shouldn't really do anything interesting, which is what's a little confusing (I've got a couple of mega-long routes which hit the memory usage hard, but have silly FPS numbers).

Some questions / ideas:

  • Does jumping to the end from the in-game menu produce the same effects? (I'm reasonably that the primary cause of this is texture related, and if so it shouldn't)
  • 1.7.0.3 is the last version before the 'new' renderer. This involved a *lot* of internal plumbing changes, and it'd be interesting to know if it's got the same problem: https://vps.bvecornwall.co.uk/OpenBVE/Stable/OpenBVE-1.7.0.3.deb

leezer3

Posts : 1955
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

[SOLVED] FPS - the further on route, the lower the framerate..? Empty Re: [SOLVED] FPS - the further on route, the lower the framerate..?

Post by Talkless Sun Mar 22, 2020 5:53 pm

I'm running that lastest .3 release. It's a bit better, because at the beginning I get strait 60fps VSYNC cap, but even before getting to the first (100) speed limit sign, I get FPS down to ~25.

Jumping to last station does not reproduce issue, I have to drive for some time.

But what I found is... htop shows that OpenBVE performs ~30MB/s writes!
[SOLVED] FPS - the further on route, the lower the framerate..? 3cBLQ1o

I've launched sysdig to filtering events for that pid, and what I see is:
Code:
2264702 19:46:23.123929811 2 cli (59998) > write fd=40(<f>/home/vincas/.config/OpenBve/Settings/logs.bin) size=4096                                          
2264774 19:46:23.124047785 2 cli (59998) > lseek fd=40(<f>/home/vincas/.config/OpenBve/Settings/logs.bin) offset=0 whence=0(SEEK_SET)                        
2264775 19:46:23.124048265 2 cli (59998) < lseek res=2932736                                                                                                
2264776 19:46:23.124049365 2 cli (59998) > write fd=40(<f>/home/vincas/.config/OpenBve/Settings/logs.bin) size=4096                                          
2264841 19:46:23.124155688 2 cli (59998) > lseek fd=40(<f>/home/vincas/.config/OpenBve/Settings/logs.bin) offset=0 whence=0(SEEK_SET)                        
2264843 19:46:23.124156002 2 cli (59998) < lseek res=2936832                                                                                                
2264844 19:46:23.124156776 2 cli (59998) > write fd=40(<f>/home/vincas/.config/OpenBve/Settings/logs.bin) size=4096                                          
2264918 19:46:23.124261240 2 cli (59998) > lseek fd=40(<f>/home/vincas/.config/OpenBve/Settings/logs.bin) offset=0 whence=0(SEEK_SET)                        
2264919 19:46:23.124261549 2 cli (59998) < lseek res=2940928                                                                                                
2264921 19:46:23.124262610 2 cli (59998) > write fd=40(<f>/home/vincas/.config/OpenBve/Settings/logs.bin) size=4096                                          
2264995 19:46:23.124367260 2 cli (59998) > lseek fd=40(<f>/home/vincas/.config/OpenBve/Settings/logs.bin) offset=0 whence=0(SEEK_SET)                        
2264996 19:46:23.124367561 2 cli (59998) < lseek res=2945024                                                                                                
2264998 19:46:23.124368359 2 cli (59998) > write fd=40(<f>/home/vincas/.config/OpenBve/Settings/logs.bin) size=4096                                          
2265059 19:46:23.124474137 2 cli (59998) > lseek fd=40(<f>/home/vincas/.config/OpenBve/Settings/logs.bin) offset=0 whence=0(SEEK_SET)

It's overwriting logs.bin again and again???

It's gonna kill my SSD Very Happy .

Talkless

Posts : 9
Join date : 2020-02-08

Back to top Go down

[SOLVED] FPS - the further on route, the lower the framerate..? Empty Re: [SOLVED] FPS - the further on route, the lower the framerate..?

Post by leezer3 Sun Mar 22, 2020 6:42 pm

First page of options, Detail of Simulation-
Uncheck Enable Black Box


That'll stop the writes, although any sensible SSD / HDD controller would be buffering the file in it's internal RAM, not writing to the flash with something like this.

Might also help with the FPS issues if there's a race in Mono somewhere.


Having said that, I've stuffed in a partial fix today so that with this enabled, the logfile is only flushed every 30s / on exit (instead of every frame).
https://vps.bvecornwall.co.uk/OpenBVE/Builds/OpenBVE-2020-03-22.zip

No deb for daily builds, the next 'planned' release is hopefully going to be sometime in the next few weeks.

leezer3

Posts : 1955
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

[SOLVED] FPS - the further on route, the lower the framerate..? Empty Re: [SOLVED] FPS - the further on route, the lower the framerate..?

Post by Talkless Sun Mar 22, 2020 6:54 pm

leezer3 wrote:No deb for daily builds, the next 'planned' release is hopefully going to be sometime in the next few weeks.
I'll build that myself, thanks! I'll try that tomorrow.

Talkless

Posts : 9
Join date : 2020-02-08

Back to top Go down

[SOLVED] FPS - the further on route, the lower the framerate..? Empty Re: [SOLVED] FPS - the further on route, the lower the framerate..?

Post by Talkless Mon Mar 23, 2020 6:52 pm

Buffering or not, it's good practice to avoid syscalls (in this case even two per frame) whenever possible.

Anyhow, I've built master, and it went FLAWLESS 60FPS (OK with some jitters, maybe I should use "Load in advance" if I have RAM?) through all track! That was amazing! Big thanks! Now I'll have to re-drive all tracks Very Happy .

Talkless

Posts : 9
Join date : 2020-02-08

Back to top Go down

[SOLVED] FPS - the further on route, the lower the framerate..? Empty Re: [SOLVED] FPS - the further on route, the lower the framerate..?

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum