History of Memory Wall in Computer Chess?

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

smatovic
Posts: 2645
Joined: Wed Mar 10, 2010 10:18 pm
Location: Hamburg, Germany
Full name: Srdja Matovic

History of Memory Wall in Computer Chess?

Post by smatovic »

I am not that long into programming and computer chess, so may I ask what kind
of impact the memory wall back then in the 90s(?) had on programming in chess?

As far as I got it, nowadays engines fit completely into CPU cache, including
things like lookup tables, and main memory is now used for Hash/Transposition
Tables.

Maybe some can elaborate a bit on this? Thx.

--
Srdja
Joost Buijs
Posts: 1563
Joined: Thu Jul 16, 2009 10:47 am
Location: Almere, The Netherlands

Re: History of Memory Wall in Computer Chess?

Post by Joost Buijs »

smatovic wrote: Tue Aug 11, 2020 9:10 am I am not that long into programming and computer chess, so may I ask what kind
of impact the memory wall back then in the 90s(?) had on programming in chess?

As far as I got it, nowadays engines fit completely into CPU cache, including
things like lookup tables, and main memory is now used for Hash/Transposition
Tables.

Maybe some can elaborate a bit on this? Thx.

--
Srdja
In the 90s the situation was not much different from the current one, I don't remember such thing as a memory wall.
Caches were small typically 16K instruction and 16K data, with 256 or 512K level 2 cache. Main memory was like 256 or 512M.
Since the CPU's of that time had a much lower IPC you didn't need very a big hash/transposition table.

Back in the 70s, when I started with engine programing, things were very different, CPU's had no cache at all, and main memory was like 8 or 16K.
My first computer consisted of a 2 MHz. Intel 8080 with 16K static memory. The small amount of memory restricted me very much in the things I wanted to do with it.

I remember my first engine did ~700 N/S, and it had a strength comparable to (at that time) 1850 Fide-Elo, probably strong enough beat most people on this forum.
smatovic
Posts: 2645
Joined: Wed Mar 10, 2010 10:18 pm
Location: Hamburg, Germany
Full name: Srdja Matovic

Re: History of Memory Wall in Computer Chess?

Post by smatovic »

Interesting, thx.

But imo there must have been some kind of gap with the 486 and early 586 CPUs.

486 had 16 KB L1 data cache, doubt enough to fit the entire engine, 586 had no
L2 cache, at least not on die, 686 introduced 256 KB L2 cache.

I am not that firm in the memory settings back then, latency and frequency, but
as I understood it 486DX2, 486DX4 and 586 CPUs ran at higher clock than main
memory, therefore the caches...hence the question, how to handle such a memory
wall back then?

--
Srdja
smatovic
Posts: 2645
Joined: Wed Mar 10, 2010 10:18 pm
Location: Hamburg, Germany
Full name: Srdja Matovic

Re: History of Memory Wall in Computer Chess?

Post by smatovic »

Hehe, okay, got it, L2 cache was sitting on the motherboard during 386 and 486 era :) topic solved.

--
Srdja
Dann Corbit
Posts: 12540
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: History of Memory Wall in Computer Chess?

Post by Dann Corbit »

A google search for the terms :
the memory bottleneck
will turn up lots of pages.
I wrote some CCC remarks about it long ago.

For a long time, it was considered the most fundamental problem to the advancement of computer systems.

I think AMD has made the approach of titanic L1 and L2 cache. Still, you have to hit main memory eventually.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
User avatar
Laskos
Posts: 10948
Joined: Wed Jul 26, 2006 10:21 pm
Full name: Kai Laskos

Re: History of Memory Wall in Computer Chess?

Post by Laskos »

Joost Buijs wrote: Tue Aug 11, 2020 4:06 pm
smatovic wrote: Tue Aug 11, 2020 9:10 am I am not that long into programming and computer chess, so may I ask what kind
of impact the memory wall back then in the 90s(?) had on programming in chess?

As far as I got it, nowadays engines fit completely into CPU cache, including
things like lookup tables, and main memory is now used for Hash/Transposition
Tables.

Maybe some can elaborate a bit on this? Thx.

--
Srdja
In the 90s the situation was not much different from the current one, I don't remember such thing as a memory wall.
Caches were small typically 16K instruction and 16K data, with 256 or 512K level 2 cache. Main memory was like 256 or 512M.
Since the CPU's of that time had a much lower IPC you didn't need very a big hash/transposition table.

