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
Server: localhost
Seed: 9437572541335478665
Start point: 44.0 1.5 76.0 (yaw = 0), view leveled by horizon
View distance: fixed at 35 nodes
Benchmark time: 60 sec (with mpgv6 working and mpgv6 idle without restarts)
Moving: by walking straight to North, pressing space at obstacles and in water, avoiding tree one block left, dropping down into cave at nearly 60 sec
OS: Windows 7 sp1
System: Core i3-2120, 8GB RAM, ATI Radeon HD 6870
Config:
Spoiler
maintab_LAST = singleplayer
menu_last_game = minetest
name =
server_dedicated = false
fixed_map_seed =
mainmenu_last_selected_world = 1
mg_name = v6
selected_world_path = D:\Newprog\MT\bin\..\worlds\10
viewing_range_nodes_max = 35
viewing_range_nodes_min = 35
creative_mode = false
enable_damage = true
fast_move = false
free_move = false
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
maintab_LAST = multiplayer
menu_last_game = minetest
name = Fixer
server_dedicated = false
fixed_map_seed =
mainmenu_last_selected_world = 1
mg_name = v6
selected_world_path = D:\Newprog\MT\bin\..\worlds\10
creative_mode = false
enable_damage = true
fast_move = false
free_move = false
public_serverlist = true
address = 87.110.8.195
remote_port = 30000
anisotropic_filter = true
bilinear_filter = false
connected_glass = true
enable_bumpmapping = true
enable_parallax_occlusion = true
enable_waving_leaves = true
enable_waving_plants = true
enable_waving_water = true
fsaa = 0
generate_normalmaps = true
leaves_style = fancy
mip_map = true
trilinear_filter = false
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
maintab_LAST = singleplayer
menu_last_game = minetest
name =
server_dedicated = false
fps_max = 120
viewing_range_nodes_min = 70
wanted_fps = 75
address = 87.110.8.195
remote_port = 30000
enable_minimap = true
minimap_shape_round = false
sound_volume = 0.5
language = en
anisotropic_filter = true
bilinear_filter = false
connected_glass = true
enable_bumpmapping = true
enable_parallax_occlusion = true
enable_waving_leaves = true
enable_waving_plants = true
enable_waving_water = true
fsaa = 0
generate_normalmaps = true
leaves_style = fancy
mip_map = true
opaque_water = false
trilinear_filter = false
fixed_map_seed = 16958914450148004323
gui_scaling = 1.00
mainmenu_last_selected_world = 1
mg_name = v7
public_serverlist = true
selected_world_path = D:\Games\Minetest\minetest-git\bin\..\worlds\TestWorld
creative_mode = true
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.