Page 1 of 1

Performance regression in recent builds

PostPosted: Sun Jul 06, 2014 17:29
by stu
I have just compiled the latest git looking forward to trying out the updated mt game but
unfortunately I am experiencing highly erratic FPS ranging from 1 to my usual 30-40, several
time per second. This is not just an error in the reported fps as the jerkiness is noticeable in
player movement and fog is oscillating all over the place.

Sorry I can't help much identifying the commit that broke this as my last dev build is over
a month old now, however, I don't think minetest_next is to blame as I get the same problem
with a custom game mode of my own (wip) and mt next worked fine last time I tried it.

Hope this is fixed sometime soon because for now the current version is completely unplayable (for me)

Incidentally, I am using an old P4 with a slightly more modern gfx card, nothing special but I
was getting a comfortable 30-40 fps before now D:

Re: Performance regression in recent builds

PostPosted: Sun Jul 06, 2014 19:58
by stormchaser3000
hmmm did you set your viewing_range_nodes_max setting?

Re: Performance regression in recent builds

PostPosted: Sun Jul 06, 2014 20:17
by stu
stormchaser3000 wrote:hmmm did you set your viewing_range_nodes_max setting?

Thanks for the suggestion, limiting max view range does calm down the wild oscillations a little but this is still nowhere near as smooth as it was a month ago with the default settings and still not really playable on this old pc anymore.

Re: Performance regression in recent builds

PostPosted: Sun Jul 06, 2014 20:20
by cheapie
I'm not having this problem.

Is this with shaders on, off, or either way?

Re: Performance regression in recent builds

PostPosted: Sun Jul 06, 2014 20:52
by stu
cheapie wrote:I'm not having this problem.

Is this with shaders on, off, or either way?

Are you using an older pc too? I am using the default settings, as I was before, in fact it was still even still playable with all the eye-candies enabled in my last build, I guess I will just have to stick with that for now.

Re: Performance regression in recent builds

PostPosted: Sun Jul 06, 2014 20:56
by Krock
I can't notice any change in the gameplay. (minimalistic settings)

Re: Performance regression in recent builds

PostPosted: Sun Jul 06, 2014 21:02
by stu
Krock wrote:I can't notice any change in the gameplay. (minimalistic settings)

It's likely something specific to my cpu/gpu so probably something i will just have to live with.
When I get time I may try to track back and find out which commit breaks it for me.

Re: Performance regression in recent builds

PostPosted: Mon Jul 07, 2014 05:18
by webdesigner97
stu wrote:
Krock wrote:I can't notice any change in the gameplay. (minimalistic settings)

It's likely something specific to my cpu/gpu so probably something i will just have to live with.
When I get time I may try to track back and find out which commit breaks it for me.

Which CPU/GPU do you have?

Re: Performance regression in recent builds

PostPosted: Mon Jul 07, 2014 14:16
by BrandonReese
I'm seeing the same thing. My FPS fluctuates quickly between 19 and 60 and there are periodic jitters in game play. Shaders off, and all filters off. It's still playable for me, but my FPS used to be more stable.

00:01.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Trinity [Radeon HD 7560D]

Re: Performance regression in recent builds

PostPosted: Mon Jul 07, 2014 14:23
by Vazon
I run a home server and I have noticed a lot of regression in what the servers can do and how well they preform. Just a few months ago I could run a server on the computer and hold 35 to 60 people on i with only a few spikes but they would go down, but now if it run the same exact server same mods and everything the only thing that has changed is the minetest version and maby get 10 people on and the server is mostly unplayable after that because the lag just becomes to much. Minetest is slowly becoming less server friendly :|

Re: Performance regression in recent builds

PostPosted: Mon Jul 07, 2014 15:06
by Krock
Vazon wrote:I run a home server and I have noticed a lot of regression in what the servers can do and how well they preform. Just a few months ago I could run a server on the computer and hold 35 to 60 people on i with only a few spikes but they would go down, but now if it run the same exact server same mods and everything the only thing that has changed is the minetest version and maby get 10 people on and the server is mostly unplayable after that because the lag just becomes to much. Minetest is slowly becoming less server friendly :|

I had this lag problem too and solved it by using a newer 0.4.9-dev version (MSVC instead of MinGW)

Re: Performance regression in recent builds

PostPosted: Mon Jul 07, 2014 17:11
by Vazon
Krock wrote:
Vazon wrote:I run a home server and I have noticed a lot of regression in what the servers can do and how well they preform. Just a few months ago I could run a server on the computer and hold 35 to 60 people on i with only a few spikes but they would go down, but now if it run the same exact server same mods and everything the only thing that has changed is the minetest version and maby get 10 people on and the server is mostly unplayable after that because the lag just becomes to much. Minetest is slowly becoming less server friendly :|

I had this lag problem too and solved it by using a newer 0.4.9-dev version (MSVC instead of MinGW)

