Page 1 of 5

Nalimov and memory for indexes (are you aware?)

Posted: Mon Mar 01, 2010 10:18 pm
by michiguel
Is the people aware the Nalimov take ~20 MiB (as I was told in another forum, correct me if I am wrong) at start up to load indexes?
How do you take this into account when you do testing? is it part of the memory that you give to the engines + egtb cache? if you give an engine 20 MiB + 32 cache that would be significant.

Gaviota is taking 9.8 MiB and bothers me. I am looking to see how I reduce it (I can cache some and compress the other).

Miguel

Re: Nalimov and memory for indexes (are you aware?)

Posted: Mon Mar 01, 2010 10:24 pm
by BrandonSi
Hey neighbor :)

Is this 20MB assumption for 3-4-5 tablebases?
is it part of the memory that you give to the engines + egtb cache?
I can't state this as a certainty for every situation, but for engines running under the Chessbase GUI, tablebase memory is specified (and I assume allocated) separately from the memory allocated to the engine and its hash files / table.

Re: Nalimov and memory for indexes (are you aware?)

Posted: Mon Mar 01, 2010 10:26 pm
by Gian-Carlo Pascutto
What you specify in the GUI for Nalimov is the cache.

He's talking about the indexes, which you cannot configure. It gets much larger than 20Mb if you use 6-men tables.

Re: Nalimov and memory for indexes (are you aware?)

Posted: Mon Mar 01, 2010 10:43 pm
by BrandonSi
Gian-Carlo Pascutto wrote:What you specify in the GUI for Nalimov is the cache.

He's talking about the indexes, which you cannot configure. It gets much larger than 20Mb if you use 6-men tables.
Ah, I understand. However, since ultimately any bottleneck associated with Nalimov bases are going to be limited by the physical disk / data path, and not all indexes would be loaded into memory at the same time, I'm not sure I understand why the space requirement in RAM for the indexes is an issue...?

Just curious. :)

Re: Nalimov and memory for indexes (are you aware?)

Posted: Tue Mar 02, 2010 12:01 am
by michiguel
BrandonSi wrote:
Gian-Carlo Pascutto wrote:What you specify in the GUI for Nalimov is the cache.

He's talking about the indexes, which you cannot configure. It gets much larger than 20Mb if you use 6-men tables.
Ah, I understand. However, since ultimately any bottleneck associated with Nalimov bases are going to be limited by the physical disk / data path, and not all indexes would be loaded into memory at the same time, I'm not sure I understand why the space requirement in RAM for the indexes is an issue...?

Just curious. :)
As a matter of principle, it is not a good idea that an engine takes memory without letting you know. For instance, in a test, you give equal RAM to two engines, but one of them is getting 20 MiB extra. That might not seem a lot in current high end hardware, but you always find pocketPC, netbooks, phones etc. in which 20 MiB is a lot.

Second, the problem is scalable when you want to use 6-piece TBs, for instance, as GCP mentioned.

The appropiate way to handle this is to subtract this memory from the cache. If you tell the engine to get 32 MiB of EGTB cache, then 20 of those should be reserved for the indexes. That would keep the engine "honest" regarding its requirements.

I just wanted to know if the people took this into account or not.

Miguel

Re: Nalimov and memory for indexes (are you aware?)

Posted: Tue Mar 02, 2010 12:11 am
by Harvey Williamson
michiguel wrote:
BrandonSi wrote:
Gian-Carlo Pascutto wrote:What you specify in the GUI for Nalimov is the cache.

He's talking about the indexes, which you cannot configure. It gets much larger than 20Mb if you use 6-men tables.
Ah, I understand. However, since ultimately any bottleneck associated with Nalimov bases are going to be limited by the physical disk / data path, and not all indexes would be loaded into memory at the same time, I'm not sure I understand why the space requirement in RAM for the indexes is an issue...?

Just curious. :)
As a matter of principle, it is not a good idea that an engine takes memory without letting you know. For instance, in a test, you give equal RAM to two engines, but one of them is getting 20 MiB extra. That might not seem a lot in current high end hardware, but you always find pocketPC, netbooks, phones etc. in which 20 MiB is a lot.

Second, the problem is scalable when you want to use 6-piece TBs, for instance, as GCP mentioned.

The appropiate way to handle this is to subtract this memory from the cache. If you tell the engine to get 32 MiB of EGTB cache, then 20 of those should be reserved for the indexes. That would keep the engine "honest" regarding its requirements.

I just wanted to know if the people took this into account or not.

Miguel
Rybka is very bad at this whatever you set as tb cache it will use x the number of cores so on an 8 core machine if you set cache at 64 Rybka will take 8x64 - i have not seen other engines do this.

Re: Nalimov and memory for indexes (are you aware?)

Posted: Tue Mar 02, 2010 8:51 am
by Werner
Hi,
I think in this case Windows task manager does not show it correct. If you look at the rest of free memory you see only 1 times the 64 MB are used.

Re: Nalimov and memory for indexes (are you aware?)

Posted: Tue Mar 02, 2010 11:26 am
by Jouni
20 MB is nothing, when R3 uses 90 MB always for nothing :)

Jouni

Re: Nalimov and memory for indexes (are you aware?)

Posted: Tue Mar 02, 2010 2:08 pm
by Gian-Carlo Pascutto
BrandonSi wrote:not all indexes would be loaded into memory at the same time,
They are. It's limitation of the Nalimov code.

Re: Nalimov and memory for indexes (are you aware?)

Posted: Tue Mar 02, 2010 2:09 pm
by Gian-Carlo Pascutto
Harvey Williamson wrote: Rybka is very bad at this whatever you set as tb cache it will use x the number of cores so on an 8 core machine if you set cache at 64 Rybka will take 8x64 - i have not seen other engines do this.
Probably an issue with every engine that is multiprocessed. Zappa will likely be affected too.

It's not only the caches, the indexes will also get replicated. Nalimov wrote his code for Crafty at the moment Crafty was multithreaded, and the code just sucks for multiprocessed engines.