Page 1 of 1

[0.4.13] Analyzing stutter caused by map generator v6 / net

Posted: Tue Oct 06, 2015 15:10
by Fixer
Continuing my topics:
viewtopic.php?f=3&t=12814
viewtopic.php?f=3&t=12817

I've made another short test of Minetest 0.4.13 MSVC 64 bit on Win 7.
My purpose was to compare stutter while mapgen v6 was working on freshly created map and when it was idle on the same place (all nearby blocks generated - idle mapgen), without restarts.
How it was done, MT started fresh map, type /sethome and start walking straight to North, pressing space at obstacles and in water, avoiding tree one block left, dropping down into cave at nearly 60 sec, after this run I did flyover of the route, observed if most nearby blocks are loaded, after that I started from home position and did the same route (this time mapgen was idle). Data was recorded with FRAPS and processed in Excel. All big IO hungry task programs were disabled at the moment of testing.
Specs:
+ Spoiler
Config:
+ Spoiler
Results are presented like this, Y axis is frame rendering time (convert in FPS by dividing: 1000/Y-axis (20 fps is 50ms, 24 fps - 41ms, 30 fps - 33.3 ms, 40 fps - 25 ms, 50 fps - 20 ms, 60 fps - 16ms, 100fps - 10 ms)), X axis is % of all frames, actual stutters are frames with longest rendering time (on the right side):
Image
Image
Image

In general it looks like this (from fastest frames to slowest):
30 % of all fastest frames when mpv6g is working has good performance (~100 FPS)
however, after that frame rendering slow downs to 50 FPS (20% of all frames)
50 % of all fastest frames when mpv6g is idle has good performance (~100 FPS)
after that it is equal with working mapgen in range from 50 to 80 % of frames.
At 80 % performance starts to diverge
when mpv6g is working 8% of slowest frames are below playability limit (24 FPS)
when mpv6g is idle only 1% of frames are below 24 FPS
and big stutters part:
when mpv6g is working - 1.6% of frames will be lower then 10 FPS
when mpv6g is idle - 0.7% of frames will be lower then 10 FPS
extreme stutter:
when mpv6g is working - 0.2% of frames are extremely low performance (<7 FPS)
when mpv6g is idle - 0.1% of frames are extremely low performance (<11 FPS)

I hope you will understand it somehow. In general, when mapgen is working Minetest 0.4.13 will be slower half of the time (or much slower 20 % of the time). When mapgen is idle, 99% of all frames will be playable (>24FPS), while under mapgen load it is nearly 92% of all frames (or 8% of frames with unacceptable performance)
Interesting link about stutters: https://developer.nvidia.com/content/an ... centiles-0

Also, if above graphs are not convincing (or hard to understand), just look below! You will see clearly average FPS and actual stutter (Y is rendering time in ms, X - is # of frames):
Image
^^^ Just look at those spikes, lots of spikes, that actual stutter that ruins playability. TOO MUCH actually.
Image
When mapgen is idle game is much more stutter free as you can see on a graph above (just 20 noticable stutter events in 60 sec, that's like 1 stutt every 3 sec :D)

Re: [0.4.13] Analyzing stutter caused by map generator v6

Posted: Tue Oct 06, 2015 15:59
by Fixer
Note: view range was fixed at 35 nodes with default settings in all tests (that could be considered for low end PC, if you enable more options and add more view range - it will stutter much more noticeably).

Now I will join some multiplayer servers with this config and test them for 300 sec each (just actual gameplay, walking in different places, or whatever). Lets see.

1) Minetest Extreme Survival (~25 players) / 0.4.13 server / 35 nodes view
Image

2) Just Test (~2 players) / 0.4.12 server / 35 nodes view
Image

If you actually increase graphics settings and view ranges you will see something very ugly, I will show it later on example of v_range = 70 and lots of players.

Re: [0.4.13] Analyzing stutter caused by map generator v6 /

