Rybka Slowdown on with Large Hash

Programming Topics (Computer Chess) and technical aspects as test techniques, book building, program tuning etc

Moderator: Andres Valverde

Rybka Slowdown on with Large Hash

Postby Onno Garms » 07 Nov 2008, 20:10

I am experiencing extremely slow performance of Rybka 2.2n2 when the hash is large. With small hashes (e.g. 16 MB) Rybka runs at about 100 kn/s on one core of my AMD Athlon X2 4400+. When I set the hash to a large value (e.g. 256 MB) it runs below 10 kn/s and loses almost every game against engines in the field of second strongest engines.

Is that a known issue?

The problem occurs independent of the GUI used (I tested Shredder and command line). I'm running Rybka through wine on Linux. The problem does not occur on my Pentium computer (where I also run Rybka through wine on Linux) and the problem does not occur with any other engine.
User avatar
Onno Garms
 
Posts: 128
Joined: 17 Feb 2007, 11:17
Location: Bonn, Germany

Re: Rybka Slowdown on with Large Hash

Postby Teemu Pudas » 07 Nov 2008, 20:32

Is that a known issue?

No.

Have you tried other engines that keep their hash in shared memory? ZCT and Rybka are the only ones I know of.
Teemu Pudas
 
Posts: 124
Joined: 16 Apr 2007, 14:03

Re: Rybka Slowdown on with Large Hash

Postby Onno Garms » 07 Nov 2008, 21:45

Teemu Pudas wrote:Have you tried other engines that keep their hash in shared memory? ZCT and Rybka are the only ones I know of.


Shared between what? I use only one core on the CPU (i.e. one process), so what could share the memory?

Shared between CPU and graphics card? That could be an explanation because my AMD computer has poor onboard graphics with even poorer Linux support. I thought this would be completely irrelevant for chess engines. The Pentium has a graphics card with own memory.

In now found that SOS has the same problem (slowdown by a factor of 10). I had removed SOS from my testing suite because of occasional losses on time which I could not explain at that time. I did not think over why the score of SOS score fell from 20% to 0% because it was a candidate to remove from my tests anyway.

Engines that do not have this problem: Rybka 1.0 Beta, Shredder, Ruffian, Fruit, Toga, Strelka, Spike, Aristarch, Glaurung, SlowChess, Zappa Mexico, HIARCS, and last but not least my own engine. I never tried ZCT.
User avatar
Onno Garms
 
Posts: 128
Joined: 17 Feb 2007, 11:17
Location: Bonn, Germany

Re: Rybka Slowdown on with Large Hash

Postby Zach Wegner » 07 Nov 2008, 22:01

Onno Garms wrote:
Teemu Pudas wrote:Have you tried other engines that keep their hash in shared memory? ZCT and Rybka are the only ones I know of.


Shared between what? I use only one core on the CPU (i.e. one process), so what could share the memory?
Shared between multiple processes. When Rybka (as well as some other engines like ZCT, Deep Sjeng, Diep, and possibly SOS IIRC) play on multiple CPUs, they use processes rather than threads, and they must allocate the memory in a way that allows each process to see it. So even if you just have one processor, if you have the MP Rybka version that might be what is causing it. Try using the SP Rybka version. I gather that this only happens on windows? I don't really know exactly what's causing it, but shared memory would be my first guess.
User avatar
Zach Wegner
 
Posts: 182
Joined: 26 Sep 2004, 22:02
Location: Austin, Texas, USA

Re: Rybka Slowdown on with Large Hash

Postby Onno Garms » 07 Nov 2008, 22:18

Zach Wegner wrote:Try using the SP Rybka version.


I don't own it.

I gather that this only happens on windows?


Rybka is only available as a Windows executable. Same for SOS. I run them under Wine, I don't have native Windows on the computer where the problem occurs.
User avatar
Onno Garms
 
Posts: 128
Joined: 17 Feb 2007, 11:17
Location: Bonn, Germany

Re: Rybka Slowdown on with Large Hash

Postby Zach Wegner » 08 Nov 2008, 02:29

Onno Garms wrote:
Zach Wegner wrote:Try using the SP Rybka version.


I don't own it.
OK, my mistake. I don't either. ;) I remembered 2.2n2 coming in two versions, I thought MP and SP, but it's 32 and 64 bit.

But anyways, since R1 works it's in all probability a shared memory problem, possibly related to Wine. Have you tried running it under microwine instead of wine? That's what I use.
User avatar
Zach Wegner
 
Posts: 182
Joined: 26 Sep 2004, 22:02
Location: Austin, Texas, USA

Re: Rybka Slowdown on with Large Hash

Postby Onno Garms » 08 Nov 2008, 07:23

Zach Wegner wrote: Have you tried running it under microwine instead of wine?


Works with R1X64 but doesn't work at all with R2.2
User avatar
Onno Garms
 
Posts: 128
Joined: 17 Feb 2007, 11:17
Location: Bonn, Germany

Re: Rybka Slowdown on with Large Hash

Postby Dhanish » 10 Nov 2008, 08:04

How much RAM do you have? Allocating generally more than 50% of available RAM to your engine may cause too much disk swapping resulting in poor performance. Of course, this is true of any engine and also depends on what other processes are running on your system.

I don't know about Linux, but Wine will also require some memory?
Dhanish
 
Posts: 12
Joined: 21 Apr 2008, 07:49

Re: Rybka Slowdown on with Large Hash

Postby Onno Garms » 10 Nov 2008, 17:49

Dhanish wrote:How much RAM do you have?


Just 1 GB of which are about 400 MB used in idle state. But even when setting Hash to 256 MB there is free memory left and the swapped amount does not increase.

This doesn't seem to be the cause. Thank you anyway for your help.
User avatar
Onno Garms
 
Posts: 128
Joined: 17 Feb 2007, 11:17
Location: Bonn, Germany


Return to Programming and Technical Discussions

Who is online

Users browsing this forum: No registered users and 33 guests