VOGONS


First post, by EvieSigma

User metadata
Rank Oldbie
Rank
Oldbie

I've learned all kinds of stuff about old computers and the various oddities but there's one thing I still don't understand: this concept of "cacheable memory". From my very limited understanding only a certain amount of memory can be "cached" and that memory depends on the system, and anything in excess of that can actually hurt performance? Is that true or am I understanding it completely wrong? I'm trying to optimize my retro PCs from the 486/P1/PII era for the best possible performance I can get with my...relatively low upgrade budget.

Reply 2 of 15, by pentiumspeed

User metadata
Rank l33t
Rank
l33t

To be more precise:

Windows 9x loads from top down while cacheable range starts from bottom up of the memory block means lot of hurt in performance.

Dos starts from bottom and not as noticeable.

Cheers,

Great Northern aka Canada.

Reply 3 of 15, by BinaryDemon

User metadata
Rank Oldbie
Rank
Oldbie

Windows utilizes memory from the top down, so if you have more memory than can be cached you will feel the performance hit immediately. For Win9x, you can load a dos ramdisk intentionally preventing Windows from utilizing that portion of memory (I wish I knew that trick back in the day, I learned it here).

DOS tends to use the first available memory addresses, so unless you are intentionally trying to use all your memory it’s unlikely you will suffer and performance impact.

Not sure if there are any tricks for Win2k/XP/new OS.

Check out DOSBox Distro:

https://sites.google.com/site/dosboxdistro/ [*]

a lightweight Linux distro (tinycore) which boots off a usb flash drive and goes straight to DOSBox.

Make your dos retrogaming experience portable!

Reply 4 of 15, by auron

User metadata
Rank Oldbie
Rank
Oldbie

actually, it's also platform dependent. afaik on 486 systems cacheable ram area is determined by cache size and cache policy (WT/WB). meanwhile on 430HX it doesn't matter if your board has 256 or 512kb installed, depending on tag ram the cacheable size will be 64mb or 512mb. was there actually an effort to compile all the specifics by chipset?

for pentium iis, the limit is 512mb for klamath and early deschutes, and 4gb for late deschutes with the upgraded tag chip, just like pentium pro.

Reply 5 of 15, by dionb

User metadata
Rank l33t++
Rank
l33t++

It's chipset (memory controller) dependent, sometimes differing per revision (ALi Aladdin V...)

If you don't want to get bogged-down in specifics, just look it up for every chipset you want to use.

But in terms of concepts... see cache as something faster that inserts itself between CPU and memory. The CPU can address a lot of memory (pretty much every CPU with cache can do at least 4GB), but memory and cache controllers can't handle that much. Your max memory is determined by the memory controller, max cache is determined by the cache controller. If your cache controller can't address as much as the memory controller, you potentially end up with memory that can be addressed by CPU and memory controller but not by the cache controller. That means that every single read from CPU to that memory goes all the way to (slow) system memory, and is not covered by the (fast) cache memory. If the CPU wants to read from an address that is cached, the cache controller reads it from the cache so the CPU gets it much faster.

In general memory and cache controller could both handle more than anything realistic at time of release of a platform. You only get into problems when adding (far) more memory to a system than would have been realistic at release.

Consider that the i430FX chipset was released in 1995. 8MB of RAM cost upwards of EUR 250 (not corrected for inflation..>). The chipset could cache 64MB. That would have cost EUR 4000, just for the RAM. Realistically this was not a limit at the time. If you were throwing that sort of money at a system you wouldn't have been buying a consumer-grade i430FX system but some or other workstation. These days 32MB SIMMs are dirt cheap, so you could easily equip a board with the 128MB the memory controller could address. Then you hit the cacheable limit and half your memory is not cached by L2 cache. Not good. But if you want 128MB RAM you're basically using the wrong platform... the only case where you might have realistically have hit those limits would be with Intel i430TX and ALi Aladdin V chipsets with the same limits in 1998-1999, although in the case of the Aladdin V it was a bug fixed in later revisions (rev. G), as by 1999 128MB RAM wasn't crazy.

Reply 6 of 15, by H3nrik V!

User metadata
Rank Oldbie
Rank
Oldbie
auron wrote on 2020-03-20, 17:00:

for pentium iis, the limit is 512mb for klamath and early deschutes, and 4gb for late deschutes with the upgraded tag chip, just like pentium pro.

As in PPro is dependent on tag, or as PPro can always cache 4gb?

Please use the "quote" option if asking questions to what I write - it will really up the chances of me noticing 😀

Reply 8 of 15, by EvieSigma

User metadata
Rank Oldbie
Rank
Oldbie

Thanks for the explaining guys!

I have a PII system (440LX I believe) I put 512MB of RAM into just because that was what I had, but I assume the cacheable amount is less than that so I would want to downgrade. And I was trying to figure out if it's worth upgrading my PCI 486 to its maximum of 64MB of RAM, versus keeping the current 16MB or upgrading to 32MB.

Reply 9 of 15, by dionb

User metadata
Rank l33t++
Rank
l33t++
EvieSigma wrote on 2020-03-20, 19:43:

Thanks for the explaining guys!

I have a PII system (440LX I believe) I put 512MB of RAM into just because that was what I had, but I assume the cacheable amount is less than that so I would want to downgrade.

512MB is cacheable by any P2, over that requires a later P2 or P3.

And I was trying to figure out if it's worth upgrading my PCI 486 to its maximum of 64MB of RAM, versus keeping the current 16MB or upgrading to 32MB.

