xBoard 4.5.2 memory issue

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

FlavusSnow
Posts: 89
Joined: Thu Apr 01, 2010 5:28 am
Location: Omaha, NE

xBoard 4.5.2 memory issue

Post by FlavusSnow »

I recently updated from 4.4.4 to 4.5.2 and now all of my engines allocate exactly half of the RAM listed in the interface. i.e. if I set the hash size to 2,048 MB, only 1,024 will actually be allocated by the engine. I had no issues in version 4.4.4. Anyone else see this?
User avatar
hgm
Posts: 27788
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: xBoard 4.5.2 memory issue

Post by hgm »

Well, I don't have that amount of RAM, so I cannot test it. Are you sure the hash table in the Common Engine Options dialog says 2048? It is supposed to simply send to the engine what you ask for, even if it was 100 times larger than what you actually have.

Otherwise, run with the option -debug, abd post the xboard.debug file here.
FlavusSnow
Posts: 89
Joined: Thu Apr 01, 2010 5:28 am
Location: Omaha, NE

Re: xBoard 4.5.2 memory issue

Post by FlavusSnow »

To preface this, I have 16 GB of RAM and I run Mint 12 64-bit (Linux).

Ok, in this example I use the command line and it shows "-defaultHashSize 4096"

here is a partial output of the Debug file:

348 <first : feature option="Polyglot BookRandom -check 1"
348 >first : accepted option
348 <first : feature option="Polyglot BookDepth -spin 256 0 256"
348 >first : accepted option
348 <first : feature option="Polyglot STFudge -spin 20 0 1000"
348 >first : accepted option
348 <first : feature option="Polyglot SyncStop -check 0"
348 >first : accepted option
348 <first : feature option="Polyglot Save -save"
348 >first : accepted option
348 <first : feature done=1
348 >first : accepted done
349 >first : memory 4100
349 >first : cores 6
349 >first : new
random
349 >first : ics 69.36.243.188
349 >first : post
349 >first : hard
349 >first : ping 1

I see it sends "4100" to the engine, but when I use the "top" command in terminal I see only 13.1% memory useage. 13.1% of 16,384 equals about 2,146, not 4,100 (or the 4,096 that I requested in the command line). Also the "free -m" command shows the same total memory statistics as "top" so I don't think my top is messed up.

Also when I load critter without xboard the memory use shows correctly.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: xBoard 4.5.2 memory issue

Post by bob »

hgm wrote:Well, I don't have that amount of RAM, so I cannot test it. Are you sure the hash table in the Common Engine Options dialog says 2048? It is supposed to simply send to the engine what you ask for, even if it was 100 times larger than what you actually have.

Otherwise, run with the option -debug, abd post the xboard.debug file here.
It is possible that it is an engine issue. Some require something like 1.5x a power of two, such as old versions of Crafty. And there is the issue of pawn hash and such, so it might not be real clear as to what is going on.
FlavusSnow
Posts: 89
Joined: Thu Apr 01, 2010 5:28 am
Location: Omaha, NE

Re: xBoard 4.5.2 memory issue

Post by FlavusSnow »

But it worked as expected in version 4.4.4. It was only after updating to 4.5.2 did the memory usage change to an unexpected value. That's what spurred me to start this thread. It seems like an odd problem to have and a pretty big coincidence.
User avatar
hgm
Posts: 27788
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: xBoard 4.5.2 memory issue

Post by hgm »

Well, what you show is correct. 4096MB has + 4MB EGTB cache = 4100 MB total, and this is what WB sends to Polyglot. Polyglot should subract the EGTB cache again, and send 'setoption name hash value 4096' and 'setoption name nalimovCache value 4' to the UCI engine separately.
User avatar
Eelco de Groot
Posts: 4561
Joined: Sun Mar 12, 2006 2:40 am
Full name:   

Re: xBoard 4.5.2 memory issue

Post by Eelco de Groot »

Hello Harm, I hope you don't mind but I nominated you and Ed Schröder, for possible moderators next term. I also nominated Graham but he has declined and explained why, elsewhere. I just thought you guys would make very good moderators and also I do think it is good to have at least one person up there who can represent the programmers and maybe have a bit more of authority because that sometimes can be useful. Luckily the list of candidates is a bit longer by now but not many of the people on the list have accepted their nomination yet. I understand this is not a highly wanted job but everybody can decline if they wish...

Regards, Eelco
Debugging is twice as hard as writing the code in the first
place. Therefore, if you write the code as cleverly as possible, you
are, by definition, not smart enough to debug it.
-- Brian W. Kernighan
User avatar
hgm
Posts: 27788
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: xBoard 4.5.2 memory issue

Post by hgm »

Well, I am not sure if I would be as good a moderator as you think, but the question is moot,because even when I would be the one that could do the job best, I consider my time several orders of magnitude too valuable to waste it on babysitting a belligerent crowd of forum posters...
smatovic
Posts: 2639
Joined: Wed Mar 10, 2010 10:18 pm
Location: Hamburg, Germany
Full name: Srdja Matovic

Re: xBoard 4.5.2 memory issue

Post by smatovic »

I consider my time several orders of magnitude too valuable to waste it on babysitting a belligerent crowd of forum posters...
+1 :)

--
Srdja