xBoard 4.5.2 memory issue

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

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Post Reply
FlavusSnow
Posts: 89
Joined: Thu Apr 01, 2010 3:28 am
Location: Omaha, NE

xBoard 4.5.2 memory issue

Post by FlavusSnow » Sat Feb 04, 2012 8:28 pm

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: 23613
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: xBoard 4.5.2 memory issue

Post by hgm » Sat Feb 04, 2012 9:52 pm

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 3:28 am
Location: Omaha, NE

Re: xBoard 4.5.2 memory issue

Post by FlavusSnow » Sun Feb 05, 2012 12:27 am

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: 20475
Joined: Mon Feb 27, 2006 6:30 pm
Location: Birmingham, AL

Re: xBoard 4.5.2 memory issue

Post by bob » Sun Feb 05, 2012 1:20 am

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 3:28 am
Location: Omaha, NE

Re: xBoard 4.5.2 memory issue

Post by FlavusSnow » Sun Feb 05, 2012 2:34 am

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: 23613
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: xBoard 4.5.2 memory issue

Post by hgm » Sun Feb 05, 2012 7:18 am

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: 4148
Joined: Sun Mar 12, 2006 1:40 am
Location: Groningen

Re: xBoard 4.5.2 memory issue

Post by Eelco de Groot » Mon Feb 06, 2012 12:38 am

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: 23613
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: xBoard 4.5.2 memory issue

Post by hgm » Mon Feb 06, 2012 7:16 am

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: 822
Joined: Wed Mar 10, 2010 9:18 pm
Location: Hamburg, Germany
Full name: Srdja Matovic
Contact:

Re: xBoard 4.5.2 memory issue

Post by smatovic » Mon Feb 06, 2012 11:16 pm

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

--
Srdja

Post Reply