Page 1 of 1

Minetest Using Too Much CPU Time For Itself

PostPosted: Sat Nov 29, 2014 07:36
by .Luke
Hey guys, it's been a long time since I last posted here.

I recently tried playing Minetest again. The updates sound exciting, because the game is exactly at the stage of development I've been waiting for, but it's using 60-80% of my CPU when I start it up. This is after setting the frame rate to 15, lowering the resolution, and disabling all the pretty effects. No mods are installed besides the base game either.

This boggles my mind. Minecraft would stay below the 45% range for me all the time, and it's cobbled together with Java. Minetest is built on C++ from scratch, yet I've never seen the many speed benefits that come from natively compiled code in this game.

Granted, I have an Intel GPU. Still, Minecraft is written in a high-level language, and it doesn't have the resource foot print that Minetest does. Am I doing something horribly wrong? Are there settings I can use to combat this? I really want to play the game again, but I don't want a simple 3D game running my machine hot, voxels or not.

Re: Minetest Using Too Much CPU Time For Itself

PostPosted: Sat Nov 29, 2014 08:45
by Calinou
Yes, Minetest uses much more the CPU than it uses the GPU.

If I set the FPS limit to 0 (effectively disabling it), I have between 140 FPS and 250 FPS depending on areas – but I'm CPU-limited way before being GPU-limited.

Re: Minetest Using Too Much CPU Time For Itself

PostPosted: Sat Nov 29, 2014 08:51
by Krock
I notice the same thing and it actually depends more on the CPU.
It would be nice when Minetest would use Irrlicht 1.8.1, I think this could speed up the things a bit.

Re: Minetest Using Too Much CPU Time For Itself

PostPosted: Sat Nov 29, 2014 14:25
by Inocudom
I made a topic about this issue myself:
https://forum.minetest.net/viewtopic.php?f=6&t=10552
Sadly, it got mocked and shunned. I think things have improved a little since then, however.

Re: Minetest Using Too Much CPU Time For Itself

PostPosted: Sat Nov 29, 2014 17:38
by Calinou
Krock wrote:It would be nice when Minetest would use Irrlicht 1.8.1, I think this could speed up the things a bit.


Minetest uses the Irrlicht version you have installed. Here, I use 1.8.1. I'm not sure whether it improves performance, though.

Re: Minetest Using Too Much CPU Time For Itself

PostPosted: Sat Nov 29, 2014 17:44
by rubenwardy
He may have meant 1.8.1 features, but I don't know what.

Re: Minetest Using Too Much CPU Time For Itself

PostPosted: Sun Nov 30, 2014 05:12
by .Luke
Calinou wrote:Yes, Minetest uses much more the CPU than it uses the GPU.

If I set the FPS limit to 0 (effectively disabling it), I have between 140 FPS and 250 FPS depending on areas – but I'm CPU-limited way before being GPU-limited.


That's a huge deal-breaker for my ASUS Notebook, then. It looks like I won't be able to enjoy it properly until I build a desktop PC, and by then, I'm sure the game will have matured a lot more anyway. I can't wait to see Minetest hitting stable version numbers, you guys are making good progress on the project already.

Inocudom wrote:I made a topic about this issue myself:
https://forum.minetest.net/viewtopic.php?f=6&t=10552
Sadly, it got mocked and shunned. I think things have improved a little since then, however.


There's nothing I can't stand more than "It's working just fine for me, so what's your problem?" type of people, that's a real shame. I used to be really angry at a broad spectrum of idiots, but now I laugh at them, and am somewhat amused by how insufferably stupid they are. Don't let the collective ignorance of uncultured, immature cretins get under your skin.

Re: Minetest Using Too Much CPU Time For Itself

PostPosted: Mon Dec 01, 2014 08:42
by rubenwardy
You got mocked and shunned because you didn't give any data to begin with, just expected us to read your mind.

Re: Minetest Using Too Much CPU Time For Itself

PostPosted: Tue Dec 02, 2014 21:57
by hoodedice
rubenwardy wrote:You got mocked and shunned because you didn't give any data to begin with, just expected us to read your mind.


Please. I just went through that thread, and almost every other person was being a jerk. Just don't bring that crap up again, Inocudom.

Re: Minetest Using Too Much CPU Time For Itself

PostPosted: Wed Dec 03, 2014 03:16
by Zeno
hoodedice wrote:Please. I just went through that thread, and almost every other person was being a jerk. Just don't bring that crap up again, Inocudom.


I hope I am excluded :-o

Re: Minetest Using Too Much CPU Time For Itself

PostPosted: Wed Dec 03, 2014 03:25
by Inocudom
Zeno wrote:
hoodedice wrote:Please. I just went through that thread, and almost every other person was being a jerk. Just don't bring that crap up again, Inocudom.


I hope I am excluded :-o

You are excluded, Zeno. In fact, you are seeking to improve Minetest's performance, so you are setting a good example.

Re: Minetest Using Too Much CPU Time For Itself

PostPosted: Wed Dec 03, 2014 04:48
by philipbenr
And everybody here is being offtopic, starting from the end of this post: viewtopic.php?f=6&t=10651&view=unread#p163163

Ontopic: What exactly is the problem with Minetest eating up the CPU? Is there a specific reason why the load be shifted to the GPU to even things out? I have a really nice GPU in my laptop, but the CPU isn't exactly the best in the market...

Re: Minetest Using Too Much CPU Time For Itself

PostPosted: Wed Dec 03, 2014 09:05
by rubenwardy
It is as simple as it wasn't designed to utilize the GPU fully. IIRC, using the GPU requires special scripts to be sent over which are executed heavily in parallel. It is much harder to write these scripts effectively compared to c++ - syncronising world state with c++, etc. (And you would need to have CPU equivalents for when the GPU isn't that good).

I think a good use of the GPU would be lighting - although I could imagine a problem if the algorithm needs database access. That's currently done on the CPU.

rubenwardy wrote:You got mocked and shunned because you didn't give any data to begin with, just expected us to read your mind.


Just to clarify: To begin with you didn't give any information that was useful, but you did later expand upon it. The original mocking and shunning was because of that, it was then built upon by other people, for no real reason.

Re: Minetest Using Too Much CPU Time For Itself

PostPosted: Wed Dec 03, 2014 16:27
by Don
rubenwardy wrote:
rubenwardy wrote:You got mocked and shunned because you didn't give any data to begin with, just expected us to read your mind.


Just to clarify: To begin with you didn't give any information that was useful, but you did later expand upon it. The original mocking and shunning was because of that, it was then built upon by other people, for no real reason.

Just because Inocudom did not give enough info at first should not be an excuse for insults. Asking for more info is fine but insulting will only drive people away. A community works together to solve problems. I find that most people are great and try to improve Minetest. I think people should try to keep insults out of the conversations and deal with the issues.
Also, so many people help improve the game with little thanks. I would like to thank everyone for all your hard work.

Re: Minetest Using Too Much CPU Time For Itself

PostPosted: Wed Dec 03, 2014 18:55
by .Luke
I agree the immaturity was completely unnecessary. All I can do is reiterate that communities are built on building each other up, not tearing one another down with insults and condescension. I see it the worst on social media, however; web forums like these have much higher standards than Facebook pages.

rubenwardy wrote:t is as simple as it wasn't designed to utilize the GPU fully. IIRC, using the GPU requires special scripts to be sent over which are executed heavily in parallel. It is much harder to write these scripts effectively compared to c++ - syncronising world state with c++, etc. (And you would need to have CPU equivalents for when the GPU isn't that good).

I think a good use of the GPU would be lighting - although I could imagine a problem if the algorithm needs database access. That's currently done on the CPU.


Even the lighting is done in the CPU? That explains a lot of Minetest's performance issues for me. I can get to game to play reliably, but it runs any poor laptop too hot to play for extended hours. At least with a beefy desktop rig, that's not as much of an issue.

Re: Minetest Using Too Much CPU Time For Itself

PostPosted: Wed Dec 03, 2014 20:01
by Don
Someone had mentioned that it might be the and quad core that's causing an issue. I run my server on a dual core without this issue. My laptop is the and quad and I have the problem.
The ram usage slowly creeps up. The temp goes up at least 10 degrees higher then normal. Once I shut down minetest the ram and temp drop.

Re: Minetest Using Too Much CPU Time For Itself

PostPosted: Thu Dec 11, 2014 03:14
by Don
I compiled the latest minetest-dev today. Was on my server and the ram got eaten up fast. Within 15 minutes of playing the ram went to 96%. The cpu stayed low and the temp was fine.

This is after playing for 15 minutes
Image

This is after I shut down minetest
Image

Re: Minetest Using Too Much CPU Time For Itself

PostPosted: Thu Dec 11, 2014 17:47
by Krock
Don wrote:I compiled the latest minetest-dev today. Was on my server and the ram got eaten up fast. Within 15 minutes of playing the ram went to 96%. The cpu stayed low and the temp was fine.

<snip>

Issue on github: https://github.com/minetest/minetest/issues/1880
I assume, it's a problem In this commit

Re: Minetest Using Too Much CPU Time For Itself

PostPosted: Thu Dec 11, 2014 18:08
by Don
Krock wrote:
Don wrote:I compiled the latest minetest-dev today. Was on my server and the ram got eaten up fast. Within 15 minutes of playing the ram went to 96%. The cpu stayed low and the temp was fine.

<snip>

Issue on github: https://github.com/minetest/minetest/issues/1880
I assume, it's a problem In this commit

Thanks. I added a comment there.

Re: Minetest Using Too Much CPU Time For Itself

PostPosted: Fri Dec 12, 2014 17:34
by Zeno
Krock wrote:I assume, it's a problem In this commit


No, that commit is not the culprit.

Edit: I will elaborate more. In that commit, do you see anywhere where memory is allocated? No? Well...