Support of multiple cores

Post Reply
User avatar
vktRus
Member
Posts: 67
Joined: Wed May 01, 2013 07:23

Support of multiple cores

by vktRus » Post

I have a multi-core server. But minetestserver loads only one core.
Minetestserver does not support multi-core system?

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

by Calinou » Post

Not really, Minetest rarely uses multiple cores. However, it's still a good thing to have multiple cores (at least 2), so that background tasks do not slow the Minetest server down.

User avatar
vktRus
Member
Posts: 67
Joined: Wed May 01, 2013 07:23

by vktRus » Post

I have 8 cores (HP :). But the server load at a time only one core. Sometimes >100%. This occurs when a player goes to the new territories.

User avatar
12Me21
Member
Posts: 873
Joined: Tue Mar 05, 2013 00:36
GitHub: 12Me21
Location: (Ignore all of my posts before 2018)

by 12Me21 » Post

vktRus wrote:I have 8 cores (HP :). But the server load at a time only one core. Sometimes >100%. This occurs when a player goes to the new territories.
It's impossible to be over 100%
Shoutouts to Simpleflips

User avatar
vktRus
Member
Posts: 67
Joined: Wed May 01, 2013 07:23

by vktRus » Post

:)

Image

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

by Inocudom » Post

Does this mean that Minetest only uses one core of a quad-core CPU? I never knew there was anything to keep a program from using more than one core of a CPU that has more than one core.
You can now find my videos at BitChute: https://www.bitchute.com/channel/some_cheeky_jinuskian/

User avatar
12Me21
Member
Posts: 873
Joined: Tue Mar 05, 2013 00:36
GitHub: 12Me21
Location: (Ignore all of my posts before 2018)

by 12Me21 » Post

vktRus wrote::)

Image
weird...
Shoutouts to Simpleflips

User avatar
BrandonReese
Member
Posts: 839
Joined: Wed Sep 12, 2012 00:44
GitHub: bremaweb
IRC: BrandonReese
In-game: BrandonReese
Location: USA

by BrandonReese » Post

Inocudom wrote:Does this mean that Minetest only uses one core of a quad-core CPU? I never knew there was anything to keep a program from using more than one core of a CPU that has more than one core.
For a program to take advantage of multiple cores it has to be multi-threaded, otherwise all instructions for a program are executed on a single core. If minetest was multi threaded it would use mutliple cores but then things get complicated with interproccess communication and synchronization. (ie the mapgen thread has to talk to the thread that sends data to the users, etc...)

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

by Inocudom » Post

That is a shame. That means that getting a better CPU won't always help you out.
You can now find my videos at BitChute: https://www.bitchute.com/channel/some_cheeky_jinuskian/

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

This article from the dev wiki describes the usage of threads in Minetest: http://dev.minetest.net/Engine_structure#Threads
Note that you can change some etting in minetest.conf to use more threads:

Code: Select all

# This specifies the number of threads used for world generation
num_emerge_threads = 1
# And this how many threads are used to download media from a server that uses cURL
media_fetch_threads = 8

User avatar
vv221
Member
Posts: 42
Joined: Mon Mar 04, 2013 08:18
Location: France
Contact:

by vv221 » Post

vktRus wrote::)

Image
The value you see is here the sum of all of your cores.
It does mean the equivalent of 1.01 core is used, obviously from two cores. (probably 100% from the core running Minetest, and 0.01% from another core running background tasks)

12Me21 is right when he says it is impossible to use a core over 100%.

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

by Inocudom » Post

You can now find my videos at BitChute: https://www.bitchute.com/channel/some_cheeky_jinuskian/

User avatar
sfan5
Moderator
Posts: 3944
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5
Location: Germany

by sfan5 » Post

PilzAdam wrote:This article from the dev wiki describes the usage of threads in Minetest: http://dev.minetest.net/Engine_structure#Threads
Note that you can change some etting in minetest.conf to use more threads:

Code: Select all

# This specifies the number of threads used for world generation
num_emerge_threads = 1
# And this how many threads are used to download media from a server that uses cURL
media_fetch_threads = 8
The second setting if only for the client
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)

User avatar
sfan5
Moderator
Posts: 3944
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5
Location: Germany

by sfan5 » Post

BrandonReese wrote:
Inocudom wrote:Does this mean that Minetest only uses one core of a quad-core CPU? I never knew there was anything to keep a program from using more than one core of a CPU that has more than one core.
For a program to take advantage of multiple cores it has to be multi-threaded, otherwise all instructions for a program are executed on a single core. If minetest was multi threaded it would use mutliple cores but then things get complicated with interproccess communication and synchronization. (ie the mapgen thread has to talk to the thread that sends data to the users, etc...)
You don't need IPC for threads, since threads share their memory with the main process
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)

User avatar
vktRus
Member
Posts: 67
Joined: Wed May 01, 2013 07:23

by vktRus » Post

Code: Select all

# This specifies the number of threads used for world generation
num_emerge_threads = 3
Does not help. When generating new locations load only on one core 100%.
Last edited by vktRus on Mon May 13, 2013 15:50, edited 1 time in total.

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

by rubenwardy » Post

BrandonReese wrote:
Inocudom wrote:Does this mean that Minetest only uses one core of a quad-core CPU? I never knew there was anything to keep a program from using more than one core of a CPU that has more than one core.
For a program to take advantage of multiple cores it has to be multi-threaded, otherwise all instructions for a program are executed on a single core. If minetest was multi threaded it would use mutliple cores but then things get complicated with interproccess communication and synchronization. (ie the mapgen thread has to talk to the thread that sends data to the users, etc...)
Minetest IS multithreaded

User avatar
tbillion
Member
Posts: 190
Joined: Wed Apr 03, 2013 16:07
Location: 38381, US, TN, Toone
Contact:

Re: Support of multiple cores

by tbillion » Post

all versions of minetest are multithreaded? or special compile? cuz i would love me some multithread if its not by default :)

User avatar
Hybrid Dog
Member
Posts: 2775
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: Support of multiple cores

by Hybrid Dog » Post

tbillion wrote:all versions of minetest are multithreaded? or special compile? cuz i would love me some multithread if its not by default :)
the mods' thread is a single one, if you use more than one, it wouldn't be possible to e.g. override minetest.get_node directly in specific situations, e.g. exactly when minetest.set_node placed stone

l tried to make a scheduler mod. It maybe works for spawning lots of trees fairly at once:
https://github.com/HybridDog/function_delayer

l just tried the emerge threads setting, minetest used every cpu.

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

est31
Developer
Posts: 173
Joined: Mon Dec 29, 2014 01:49

Re: Support of multiple cores

by est31 » Post

Parts of minetest are multithreaded, parts aren't.

First of all, minetest uses irrlicht, which uses either directx or opengl. This means that communication with the graphics card is only possible in one thread. I know that directx has seen some changes recently, but irrlicht doesn't support them, and its a large project overall to retrofit multithreading. I highly doubt we will ever see multi threaded gfx card communication in irrlicht.

minetest itself _is_ multithreaded. It has multiple mapgen threads, and it has separate client and server threads. Yes, that's not alot, and there are limitations, like no real multithreading for lua mapgen. Still, you don't do everything in only one thread.

User avatar
tbillion
Member
Posts: 190
Joined: Wed Apr 03, 2013 16:07
Location: 38381, US, TN, Toone
Contact:

Re: Support of multiple cores

by tbillion » Post

lol some people talk worker threads others talk performance threads, as much as we wish it was this isnt a billion dollar corporation :) and we dont get paid to mod (well i dont :) so we shoudl be happy with what it is or go play on java, it will get better as time goes by.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests