Magarena melting my CPU memory
by ubeefx
Moderators: ubeefx, beholder, melvin, ShawnieBoy, Lodici, CCGHQ Admins
Magarena melting my CPU memory
by Senior Adrian » 07 Mar 2019, 01:05
Hi there community, someone recommended Magarena to me. I have one question. Why does it eats to almost 95% of my CPU memory? My PC fans go nuts when the AI is thinking. I have a fast PC with 16 gigs of ram. Does anybody have this issues? Is there a way to not put so much pressure on the CPU?
- Senior Adrian
- Posts: 6
- Joined: 07 Mar 2019, 00:58
- Has thanked: 3 times
- Been thanked: 0 time
Re: Magarena melting my CPU memory
by melvin » 07 Mar 2019, 03:51
By default, the AI uses all available CPU cores to perform its work. It is possible to manually set the maximum number of cores to use on the command line via editing Magarena.sh (only available on Linux and Mac).
The last line should be changed to the following to limit the AI to one CPU core (the change is to add "--threads 1")
The last line should be changed to the following to limit the AI to one CPU core (the change is to add "--threads 1")
- Code: Select all
exec java -Xms256M -Xmx512M -noverify -Dmagarena.dir=$magarena_dir -jar $magarena_jar --threads 1
-
melvin - AI Programmer
- Posts: 1062
- Joined: 21 Mar 2010, 12:26
- Location: Singapore
- Has thanked: 36 times
- Been thanked: 459 times
Re: Magarena melting my CPU memory
by Senior Adrian » 07 Mar 2019, 08:01
Hi Melvin, thanks for your answer. So...i see. Its because of the tree-branch AI. I just watched you speech on "GeekcampSG"
YouTube channel about the implementation process of the AI. Its amazing what did you achieve with it. Im using Windows 10 so i guess i cant change the number of cores. Can this over-processing AI brake down the CPU on long term?
YouTube channel about the implementation process of the AI. Its amazing what did you achieve with it. Im using Windows 10 so i guess i cant change the number of cores. Can this over-processing AI brake down the CPU on long term?
- Senior Adrian
- Posts: 6
- Joined: 07 Mar 2019, 00:58
- Has thanked: 3 times
- Been thanked: 0 time
Re: Magarena melting my CPU memory
by melvin » 07 Mar 2019, 10:30
Thanks for watching the talk, I hope it wasn't too technical.I just watched you speech on "GeekcampSG" YouTube channel about the implementation process of the AI. Its amazing what did you achieve with it.
Not as far as I know, unless you have modified your CPU somehow, say by overclocking it or your CPU fan is not working properly. Under normal operating conditions, the CPU is designed for all its cores to be operating at once.Can this over-processing AI brake down the CPU on long term?
-
melvin - AI Programmer
- Posts: 1062
- Joined: 21 Mar 2010, 12:26
- Location: Singapore
- Has thanked: 36 times
- Been thanked: 459 times
Re: Magarena melting my CPU memory
by Jessica » 11 Mar 2019, 22:21
I have a PC with 24 cores and I want to limit it to 12 cores but on windows. How do I do that?melvin wrote:By default, the AI uses all available CPU cores to perform its work. It is possible to manually set the maximum number of cores to use on the command line via editing Magarena.sh (only available on Linux and Mac).
The last line should be changed to the following to limit the AI to one CPU core (the change is to add "--threads 1")Note that using fewer CPU cores will reduce the AI's playing strength.
- Code: Select all
exec java -Xms256M -Xmx512M -noverify -Dmagarena.dir=$magarena_dir -jar $magarena_jar --threads 1
________________________________________
May the Forge be with you, young Planeswalker!
May the Forge be with you, young Planeswalker!
Re: Magarena melting my CPU memory
by melvin » 12 Mar 2019, 02:04
Not possible to set this on Windows as it doesn't use a start up script like Linux or Mac.
-
melvin - AI Programmer
- Posts: 1062
- Joined: 21 Mar 2010, 12:26
- Location: Singapore
- Has thanked: 36 times
- Been thanked: 459 times
Re: Magarena melting my CPU memory
by Jessica » 12 Mar 2019, 23:13
Also not possible by passing command line arguments to the jar file by using windows command prompt?melvin wrote:Not possible to set this on Windows as it doesn't use a start up script like Linux or Mac.
________________________________________
May the Forge be with you, young Planeswalker!
May the Forge be with you, young Planeswalker!
Re: Magarena melting my CPU memory
by melvin » 13 Mar 2019, 02:59
> Also not possible by passing command line arguments to the jar file by using windows command prompt?
That is possible though a bit tedious, the command would be
That is possible though a bit tedious, the command would be
- Code: Select all
java -Xms256M -Xmx512M -noverify -jar Magarena.jar --threads 12
-
melvin - AI Programmer
- Posts: 1062
- Joined: 21 Mar 2010, 12:26
- Location: Singapore
- Has thanked: 36 times
- Been thanked: 459 times
8 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 40 guests