Author |
Topic: Usage of 2, 4, 8 cores? (Read 6689 times) |
|
99of9
Forum Guru
Gnobby's creator (player #314)
Gender:
Posts: 1413
|
|
Re: Usage of 2, 4, 8 cores?
« Reply #30 on: Dec 15th, 2008, 9:48pm » |
Quote Modify
|
on Dec 15th, 2008, 9:09pm, omar wrote:Congratulations on paralleling GnoBot. I am anxious to see how it does against Bomb2005. What's the specs of the machine are you running it on locally? |
| Thanks, I'm also keen to see how it stacks up. When I run games online, I only run on a single core, 32bit, laptop (1.7GHz). So we won't see the effects of parallelization until the tourney. I've been testing the parallelization on a 64 bit, dual core desktop, (2.4 GHz), but I can't use this one on the network for arimaa. Obviously they're quite different to one another, even without parallel the desktop runs about twice as fast as the laptop. With parallel, I can currently get an additional speedup of around 1.38 on average (now using Young Brothers Wait). Quote:This years system will most likely also be a Intel Core 2 Duo, but faster clock speed than last year. |
| That would be unfortunate, I had assumed a quad core was very likely (which is why I focussed on parallelizing this year). In Australia all the suppliers I use are offering complete general purpose systems with Core 2 Quad for under USD $1000, some up to 2.5GHz. In fact they used to be under AUD $1000, but our dollar has since taken a hammering!
|
« Last Edit: Dec 15th, 2008, 9:51pm by 99of9 » |
IP Logged |
|
|
|
Fritzlein
Forum Guru
Arimaa player #706
Gender:
Posts: 5928
|
|
Re: Usage of 2, 4, 8 cores?
« Reply #31 on: Dec 16th, 2008, 7:24am » |
Quote Modify
|
Assuming a gain of 70 Elo points for a twofold speedup, and assuming the gain is log-linear, you should get 33 Elo points for a speedup factor of 1.38. In a tight race everything helps! I wish it were a quad core this year, though. That would maximize the inactive developer penalty.
|
|
IP Logged |
|
|
|
Janzert
Forum Guru
Arimaa player #247
Gender:
Posts: 1016
|
|
Re: Usage of 2, 4, 8 cores?
« Reply #33 on: Dec 16th, 2008, 11:11am » |
Quote Modify
|
Plenty of single core machines are still sold and I'll be quite surprised if they aren't still around next year. My perspective is that while the top end is continually accelerating its rate of change the low end moves much slower. The extreme example being embedded processors where an 8bit processor isn't that uncommon even now. Also I'm fairly sure hosting companies generally lag a bit behind in the cost for renting a dedicated server versus the comparable price to buy it.
|
|
IP Logged |
|
|
|
omar
Forum Guru
Arimaa player #2
Gender:
Posts: 1003
|
|
Re: Usage of 2, 4, 8 cores?
« Reply #34 on: Dec 21st, 2008, 5:14pm » |
Quote Modify
|
Thanks for that link JDB; I haven't bought a desktop system in a while so I had no idea they were getting that low in price. For the bot tournament and challenge match I rent two dedicated servers for about $100 USD per month each (one for 3 months and another for 1 month). As Janzert mentioned hosting companies charge more for renting a dedicated server versus the comparable price to buy it. I think part of the extra cost is because they also supply the network connection and uninterpretable power as well as warranty in case of hardware failures. But I am sure by next year the quad cores will fall in this range. However, even if price were not a consideration, I would prefer to see the improvements in the bots coming from better evaluations rather than better use of hardware. GnoBot will certainly have an advantage this year over bots that are not multiprocessor ready. If it performs really well the other developers will not be able to ignore paralleling their bots. I hope after a year or two all the bots will be multiprocessor ready and the advantage one bot has over another will be due to a better evaluation or other algorithmic improvement.
|
|
IP Logged |
|
|
|
99of9
Forum Guru
Gnobby's creator (player #314)
Gender:
Posts: 1413
|
|
Re: Usage of 2, 4, 8 cores?
« Reply #35 on: Jan 6th, 2009, 10:36pm » |
Quote Modify
|
on Dec 15th, 2008, 9:48pm, 99of9 wrote:With parallel, I can currently get an additional speedup of around 1.38 on average (now using Young Brothers Wait). |
| On my new test set (where most positions are tested at around blitz speed), I get a speedup due to parallelization of 1.77.
|
|
IP Logged |
|
|
|
Fritzlein
Forum Guru
Arimaa player #706
Gender:
Posts: 5928
|
|
Re: Usage of 2, 4, 8 cores?
« Reply #36 on: Jan 7th, 2009, 8:00am » |
Quote Modify
|
Sweet.
|
|
IP Logged |
|
|
|
tize
Forum Guru
Arimaa player #3121
Gender:
Posts: 118
|
|
Re: Usage of 2, 4, 8 cores?
« Reply #37 on: Jan 7th, 2009, 8:02am » |
Quote Modify
|
Congrats on the speedup 99of9! 1.77, you're at 85% efficiency now. The new parallel gnobot will almost play blitz games as strong as the serial play fast games.
|
|
IP Logged |
|
|
|
Janzert
Forum Guru
Arimaa player #247
Gender:
Posts: 1016
|
|
Re: Usage of 2, 4, 8 cores?
« Reply #39 on: Jan 7th, 2009, 8:21pm » |
Quote Modify
|
I've considered using EC2 for engine testing, although I have yet to do so. But I'm not sure it would work out well for the CC. My understanding is that EC2 is using virtualized servers (Xen specifically). So while the overall effect should be fairly small you could still be effected by other instances running on the same physical hardware you are, also there's no guarantee that two separate instances are actually on identical hardware. Janzert
|
|
IP Logged |
|
|
|
Paranoid
Forum Newbie
Arimaa player #3815
Gender:
Posts: 4
|
|
Re: Usage of 2, 4, 8 cores?
« Reply #40 on: Jan 7th, 2009, 8:39pm » |
Quote Modify
|
Since EC2 allocates whole CPUs to your instance (except for the smallest instance type) and running bots is mostly about CPU load, I am guessing the performance will be quite stable. (and if you use the largest instance, presumably you would get most, if not all the resources of the physical machine) Amazon does specify that all the instances should be with a similar spec (2.5 compute units/core), and you can always check. Of course, that will not be a problem if you run all bots on one instance.
|
|
IP Logged |
|
|
|
99of9
Forum Guru
Gnobby's creator (player #314)
Gender:
Posts: 1413
|
|
Re: Usage of 2, 4, 8 cores?
« Reply #41 on: Jan 15th, 2009, 7:14pm » |
Quote Modify
|
I've just discovered a problem that has been plaguing gnobby since I parallelized (causing timeouts against woh and clueless for example). I think it might be relevant to anyone else wanting to parallelize: - When multithreaded applications run, each thread gets given a limited stack size.
- Recursive calls (like tree search calls in alpha beta) mean that the same function can be on the stack many times (the deeper the program is searching, the more it fills the stack).
- If you have a few local arrays of information related to the (up to 128) branching moves from each position, in each search call, you can end up exceeding the default stack size for a thread (on my system it was 8Mb).
- You can change the stack size limit in the terminal you run your bot from ("ulimit -s 100000" gives 100000 bytes). However I can't see a way to do this within the software, or make this increase permanent.
I'm sure some of you knew all this, and will have a trivial solution for me. Especially, how do you recommend I make sure that Gnobot has a sufficient stack size in the CC, since I won't be personally opening the terminal window?
|
« Last Edit: Jan 15th, 2009, 7:17pm by 99of9 » |
IP Logged |
|
|
|
99of9
Forum Guru
Gnobby's creator (player #314)
Gender:
Posts: 1413
|
|
Re: Usage of 2, 4, 8 cores?
« Reply #43 on: Jan 17th, 2009, 5:10am » |
Quote Modify
|
Janzert also pointed to posix. Unfortunately I'm using OMP, is there a nice method for that?
|
|
IP Logged |
|
|
|
Paranoid
Forum Newbie
Arimaa player #3815
Gender:
Posts: 4
|
|
Re: Usage of 2, 4, 8 cores?
« Reply #44 on: Jan 18th, 2009, 9:44pm » |
Quote Modify
|
Seems like the only option is an environment variable: http://gcc.gnu.org/onlinedocs/gcc-4.3.2/libgomp/GOMP_005fSTACKSIZE.html# GOMP_005fSTACKSIZE Maybe it's best to use a wrapper script then as an entry point, instead of the main executable: Code: #!/bin/sh ulimit -s 10000000 export GOMP_STACKSIZE=8000 exec ./main_executable "$@" |
| (the exec replaces the wrapper process with the main executable and the "$@" forwards command-line arguments)
|
|
IP Logged |
|
|
|
|