[SOLVED] FPS - the further on route, the lower the framerate..?
2 posters
Page 1 of 1
[SOLVED] FPS - the further on route, the lower the framerate..?
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
.
[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
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

[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
Re: [SOLVED] FPS - the further on route, the lower the framerate..?
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
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
Re: [SOLVED] FPS - the further on route, the lower the framerate..?
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
)
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

Re: [SOLVED] FPS - the further on route, the lower the framerate..?
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!)
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!)
Re: [SOLVED] FPS - the further on route, the lower the framerate..?
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...
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
Re: [SOLVED] FPS - the further on route, the lower the framerate..?
Wow, there's bunch of options!
I've enabled new renderer, and texture unloading, but result is the same
(just finished another ride on Portarlington).
Could it be that .deb download is accidentally built in Debug mode, for example?
I've enabled new renderer, and texture unloading, but result is the same

Could it be that .deb download is accidentally built in Debug mode, for example?
Talkless- Posts : 9
Join date : 2020-02-08
Re: [SOLVED] FPS - the further on route, the lower the framerate..?
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
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:
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

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
Re: [SOLVED] FPS - the further on route, the lower the framerate..?
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](https://i.imgur.com/3cBLQ1o.png)
I've launched sysdig to filtering events for that pid, and what I see is:
It's overwriting logs.bin again and again???
It's gonna kill my SSD
.
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](https://i.imgur.com/3cBLQ1o.png)
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

Talkless- Posts : 9
Join date : 2020-02-08
Re: [SOLVED] FPS - the further on route, the lower the framerate..?
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.
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.
Re: [SOLVED] FPS - the further on route, the lower the framerate..?
I'll build that myself, thanks! I'll try that tomorrow.leezer3 wrote:No deb for daily builds, the next 'planned' release is hopefully going to be sometime in the next few weeks.
Talkless- Posts : 9
Join date : 2020-02-08
Re: [SOLVED] FPS - the further on route, the lower the framerate..?
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
.
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

Talkless- Posts : 9
Join date : 2020-02-08

» openBVE feature requests
» Very bad framerate
» Limit Framerate(FPS)
» Missing File Function?
» OpenBVE Low Framerate on new Laptop (8 FPS on average)
» Very bad framerate
» Limit Framerate(FPS)
» Missing File Function?
» OpenBVE Low Framerate on new Laptop (8 FPS on average)
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|