User talk:Bwbaugh

From Robowiki
Revision as of 17:31, 8 June 2011 by Miked0801 (talk | contribs) (Wow!!!)
Jump to navigation Jump to search


Question: Number of Client Instances

If I have computers that are multicore (some dual some quad), is there a way to safely run multiple instances of the RoboRumble client without causing skipped turns? Would I need to set the affinity of each instance to separate CPUs? I'm a bit new to this, and my parallel computing class doesn't start until the Fall. =) --bwbaugh 10:05, 8 June 2011 (UTC)

Welcome to the wiki, glad you are contributing to the rumble =) If you're worried about causing skipped turns first open up robocode and reset the CPU constant, then close robocode and open up the config/ file with notepad. Manually increase the CPU constant there to something you feel would account for anything like cache thrashing, possible external logins etc (I'd say just double it...) and save the file. Make sure you run each instance of roborumble from a different install, otherwise there will be issues with all of them saving to or uploading from the same file concurrently. Hope this helps! --Skilgannon 10:28, 8 June 2011 (UTC)

Personally, in addition to boosting the CPU constant, I prefer to run one fewer robocode instance than the number of CPUs on the system. This is because robocode seems to use some processor power outside it's handling it a separate thread than the robots run in (perhaps the Java GC? Perhaps part of the robocode engine itself? I'm not sure). About setting affinity, I doubt it would make much difference. Robocode is already alternating between running each robot, which I'd expect to limit how long-lived things are in the cpu cache, which I'd expect to mean that affinity probably wouldn't help much. That's just a guess though, it's not like I've tested. --Rednaxela 13:57, 8 June 2011 (UTC)

Agree with everything these guys said. About the affinity, I think this may depend on OS. I know on Mac, and I think on Linux, it will just work running one instance per core. I recall some people on Windows (XP days?) having to set affinity. FYI, RoboResearch is a great tool to leverage multiple cores for development. And yes, welcome and great to see you already contributing to the rumble. :-) Good luck! --Voidious 14:33, 8 June 2011 (UTC)

I personally used to run two RoboRumble clients (1v1 and melee) on Dual Core machine (Core 2 Duo P8400 2.26GHz) with about 1.1x increased cpu constants without trouble (I've checked the result on the server). I have also run two RoboRumble clients (1v1 and melee) on my Core 2 Quad 2.4GHz server without increased cpu constants without any trouble too. (but my server do esnot do anything other than consuming power when not explicitly used, it host my class' online judge system) --Nat Pavasant 14:40, 8 June 2011 (UTC)

Thank you all for the replies and information! I went ahead and configured 40 of my workstations to run 2 instances of RoboRumble each. Unfortunately, I noticed that after processing the battles, the upload process was much slower than it was during the past two days. In addition, the web interface for the rumble server was very slow to respond. So, it appears that the rumble server can't accept that many connections / uploads at once. I therefore reduced the number of stations running from 40 to 22, still running 2 instances each, and may reduce it further if it still seems to be overloading the rumble server. I wonder if there is a way to scale up the server to accept more simultaneous uploads... --bwbaugh 15:20, 8 June 2011 (UTC)

Holy cow. In one or two nights, you've managed to contribute more power than just about everyone one else this year. Wow and thanks! --Miked0801 15:31, 8 June 2011 (UTC)