Posted: Tue Oct 06, 2015 18:41
by Fixer
Another network play, now with quality settings! 0.4.13 client on 0.4.12 server (Just Test), 13-19 players
Config:
+ Spoiler
Results:
Image
^^^ This one has autorange, you can see very bad fps and lots of stutter.
Image
^^^ This one has fixed minimal range at 70 (I play it that way), you can see very bad fps and lots of stutter.
This is typical for heavy servers.

Note: some spikes go much higher than 120 (graphs were capped at 120).

Re: [0.4.13] Analyzing stutter caused by map generator v6 /

Posted: Fri Oct 16, 2015 21:32
by Fixer
While on network play on Extreme Minetest Survival I was carving a big room not deep underground and noticed stutter when digging, probably related to digging a rock (by fast pickaxe), i've recorded new data with fraps:
Image

Re: [0.4.13] Analyzing stutter caused by map generator v6 /

Posted: Fri Oct 16, 2015 21:34
by kaadmy
Ideally, the frame time should stay below 5-20ms. I get around 30 :(
I wonder that makes MT so bad networking-wise.

Re: [0.4.13] Analyzing stutter caused by map generator v6 /

Posted: Fri Oct 16, 2015 21:41
by Fixer
Also, I did some testing of Freeminer 0.4.13.7 some time ago on same settings with same seed (but unfortunately in different place, with similar looking items like trees, water etc), so results in this case should not be compared directly, BUT, test results are much better in this particular case, with 99.5% of frames in playable range, and run was much smoother (and solid), you can see it on this graph. Stutter when interacted with the world was not tested on both games (MT and FM).
Image

Re: [0.4.13] Analyzing stutter caused by map generator v6 /

Posted: Thu Oct 22, 2015 21:50
by Fixer
Some more stutter testing on latest Krock GIT build with custom config on minetest_game, example of megaheavy stutter in forest with >70 nodes view.
Config:
+ Spoiler
Image

Re: [0.4.13] Analyzing stutter caused by map generator v6 /

Posted: Thu Oct 22, 2015 22:01
by Fixer
Can't resist, Pentium 4 2.8GHz (Northwood) / ATI Radeon 9600XT / 1536MB DDR / 21.03.2012 / 22:36:57
Image

Re: [0.4.13] Analyzing stutter caused by map generator v6 /

Posted: Mon Nov 02, 2015 21:00
by Fixer
I've looked at that even deeper, there is correlation of stutters with number of processed meshes in built-in graph, more mashes - bigger stutter.

Also, tried v6 flat mapgen and flatgen mod - stutter is present, but in less quantities and weaker (like every 5 sec or so, with sudden jumps from ~8ms up to 30ms, usually when meshes are processed).

Re: [0.4.13] Analyzing stutter caused by map generator v6 /

Posted: Tue Nov 03, 2015 08:33
by TenPlus1
Do you have mesh cache enabled and have you tried turning OFF debug logs to see if that helps stutter?

Re: [0.4.13] Analyzing stutter caused by map generator v6 /

Posted: Tue Nov 03, 2015 11:28
by Fixer
Do you have mesh cache enabled and have you tried turning OFF debug logs to see if that helps stutter?
Yes, I've tried with it too, unfortunately, it will not fix stuttering.

Code: Select all

enable_mesh_cache = true
debug_log_level =

Re: [0.4.13] Analyzing stutter caused by map generator v6 /

Posted: Tue Nov 03, 2015 11:32
by TenPlus1
Shame, I tend to find that setting debug_log_level to none speeds up disk access for minetest though.

Re: [0.4.13] Analyzing stutter caused by map generator v6 /

Posted: Thu Feb 18, 2016 15:15
by Fixer

Re: [0.4.13] Analyzing stutter caused by map generator v6 /

Posted: Wed Mar 30, 2016 15:47
by sofar
kaadmy wrote:Ideally, the frame time should stay below 5-20ms. I get around 30 :(
I wonder that makes MT so bad networking-wise.
frame time and networking have absolutely NO relationship.

I repeat, ZERO, correlation between frame time and network latency.