What is the difference between MSVC and MinGW that fixes the lag?

Re: Performance regression in recent builds

PostPosted: Mon Jul 07, 2014 18:02
by stu
webdesigner97 wrote:Which CPU/GPU do you have?

CPU is P4 3.0 GHz 800FSB GPU GeForce 8400GS 1024Mb (2009 rev. 3)

Krock wrote:I had this lag problem too and solved it by using a newer 0.4.9-dev version (MSVC instead of MinGW)
Not an option for me as I am using linux (xubuntu)

Re: Performance regression in recent builds

PostPosted: Mon Jul 07, 2014 20:09
by webdesigner97
stu wrote:
webdesigner97 wrote:Which CPU/GPU do you have?

CPU is P4 3.0 GHz 800FSB GPU GeForce 8400GS 1024Mb (2009 rev. 3)
(...)

I thought there might be similarities with my setup: AMD FX 4130, XFX Radeon HD 7770, but it doesn't seem so... I also have this problem...

Re: Performance regression in recent builds

PostPosted: Tue Jul 08, 2014 03:44
by Vazon
stu wrote:
webdesigner97 wrote:Which CPU/GPU do you have?

CPU is P4 3.0 GHz 800FSB GPU GeForce 8400GS 1024Mb (2009 rev. 3)

Krock wrote:I had this lag problem too and solved it by using a newer 0.4.9-dev version (MSVC instead of MinGW)
Not an option for me as I am using linux (xubuntu)


stu im also using Linux (Ubuntu) and this lag is horrible, I updated to 0.4.10 today and it got even worse then before, the lag was always around 6 with only 1 person on and know its always 13 plus and nothing has changed but the server version

Re: Performance regression in recent builds

PostPosted: Wed Jul 09, 2014 13:25
by Zeno
Vazon wrote:I run a home server and I have noticed a lot of regression in what the servers can do and how well they preform. Just a few months ago I could run a server on the computer and hold 35 to 60 people on i with only a few spikes but they would go down, but now if it run the same exact server same mods and everything the only thing that has changed is the minetest version and maby get 10 people on and the server is mostly unplayable after that because the lag just becomes to much. Minetest is slowly becoming less server friendly :|


This is the exact opposite to my experience. Just looking at the source code changes (and also the glibc source code for stuff like memcpy(), byte alignment, vector transfers and CPU intrinsic instructuctions that functions like this provides) it should not only be theoretically faster, but is in fact (much) faster in practice according to my profiling. Using stuff like memcpy() instead of a naive copy loop /has/ to be faster (on all modern CPUs that I am aware of). At a first glance both approaches are O(n) complexity (obviously) but 'k' is different -- much, much, much faster -- for the cpu intrinstric instructions that glibc (and I assume VS unless it's stupid) functions like memcpy() use instead of "higher level" loops. The speed increase is not 100%, it's more like 400-1000% faster. And a recent commit (before 0.4.10) achieved this aforementioned massive increase in performance by doing just that (replacing a single loop with a much more efficient call to memcpy()).

So, as far as I can see CPU performance should be much better and the CPU used more optimally. I'm not a developer for MT, but I'd be interested in "hard data" that demonstrates any server-related performance regressions. As stated, my own tests indicate the exact opposite (all of my servers, from test builds, through to VMs through to servers running on bare metal etc etc etc) *all* perform much better.

I wonder if the much improved CPU performance has caused a bottleneck somewhere else for some systems/configurations?


(Most of the stuff above is based on my tests performed on x86-based systems)

Edit: The more I think about it, the more I think that any performance regressions must be a side-effect of increased CPU efficiency. Perhaps the DB backend can no longer keep up, or disk access, or network, or something else -- obviously this is conjecture. The developers would probably appreciated detailed reports such as build options, database backends, OS, lib versions etc etc so that degraded performance for some configurations/whatever (which I must stress, again, I have had the complete opposite experience) can be tested.

Re: Performance regression in recent builds

PostPosted: Wed Jul 09, 2014 18:40
by stu
Zeno wrote:I wonder if the much improved CPU performance has caused a bottleneck somewhere else for some systems/configurations?

You might well be on to something with this, because I am still getting about the same(ish) maximum frame rate as before only with periodic drops to 1fps for a split second then back again making movement very jerky.
From what I can tell it seems to be loading the cpu much more than before with my single core maxed out at 100%, in my previous build it sits at around 50-60%, it also would appear to be eating quite a bit more RAM than before but that may be down to the game change like 250Mb vs 130Mb (according to the task manager)

Note that I am talking about singleplayer mode here, I've not even bothered trying the server :-/

Re: Performance regression in recent builds

PostPosted: Mon Jul 14, 2014 17:21
by Marshall_maz
I have the same problem. On 0.4.9 my game ran smoothly. Now on 0.4.10 I have very jerky movement. I play on a home server. My pc I play on is a I5 3ghz , 16gig ram , Geforce GTX760 4gig , Win 7 64bit.
I noticed that the 64bit version of the game doesn't work ( missing openal32.dll error ). So I use the 32bit version of the game. This is proper hardware and the game should run smoothly.

On my Ubuntu 14.04 I don't have the problem at all. On that OS it runs smooth , and that hardware is worse. ( Onboard graphics chip ). Doesn't even have a 3D card in.

I even tried putting the game's graphics to it's lowest with all extra options disabled and it doesn't help.

This is really frustrating me and any help getting it fixed will be much appreciated.

EDIT: Managed to get mine sorted. Tried the other zip ( mingw 64bit ) and that one works perfectly. :)

