PDA

View Full Version : Running Two Apps



excaliber
12-02-2003, 04:04 PM
I've been doing some limited testing on running multiple apps of CB. Here are the findings that I came across.

As we know, CB only works when it is it's turn to move. This means theres no activity, then a flurry of processing to get moves in. If it takes to long for the move to be finished, its not submitted (one by someone else is taken instead), and no credit is given (nothing in the stats).

With that in mind, I started toying with the idea of having multiple clients. I seem to get a production boost by using two apps simultaneously. My theory this depends on the speed of your computer.

Since the CB client doesnt ponder its next moves, all moves are sent out at the beginning of its turn. This means that by running multiple clients, you have a better chance of getting one of those moves to process. But this is a double edged sword, and depends on your speed. More clients means more chances to get a turn. But if too many of your clients get a turn, they all fight for CPU time (Mine either share the time evenly, or each has a go at it with full power for several seconds before handing it off). In the end, if you run too many clients, there is too little power to process all the requests in a timely matter, and it is highly likely that none of the turns will be accepted (although you get a high number of completed. Too bad it doesnt count for stats)

So, in a nutshell, I think that it provides a boost towards production. Note, its not a linear boost. Running 2 apps does not provide twice the output. The two clients still fight for time, but its more likely that both will finish than neither, and much more likely that at least one will get a turn.

Heres where computing power will help. My comp is a 1.6 Athlon 2000+. Im guessing that a faster computer could handle maybe three, if not four clients. Depends.

As to memory. I initially had each client using the max amount of memory (128 Mb). Running two clients and DF, i quickly was running low on memory (I have 512 Mb, but run lots of other background apps). Unlike DF, which only occasionally uses all its alloted memory, CB will take it in a heartbeat, and does not reliquish it (whether its using it or not).

I searched on the forums about memory usage. Its used to store the move hash table (or something similar). Apparently, using 16mb and 128mb doesnt offer much performance difference. It only helps when the move to compute takes along time (lots of calculations needed), so it can store the moves in the hash table. In fact, it was mentioned a few times that using high memory can slow it down on the shorter moves, because it re-inits the memory each move, regardless of size.

Well, thats my short rant. Try the multiple applications and let me know how it goes. Im going to give this a run for a day or so and see how it affects my stats.

PCZ
12-02-2003, 04:19 PM
Excalibur
You recieve credit for all work done.

A job does not have to be accepted in order to score.
You recieve credit for all packets processed.

excaliber
12-02-2003, 04:32 PM
Really? Where's it say that? I've saw several times on the forum that you only get credit for whats submitted.

If thats the case, you could theoretically run as many instances as you wanted. You could turn CB into a full-time DC project, instead of a side project (seeing as the clients would continue working even though it doesnt matter). The instances would just queue themselves up for processing time.

Would take a big bite out of DF though.

magnav0x
12-02-2003, 04:44 PM
PCZ is correct, you will get credit in the stats for those that are "not accepted". Basicaly it means someone calculated and returned the result before you could, but you still get credit in the stats for crunching it.

excaliber
12-02-2003, 05:13 PM
Heh. Well, you can completely disregard all of the above :)