Question is: which chipset? And how much cache in installed? (frequently also co-determines cachable area).

Of course with RAM, having less than needed severely impacts performance, but having more than needed is rarely beneficial. If 16MB is enough you will not gain anything by increasing RAM to 64MB. It will however slow your boot times significantly - HIMEM.SYS takes a LONG time checking that much RAM on a 486. I have one with that much, because I want to be able to run Ultima 7 from RAMDRIVE, and I don't care about performance (in fact CPU might be a bit too fast for that game), but that is a very specific use case. I've never seen a need to have more than 16MB of RAM actually available for DOS.

Reply 10 of 15, by macroexp

User metadata
Rank Newbie
Rank
Newbie
dionb wrote on 2020-03-20, 21:17:

It will however slow your boot times significantly - HIMEM.SYS takes a LONG time checking that much RAM on a 486.

Throw /TESTMEM:OFF on your DEVICE=\DOS\HIMEM.SYS line and never look back!

Reply 11 of 15, by Disruptor

User metadata
Rank Oldbie
Rank
Oldbie

Ok, let's do the calculation in bytes for my 486 system.

1 MByte installed cache = 2^20
/ 4 Byte (32 Bit) bus width = 2^2
/ Burst length of 4 = 2^2
= 2^(20-2-2) = 2^16 Cache lines

2^16: Cache lines
* 2^7: 7 Tag-Bits Write Back
* 2^4: 16 Byte Burst Length
= 2^(16+7+4) = 2^27 Byte cacheable = 128 MByte

Since I have installed 256 MByte, so half of the cache would be uncached.
The tag ram (extra chip) is 8 bits wide. I use write back (WB) cache, so one of the 8 bits is used as dirty bit. The dirty bit is telling the chipset that the data in the cache line is newer than its copy in main memory and has to be written back somewhen later.
But I've changed a BIOS setting to operate the cache in write through (WT) mode, so the dirty bit is not needed and I have one extra bit tag - 8 bits.
The extra bit in WT mode allows me to cache full 256 MByte then.

A shorter version of this calculation is:
Installed Cache * 2^Tag Bits = Cacheable Area

For your 486 with 64 MByte RAM this means you need 512 KByte cache to operate in WB mode, but you just need 256 KByte cache to use WT mode.
If you have 256 KB of cache, you'd better keep 16 MB or upgrade to no more than 32 MB for maximum performance.

Reply 12 of 15, by EvieSigma

User metadata
Rank Oldbie
Rank
Oldbie
dionb wrote on 2020-03-20, 21:17:
EvieSigma wrote on 2020-03-20, 19:43:

And I was trying to figure out if it's worth upgrading my PCI 486 to its maximum of 64MB of RAM, versus keeping the current 16MB or upgrading to 32MB.

Question is: which chipset? And how much cache in installed? (frequently also co-determines cachable area).

Of course with RAM, having less than needed severely impacts performance, but having more than needed is rarely beneficial. If 16MB is enough you will not gain anything by increasing RAM to 64MB. It will however slow your boot times significantly - HIMEM.SYS takes a LONG time checking that much RAM on a 486. I have one with that much, because I want to be able to run Ultima 7 from RAMDRIVE, and I don't care about performance (in fact CPU might be a bit too fast for that game), but that is a very specific use case. I've never seen a need to have more than 16MB of RAM actually available for DOS.

Given the relative obscurity of this motherboard (Anigma BAT486IP) I don't actually know for sure, though I do know it's an Intel chipset. I want to say...i420? It has 256KB of cache soldered to the motherboard.

The motherboard actually supports an absurd 128MB of RAM according to the documents I've found but I've heard DOS can't make use of more than 64MB anyway.

Reply 13 of 15, by dionb

User metadata
Rank l33t++
Rank
l33t++
EvieSigma wrote on 2020-03-21, 00:58:

[...]

Given the relative obscurity of this motherboard (Anigma BAT486IP) I don't actually know for sure, though I do know it's an Intel chipset. I want to say...i420? It has 256KB of cache soldered to the motherboard.

The motherboard actually supports an absurd 128MB of RAM according to the documents I've found but I've heard DOS can't make use of more than 64MB anyway.

There are quite a few different i420 chipsets (EX, TX etc), but googling that name I find fuzzy pics of a board with a (illegible) UMC chipset. Couldn't you just look on the board to see what exactly is on it?

Reply 14 of 15, by EvieSigma

User metadata
Rank Oldbie
Rank
Oldbie
dionb wrote on 2020-03-21, 01:20:
EvieSigma wrote on 2020-03-21, 00:58:

[...]

Given the relative obscurity of this motherboard (Anigma BAT486IP) I don't actually know for sure, though I do know it's an Intel chipset. I want to say...i420? It has 256KB of cache soldered to the motherboard.

The motherboard actually supports an absurd 128MB of RAM according to the documents I've found but I've heard DOS can't make use of more than 64MB anyway.

There are quite a few different i420 chipsets (EX, TX etc), but googling that name I find fuzzy pics of a board with a (illegible) UMC chipset. Couldn't you just look on the board to see what exactly is on it?

I could! I love the old full tower cases but I don't love removing six screws to be able to get inside them though.

Reply 15 of 15, by The Serpent Rider

User metadata
Rank l33t++
Rank
l33t++

And I was trying to figure out if it's worth upgrading my PCI 486 to its maximum of 64MB of RAM

No, it's not worth it on any setup. 32 Mb RAM should be enough to launch anything 486 could play at least barely.

I must be some kind of standard: the anonymous gangbanger of the 21st century.