Re: Performance regression in recent builds

PostPosted: Tue Jul 15, 2014 19:06
by addi
Marshall_maz wrote:I have the same problem. On 0.4.9 my game ran smoothly. Now on 0.4.10 I have very jerky movement. I play on a home server. My pc I play on is a I5 3ghz , 16gig ram , Geforce GTX760 4gig , Win 7 64bit.
I noticed that the 64bit version of the game doesn't work ( missing openal32.dll error ). So I use the 32bit version of the game. This is proper hardware and the game should run smoothly.

On my Ubuntu 14.04 I don't have the problem at all. On that OS it runs smooth , and that hardware is worse. ( Onboard graphics chip ). Doesn't even have a 3D card in.

I even tried putting the game's graphics to it's lowest with all extra options disabled and it doesn't help.

This is really frustrating me and any help getting it fixed will be much appreciated.

EDIT: Managed to get mine sorted. Tried the other zip ( mingw 64bit ) and that one works perfectly. :)



i had exactly the same problem: 64bit msvc does not work 32bit msvc was unplayable slowly. currently i playing with the 64 bit MinGw.

Re: Performance regression in recent builds

PostPosted: Thu Jul 17, 2014 02:50
by Tedypig
Hey all, I did a little experiment to prove that Minetest is getting worse (at least for older machines) because of the copius amounts of lag I get in 0.4.10.
To be fair, all of these times were recorded with the same settings.
These results, again, to be fair, were all tested on Lubuntu 14.04 using Wine (so I can test older version).
All of these times were recorded in singleplayer with all privs.
All times were recorded with a view range on 35

0.4.5 Chunks load in = Instantly max_lag = Unknown (not in /status in this version) Time to connect = 1 Second
0.4.6-2 Chunks load in = Instantly max_lag = Unknown (not in /status in this version) Time to connect = 1 Second
0.4.7 Chunks load in = Instantly max_lag = Unknown (not in /status in this version) Time to connect = 2 Seconds
0.4.8 Chunks load in = instantly max_lag = 1.37 time to connect = 3 Seconds
0.4.9 Chunks load in = instantly max_lag = 1.38 time to connect = 3 seconds
0.4.10 Chunks load in = Unknown max_lag = Unknown Time to connect = Could not connect. Tried 3 times and waited 5 minutes each.


OK, to give it a time. I just ran 0.4.10 normally, from terminal, and got this.
Chunks load in = 10 seconds max_lag = 13.08 Time to connect = 37 Seconds.

Re: Performance regression in recent builds

PostPosted: Thu Jul 17, 2014 10:51
by Krock
Tedypig wrote:OK, to give it a time. I just ran 0.4.10 normally, from terminal, and got this.
Chunks load in = 10 seconds max_lag = 13.08 Time to connect = 37 Seconds.

I usually connect the worlds in 6 seconds and get a max_lag of 1.4s in 0.4.10-dev.

addi wrote:i had exactly the same problem: 64bit msvc does not work 32bit msvc was unplayable slowly. currently i playing with the 64 bit MinGw.

Seems like that 64bit version is broken...
"Unplayable slowly" - no wonder, it's just inefficient on 64bit systems.

Re: Performance regression in recent builds

PostPosted: Thu Jul 17, 2014 15:29
by cheapie
With the latest version (just git pulled a few minutes ago), running on Linux Mint 17, an AMD FX-8350 CPU, and a Radeon HD 7770 video card, I get a max_lag of 0.48 immediately after joining a brand new world. The map also generates practically instantly. Looking across a desert, I get 40 FPS with a view range of 500.

I don't see the problem. Maybe it's just a Windows thing?

Re: Performance regression in recent builds

PostPosted: Thu Jul 17, 2014 18:57
by Calinou
cheapie wrote:With the latest version (just git pulled a few minutes ago), running on Linux Mint 17, an AMD FX-8350 CPU, and a Radeon HD 7770 video card, I get a max_lag of 0.48 immediately after joining a brand new world. The map also generates practically instantly. Looking across a desert, I get 40 FPS with a view range of 500.

I don't see the problem. Maybe it's just a Windows thing?


This problem seems to be mostly Windows-specific, affecting a specific build.