FoBoT
12-02-2003, 06:07 PM
i have run 10+ instances at once on high RAM boxen, it seemed to increase my production (all at 16MB, i haven't seen any advantage to running at higher RAM settings)

cygnussphere
12-02-2003, 08:29 PM
Originally posted by excaliber
Really? Where's it say that? I've saw several times on the forum that you only get credit for whats submitted.

If thats the case, you could theoretically run as many instances as you wanted. You could turn CB into a full-time DC project, instead of a side project (seeing as the clients would continue working even though it doesnt matter). The instances would just queue themselves up for processing time.

Would take a big bite out of DF though.

errrr.... my bad... I had that same understanding:bang: I have no idea how I came to that conclusion my apologies if I perpetuated it in the forums:blush:

I'm going to ask CJ if the newest client that will be used for the WRA. will be offered in a service conf that will allow multiple instances and put this to the test myself.

:tempted:

:evil:

:cheers:

PCZ
12-03-2003, 03:01 AM
I agree that there may be an advantage in running multiple instances.

I need to do an experiment.
Set up 2 near identical PC's one with a single instance and the other with multiple instances.

I will monitor the output with CBMOC.

excaliber
12-03-2003, 06:44 AM
Sounds good, let me know how it goes.

I've been running three instances my self, and it looks like the throughput is raised considerably. A lowe percentage are returned, but more are completed.

pfb
12-03-2003, 06:55 AM
testing this theory out - by adding an extra client per client already running (so I've gone from 5 to 10) has given a ~50% increase in the stats but I am noticing a slight increase in the %age of 'jobs not submitted' (around 5%)...

I'd probably only use this method for either boosting the stats if we need it or for the WR attempt to increase the possible clients...

I'm still finding that Win2k is the best OS for the client, XP is ok and the Linux one is poor (the Win2k/XP2200+ is turning out 60k nodes more a second than Mandrake 9.2/Barton 2800+). It seems the Linux client waits longer for work than any of the other clients - which is odd.

(all figures gained via CBMOC).

http://wibble.bounceme.net/misc/cbmoc.png

turnip = Mandrake 9.2/Barton 2800+
lettuce = Win XP Home/P4 'B' 2.6
radish = Win2k/XP2200+
carrot = Wind XP Pro/2xMP2600+

Welnic
12-03-2003, 10:37 AM
I don't think that running more clients has any affect on the world record attempt. All of the stats that I have seen are about the number of computers. Most of the machines that I have running chessbrain have dual procs but they each just show up as one machine.

Having noticed your increased production I was thinking of "testing" running more clients also. :D

PCZ
12-03-2003, 10:54 AM
It certainly increases your output.
Very promising results so far

pfb
12-03-2003, 10:58 AM
Originally posted by Welnic
I don't think that running more clients has any affect on the world record attempt. All of the stats that I have seen are about the number of computers. Most of the machines that I have running chessbrain have dual procs but they each just show up as one machine.

Having noticed your increased production I was thinking of "testing" running more clients also. :D

I was thinking more along the lines that the more clients running the faster ChessBrain would 'think' but then looking at how it works it may not be that effective for this World Record - maybe when 'pondering' comes into it then it may be useful...

I wondered if you would notice my increased production ;) - shame the hourly stats don't seem too good at the moment as another negative production glitch has occurred...

Welnic
12-03-2003, 01:41 PM
The 3 hours before increasing the clients I averaged -.50 per hour, the three hours after I averaged .69. Thats quite an improvement! :rotfl:

excaliber
12-03-2003, 03:25 PM
Lol. Im now running 10 instances of the CB client, all CLI as pseudo-services (via firedaemon).

It does appear to increase production drastically. The computer:submitted ration is alot worse, but it doesnt matter much. And it doesnt appear to take tooooo big of a bite out of DF anyway, since the processing comes in short bursts.

I'll let you know how my mini expierement goes as well.

Jay
12-04-2003, 01:12 PM
So how do I get winXP to run the cb service more than once?

GHOST
12-04-2003, 01:50 PM
I removed cb from my start up folder. Then go to cbpeernode folder and doubleclick client file as many times as you want clients. First in the configure file I set memory usage to 16megs.

Welnic
12-04-2003, 02:10 PM
Originally posted by Jay
So how do I get winXP to run the cb service more than once?

I use FireDaemon to run distributed clients that don't have their own service install.
http://www.firedaemon.com/
There is a lite version but it can only run one service, the full version is $25. There is at least one other program that does something like this but this is the one that I use.

pfb
12-04-2003, 02:37 PM
I'm using the info I got from Anandtech (http://forums.anandtech.com/messageview.cfm?catid=39&threadid=1164252&forumid=1) to run as a service on Windows....

Jay
12-05-2003, 12:25 PM
Cheers folks :cheers:

pfb, seen your reply at Lethal Hardware, so I'll give that a shot when I get chance