Back in the 70s, when I started with engine programing, things were very different, CPU's had no cache at all, and main memory was like 8 or 16K.
My first computer consisted of a 2 MHz. Intel 8080 with 16K static memory. The small amount of memory restricted me very much in the things I wanted to do with it.

I remember my first engine did ~700 N/S, and it had a strength comparable to (at that time) 1850 Fide-Elo, probably strong enough beat most people on this forum.
That 1850 FIDE Elo in the late 1970s by you?
That's amazing! Isn't Chessmaster 2000 of 1986 roughly 1600 FIDE Elo?
Seems pretty astonishing to me. As a kid I had in 1983-1984 a chess software on ZX Spectrum much weaker than that (probably 1300 FIDE). We weren't well informed, and were long time under impression in 1980s that home computers are no match for my father (1800-1900 FIDE).
abulmo2
Posts: 433
Joined: Fri Dec 16, 2016 11:04 am
Location: France
Full name: Richard Delorme

Re: History of Memory Wall in Computer Chess?

Post by abulmo2 »

Joost Buijs wrote: Tue Aug 11, 2020 4:06 pm In the 90s [...] Main memory was like 256 or 512M.
On a high end workstation maybe, but on a standard PC it was more like 1MB in 1990 and 128MB in 1999. Until 1995 many programs were 16 bits and can address only 640kB (with special pointer, or only 64kB with compact pointer). It was possible to use dos extender to use more than 1MB, but this was not very common.
Richard Delorme
Joost Buijs
Posts: 1563
Joined: Thu Jul 16, 2009 10:47 am
Location: Almere, The Netherlands

Re: History of Memory Wall in Computer Chess?

Post by Joost Buijs »

Laskos wrote: Tue Aug 11, 2020 9:55 pm
Joost Buijs wrote: Tue Aug 11, 2020 4:06 pm
smatovic wrote: Tue Aug 11, 2020 9:10 am I am not that long into programming and computer chess, so may I ask what kind
of impact the memory wall back then in the 90s(?) had on programming in chess?

As far as I got it, nowadays engines fit completely into CPU cache, including
things like lookup tables, and main memory is now used for Hash/Transposition
Tables.

Maybe some can elaborate a bit on this? Thx.

--
Srdja
In the 90s the situation was not much different from the current one, I don't remember such thing as a memory wall.
Caches were small typically 16K instruction and 16K data, with 256 or 512K level 2 cache. Main memory was like 256 or 512M.
Since the CPU's of that time had a much lower IPC you didn't need very a big hash/transposition table.

Back in the 70s, when I started with engine programing, things were very different, CPU's had no cache at all, and main memory was like 8 or 16K.
My first computer consisted of a 2 MHz. Intel 8080 with 16K static memory. The small amount of memory restricted me very much in the things I wanted to do with it.

I remember my first engine did ~700 N/S, and it had a strength comparable to (at that time) 1850 Fide-Elo, probably strong enough beat most people on this forum.
That 1850 FIDE Elo in the late 1970s by you?
That's amazing! Isn't Chessmaster 2000 of 1986 roughly 1600 FIDE Elo?
Seems pretty astonishing to me. As a kid I had in 1983-1984 a chess software on ZX Spectrum much weaker than that (probably 1300 FIDE). We weren't well informed, and were long time under impression in 1980s that home computers are no match for my father (1800-1900 FIDE).
Of course it is very difficult to tell exactly because it never played in FIDE tournaments, but I often had it play at our local chess club and it did rather well against players of that level. At that time 1850 FIDE was not a high level, in my remembrance it was comparable to 1700 Dutch Elo, average club players were having 1500 .. 1700 Dutch Elo and were often beaten by the program. I don't know how concentrated these people were when they played against the program, maybe they were underestimating it, maybe they played differently against it, this is something I can't tell.

It's a pity that I don't have any of these old sources anymore, I don't remember what happened to it. I used to have it on 5.25 inch floppy disks, maybe they were unreadable at some point. At that time it probably didn't seem important, now I regret it that I didn't keep the sources.

I don't know anything about Chessmaster 2000, I think it was programmed by David Kittinger (later versions by Johan de Koning), according to Wikipedia it was rated by the UCSF at 2100 Elo.
Joost Buijs
Posts: 1563
Joined: Thu Jul 16, 2009 10:47 am
Location: Almere, The Netherlands

Re: History of Memory Wall in Computer Chess?

