Page 1 of 1

xBoard 4.5.2 memory issue

Posted: Sat Feb 04, 2012 9:28 pm
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?

Re: xBoard 4.5.2 memory issue

Posted: Sat Feb 04, 2012 10:52 pm
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.

Re: xBoard 4.5.2 memory issue

Posted: Sun Feb 05, 2012 1:27 am
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.

Re: xBoard 4.5.2 memory issue

Posted: Sun Feb 05, 2012 2:20 am
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.

Re: xBoard 4.5.2 memory issue

Posted: Sun Feb 05, 2012 3:34 am
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.

Re: xBoard 4.5.2 memory issue

Posted: Sun Feb 05, 2012 8:18 am
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.

Re: xBoard 4.5.2 memory issue

Posted: Mon Feb 06, 2012 1:38 am
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

Re: xBoard 4.5.2 memory issue

Posted: Mon Feb 06, 2012 8:16 am
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...

Re: xBoard 4.5.2 memory issue

Posted: Tue Feb 07, 2012 12:16 am
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