Electronic warfare

Discussion of chess software programming and technical issues.

Moderator: Ras

User avatar
hgm
Posts: 28353
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Electronic warfare

Post by hgm »

I thought of a new usage of ponder time on machines like the Core 2 Duo, where L2 is shared by the two cores. If you play a ponder-on tournament on such a machine, the opponent is likely to use the other core for thinking about his move while you are pondering. If both engines make a heavy demand on L2 (as many bitboard engines do, nowadays), this might cause significant interference between the engines, slowing each other down quite a lot.

Elaborating on this fact, it might actually pay off more to spend your ponder time by preventing that the opponent can get any useful work done, rather than trying to use the time constructively. After all, you might have a ponder miss, so you would be wasting your time on constructive thinking quite often. If you can slow down your opponent by more than a factor 2, you will benifit more!

So I invented 'bugger mode', where the engine attempts to monopolize L2, by cycling through it at maximum possible rate. This should constanly flush the opponent's data from L2, making him entirely dependent on DRAM access for the kernel of his engine. You could even improve on this by timing which accesses give you frequent L2 misses, presumably because the cache liine collides with data the opponent uses frequently, flushing your data out of L2, and then concentrate on flushing data there. 8-)

To switch off this mode (e.g. on CPUs without shared L2), you can use the command 'bugger off'. :lol: :lol: :lol:
Uri Blass
Posts: 10798
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: Electronic warfare

Post by Uri Blass »

hgm wrote:I thought of a new usage of ponder time on machines like the Core 2 Duo, where L2 is shared by the two cores. If you play a ponder-on tournament on such a machine, the opponent is likely to use the other core for thinking about his move while you are pondering. If both engines make a heavy demand on L2 (as many bitboard engines do, nowadays), this might cause significant interference between the engines, slowing each other down quite a lot.

Elaborating on this fact, it might actually pay off more to spend your ponder time by preventing that the opponent can get any useful work done, rather than trying to use the time constructively. After all, you might have a ponder miss, so you would be wasting your time on constructive thinking quite often. If you can slow down your opponent by more than a factor 2, you will benifit more!

So I invented 'bugger mode', where the engine attempts to monopolize L2, by cycling through it at maximum possible rate. This should constanly flush the opponent's data from L2, making him entirely dependent on DRAM access for the kernel of his engine. You could even improve on this by timing which accesses give you frequent L2 misses, presumably because the cache liine collides with data the opponent uses frequently, flushing your data out of L2, and then concentrate on flushing data there. 8-)

To switch off this mode (e.g. on CPUs without shared L2), you can use the command 'bugger off'. :lol: :lol: :lol:
I do not understand much about hardware but I think that the solution to the problem is not to play ponder-on tournament on Core 2 Duo, where L2 is shared by the two cores.

Uri
wgarvin
Posts: 838
Joined: Thu Jul 05, 2007 5:03 pm
Location: British Columbia, Canada

Re: Electronic warfare

Post by wgarvin »

hgm wrote:To switch off this mode (e.g. on CPUs without shared L2), you can use the command 'bugger off'. :lol: :lol: :lol:
That is excellent.

I agree with Uri though, I've always thought running two engines on the same machine was a bad idea because they compete for resources (even without pondering--virtual memory swapping for example).