Support of multiple cores
Support of multiple cores
I have a multi-core server. But minetestserver loads only one core.
Minetestserver does not support multi-core system?
Minetestserver does not support multi-core system?
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.
[BitChute: https://www.bitchute.com/channel/fCcBQxrYQjNX/] [Rumble: https://rumble.com/user/HPoorHMagentaHChildH]
- BrandonReese
- Member
- Posts: 839
- Joined: Wed Sep 12, 2012 00:44
- GitHub: bremaweb
- IRC: BrandonReese
- In-game: BrandonReese
- Location: USA
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...)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.
My Twitch Channel - https://www.twitch.tv/brandonreese81/profile
That is a shame. That means that getting a better CPU won't always help you out.
[BitChute: https://www.bitchute.com/channel/fCcBQxrYQjNX/] [Rumble: https://rumble.com/user/HPoorHMagentaHChildH]
- PilzAdam
- Member
- Posts: 4026
- Joined: Fri Jul 20, 2012 16:19
- GitHub: PilzAdam
- IRC: PilzAdam
- Location: Germany
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:
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 value you see is here the sum of all of your cores.vktRus wrote:
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%.
He is some information that I found on the internet about CPUs.
http://us.yhs4.search.yahoo.com/r/_ylt= ... ssing_unit
http://www.youtube.com/watch?feature=pl ... nsEy4VlwCY
http://www.youtube.com/watch?v=VwIsFXnY ... detailpage
http://www.youtube.com/watch?feature=pl ... NN_tTXABUA
http://us.yhs4.search.yahoo.com/r/_ylt= ... ssing_unit
http://www.youtube.com/watch?feature=pl ... nsEy4VlwCY
http://www.youtube.com/watch?v=VwIsFXnY ... detailpage
http://www.youtube.com/watch?feature=pl ... NN_tTXABUA
[BitChute: https://www.bitchute.com/channel/fCcBQxrYQjNX/] [Rumble: https://rumble.com/user/HPoorHMagentaHChildH]
-
- Moderator
- Posts: 4094
- Joined: Wed Aug 24, 2011 09:44
- GitHub: sfan5
- IRC: sfan5
- Location: Germany
The second setting if only for the clientPilzAdam 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
-
- Moderator
- Posts: 4094
- Joined: Wed Aug 24, 2011 09:44
- GitHub: sfan5
- IRC: sfan5
- Location: Germany
You don't need IPC for threads, since threads share their memory with the main processBrandonReese wrote: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...)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.
Code: Select all
# This specifies the number of threads used for world generation
num_emerge_threads = 3
Last edited by vktRus on Mon May 13, 2013 15:50, edited 1 time in total.
- rubenwardy
- Moderator
- Posts: 6972
- Joined: Tue Jun 12, 2012 18:11
- GitHub: rubenwardy
- IRC: rubenwardy
- In-game: rubenwardy
- Location: Bristol, United Kingdom
- Contact:
Minetest IS multithreadedBrandonReese wrote: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...)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.
Re: Support of multiple cores
all versions of minetest are multithreaded? or special compile? cuz i would love me some multithread if its not by default :)
- Hybrid Dog
- Member
- Posts: 2828
- Joined: Thu Nov 01, 2012 12:46
- GitHub: HybridDog
Re: Support of multiple cores
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 stonetbillion wrote:all versions of minetest are multithreaded? or special compile? cuz i would love me some multithread if its not by default :)
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.
Re: Support of multiple cores
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.
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.
Re: Support of multiple cores
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.
Who is online
Users browsing this forum: No registered users and 6 guests