Minetest Using Too Much CPU Time For Itself

Locked
User avatar
.Luke
Member
Posts: 14
Joined: Wed Jan 09, 2013 22:12
Location: United States
Contact:

Minetest Using Too Much CPU Time For Itself

by .Luke » Post

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.

User avatar
Calinou
Moderator
Posts: 3169
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou
Location: Troyes, France
Contact:

Re: Minetest Using Too Much CPU Time For Itself

by Calinou » Post

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.

User avatar
Krock
Developer
Posts: 4650
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: Minetest Using Too Much CPU Time For Itself

by Krock » Post

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.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
Inocudom
Member
Posts: 3121
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

Re: Minetest Using Too Much CPU Time For Itself

by Inocudom » Post

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

User avatar
Calinou
Moderator
Posts: 3169
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou
Location: Troyes, France
Contact:

Re: Minetest Using Too Much CPU Time For Itself

by Calinou » Post

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.

User avatar
rubenwardy
Moderator
Posts: 6978
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

Re: Minetest Using Too Much CPU Time For Itself

by rubenwardy » Post

He may have meant 1.8.1 features, but I don't know what.
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
.Luke
Member
Posts: 14
Joined: Wed Jan 09, 2013 22:12
Location: United States
Contact:

Re: Minetest Using Too Much CPU Time For Itself

by .Luke » Post

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:
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.

User avatar
rubenwardy
Moderator
Posts: 6978
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

Re: Minetest Using Too Much CPU Time For Itself

by rubenwardy » Post

You got mocked and shunned because you didn't give any data to begin with, just expected us to read your mind.
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
hoodedice
Member
Posts: 1374
Joined: Sat Jul 06, 2013 06:33
GitHub: hoodedice
IRC: hoodedice
In-game: hoodedice
Location: world
Contact:

Re: Minetest Using Too Much CPU Time For Itself

by hoodedice » Post

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.
7:42 PM - Bauglio: I think if you go to staples you could steal firmware from a fax machine that would run better than win10 does on any platform
7:42 PM - Bauglio: so fudge the stable build
7:43 PM - Bauglio: get the staple build

Zeno
Member
Posts: 140
Joined: Sun Jun 29, 2014 03:36
GitHub: Zeno-
Location: Australia

Re: Minetest Using Too Much CPU Time For Itself

by Zeno » Post

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

User avatar
Inocudom
Member
Posts: 3121
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

Re: Minetest Using Too Much CPU Time For Itself

by Inocudom » Post

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.

User avatar
philipbenr
Member
Posts: 1897
Joined: Fri Jun 14, 2013 01:56
GitHub: philipbenr
IRC: philipbenr
In-game: robinspi
Location: United States

Re: Minetest Using Too Much CPU Time For Itself

by philipbenr » Post

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...

User avatar
rubenwardy
Moderator
Posts: 6978
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

Re: Minetest Using Too Much CPU Time For Itself

by rubenwardy » Post

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.
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
Don
Member
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: Minetest Using Too Much CPU Time For Itself

by Don » Post

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.
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here

User avatar
.Luke
Member
Posts: 14
Joined: Wed Jan 09, 2013 22:12
Location: United States
Contact:

Re: Minetest Using Too Much CPU Time For Itself

by .Luke » Post

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.

User avatar
Don
Member
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: Minetest Using Too Much CPU Time For Itself

by Don » Post

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.
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here

User avatar
Don
Member
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: Minetest Using Too Much CPU Time For Itself

by Don » Post

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
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here

User avatar
Krock
Developer
Posts: 4650
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: Minetest Using Too Much CPU Time For Itself

by Krock » Post

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
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
Don
Member
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: Minetest Using Too Much CPU Time For Itself

by Don » Post

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.
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here

Zeno
Member
Posts: 140
Joined: Sun Jun 29, 2014 03:36
GitHub: Zeno-
Location: Australia

Re: Minetest Using Too Much CPU Time For Itself

by Zeno » Post

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...

Locked

Who is online

Users browsing this forum: No registered users and 14 guests