Post by Joost Buijs »

abulmo2 wrote: Wed Aug 12, 2020 12:14 am
Joost Buijs wrote: Tue Aug 11, 2020 4:06 pm In the 90s [...] Main memory was like 256 or 512M.
On a high end workstation maybe, but on a standard PC it was more like 1MB in 1990 and 128MB in 1999. Until 1995 many programs were 16 bits and can address only 640kB (with special pointer, or only 64kB with compact pointer). It was possible to use dos extender to use more than 1MB, but this was not very common.
In my remembrance it was in the 80s with the 80186 and the 80286 that we couldn't address more than 1MB (16MB with the 286 in protected mode).

In the late 90s I build a workstation with dual Pentium-II running Windows NT 4.0, and I had absolutely no issues to address large amounts of memory with it.

I guess we are both right, the first half of the 90s most people were still using DOS or Windows 3.1, Windows 95 solved most of these memory issues. For high end applications there were OS/2 and later NT 3.1, but I presume that the average user still used DOS.
User avatar
Laskos
Posts: 10948
Joined: Wed Jul 26, 2006 10:21 pm
Full name: Kai Laskos

Re: History of Memory Wall in Computer Chess?

Post by Laskos »

Joost Buijs wrote: Wed Aug 12, 2020 7:25 am
Laskos wrote: Tue Aug 11, 2020 9:55 pm
Joost Buijs wrote: Tue Aug 11, 2020 4:06 pm
smatovic wrote: Tue Aug 11, 2020 9:10 am I am not that long into programming and computer chess, so may I ask what kind
of impact the memory wall back then in the 90s(?) had on programming in chess?

As far as I got it, nowadays engines fit completely into CPU cache, including
things like lookup tables, and main memory is now used for Hash/Transposition
Tables.

Maybe some can elaborate a bit on this? Thx.

--
Srdja
In the 90s the situation was not much different from the current one, I don't remember such thing as a memory wall.
Caches were small typically 16K instruction and 16K data, with 256 or 512K level 2 cache. Main memory was like 256 or 512M.
Since the CPU's of that time had a much lower IPC you didn't need very a big hash/transposition table.

Back in the 70s, when I started with engine programing, things were very different, CPU's had no cache at all, and main memory was like 8 or 16K.
My first computer consisted of a 2 MHz. Intel 8080 with 16K static memory. The small amount of memory restricted me very much in the things I wanted to do with it.

I remember my first engine did ~700 N/S, and it had a strength comparable to (at that time) 1850 Fide-Elo, probably strong enough beat most people on this forum.
That 1850 FIDE Elo in the late 1970s by you?
That's amazing! Isn't Chessmaster 2000 of 1986 roughly 1600 FIDE Elo?
Seems pretty astonishing to me. As a kid I had in 1983-1984 a chess software on ZX Spectrum much weaker than that (probably 1300 FIDE). We weren't well informed, and were long time under impression in 1980s that home computers are no match for my father (1800-1900 FIDE).
Of course it is very difficult to tell exactly because it never played in FIDE tournaments, but I often had it play at our local chess club and it did rather well against players of that level. At that time 1850 FIDE was not a high level, in my remembrance it was comparable to 1700 Dutch Elo, average club players were having 1500 .. 1700 Dutch Elo and were often beaten by the program. I don't know how concentrated these people were when they played against the program, maybe they were underestimating it, maybe they played differently against it, this is something I can't tell.

It's a pity that I don't have any of these old sources anymore, I don't remember what happened to it. I used to have it on 5.25 inch floppy disks, maybe they were unreadable at some point. At that time it probably didn't seem important, now I regret it that I didn't keep the sources.

I don't know anything about Chessmaster 2000, I think it was programmed by David Kittinger (later versions by Johan de Koning), according to Wikipedia it was rated by the UCSF at 2100 Elo.
Were you aware back then that your program rates high among available at that time on the market programs and dedicated units? That you were close to the top of micro-computer chess programming? People were much less informed and connected back then, at least usually, maybe you were unaware of the place of your program, that's why you lost the sources and everything.
Sargon I of 1978 (considered one of the best programs of its time, to early 1980s in Sargon II version on Z80)
https://en.wikipedia.org/wiki/Sargon_(chess)
was rewritten from the book to Intel PC and ported to UCI
http://talkchess.com/forum3/viewtopic.php?f=7&t=73969
I had fun with it.