Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: several questions about memory and how it is used by programs

Author: Georg v. Zimmermann

Date: 08:21:02 08/27/02

Go up one level in this thread


On August 27, 2002 at 10:28:09, K. Burcham wrote:

>
>I am not clear on these questions:
>
>1. when does a program write to hash?

whenever it is playing or analyzing, but not when playing book moves.

>2. when does a program write to the hard drive?

to save learning data at the end of a game, or when it exits. Some programs
write a few lines into a log file. All of this is not time critical.

>3. when does a program write to ram separate from the hash?

all the time. Remember at every node we are updating the board ! But of course
it only writes to the ram allocated to it (unless we have a big bug).

>4. If a pc has 512 megs ram, If we set hash at 64 megs, what happens when hash
>gets full?

Program will start to overwrite its hash table, using more or less clever
algorithms to figure out what to keep and what to overwrite.

>5. lets say a program stays in book for 15 moves, is the program accessing only
>the hard drive to play book moves?  Or Is this info moved to ram first and then
>the program plays the book from ram?

Depends on the program. I would assume that some programs load a small
tourney-book into ram and access the rest of the book from HD. But again, this
is not time-critical.

>6. In the middle game after book, I assume this is when the program starts to
>store info from analysis. during this period, what is being read/write to the
>hard drive before the hash is full?

see above

>7. In the middle game after book, what is being read/write to the hard drive
>after the hash is full.

not more of course. Unless your hash table size is too big. Which is a real BAD
idea. Then the computer will start to swap (put some of the hash on the HD).

>8. In the middle game after book, if we set the hash at 64 megs, and then this
>fills, will the program just use more of the ram, or will it store analysis
>directly to the hard drive?

Neither.

>9. what were programs doing with analysis before hash tables? did all this
>analysis set in ram? did the operating system manage this info as needed, and
>move the stored analysis to the hard drive as the ram filled?

I dont understand that question. hash tables _are_ stored in RAM. And I bet HT
have been used from almost the beginning.

>10. if we set up two identical computers, running same program on each.
>set up same test position on both. computer A with hash tables and computer B
>without hash tables. how do these two compare, what memory are they using and
>when.
>

Depending on the program and the position, from factor 2 to factor 100. Average
probably between 2.3 and 3.5

>
>In other words when exactly, will a hard drive speed increase also speed up a
>chess program and why?

Only for endgame table bases

>
>some will say go study on the internet. i have at many sites. i cannot find
>answers to these type of questions. if you know a site that answers these
>questions, please let me know, i will go there and study.
>thanks
>kburcham



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.