VOGONS


VRAM vs DRAM

Topic actions

First post, by mpe

User metadata
Rank Member
Rank
Member

VRAM is better in Windows, but DRAM is cheaper and often works better in DOS. That's what 90's magazines kept repeating. It also matches my observations when comparing equivalent VRAM cards with DRAM.

But I am trying to figure out why is it that? Why don't VRAM cards excel in DOS too?

I get that the extra VRAM port for DAC isn't as big advantage in DOS as in high resolution/refresh rate. But surely it shouldn't hurt and is better than a single DRAM port. Or isn't?

So what is it that helps my S3 868 beat my S3 968 in DOS while the latter is quite a bit faster in Windows?

Dependency Injection Blog||486DX-50 EISA|NexGen Nx586

Reply 1 of 37, by dionb

User metadata
Rank l33t
Rank
l33t

Wild guess: bandwidth vs latency.

I recall reading somewhere that VRAM has higher latency on its normal 'DRAM' port than on regular DRAM. That would explain the difference - if software (drivers) takes advantage of both ports, the VRAM wins hands-down, if not (i.e. plain old DOS), the added value isn't used and you default to the read/write port with higher latencies.

Reply 2 of 37, by Grzyb

User metadata
Rank Member
Rank
Member

I've been wondering about it myself...

First, let's consider a dumb framebuffer card...
The video memory is accessed from two sides:
* CPU: mostly writes to the memory, but sometimes also reads
* graphics controller: reads from the memory to feed the data to the RAMDAC

Obviously, sometimes the CPU has to wait while the controller does its job.
Making the memory dual-ported should eliminate the need to wait, so it should be faster without the need for any special software!

Now, let's consider an accelerated card...
The video memory is accessed from three sides:
* CPU: mostly writes to the memory, but sometimes also reads
* graphics controller: reads from the memory to feed the data to the RAMDAC
* accelerator: reads and writes the memory to perform eg. BitBlT

In this scenario, even dual-ported memory isn't enough, we would need triple-ported which probably doesn't exist.
So, even with VRAM, there must be some additional logic to provide arbitrage between the CPU and the accelerator, which may slow things down even when the accelerator is inactive.

For some time, VRAM was used mostly for accelerated cards, while dumb framebuffers used DRAM.

So, perhaps this is the origin of the (mis)conception that in DOS, DRAM is better than VRAM?
Perhaps it's actually about accelerated cards being slower when the software doesn't make use of acceleration?

Reply 3 of 37, by mpe

User metadata
Rank Member
Rank
Member
Grzyb wrote:

For some time, VRAM was used mostly for accelerated cards, while dumb framebuffers used DRAM.

So, perhaps this is the origin of the (mis)conception that in DOS, DRAM is better than VRAM?

That would explain it for early dumb DRAM vs accelerated VRAM cards. But more modern chips (1993-1995 period, like Mach64, S3 Vision series) could be configured with either DRAM or VRAM with exactly the same accelerate features. And yet the performance follows the pattern - DRAM is slower in Windows and faster in DOS and vice versa.

So it looks like this is actually not a misconception.

Dependency Injection Blog||486DX-50 EISA|NexGen Nx586

Reply 4 of 37, by Grzyb

User metadata
Rank Member
Rank
Member

What's the difference between typical DOS software and typical Windows software?
* Windows software makes use of hardware acceleration
* Windows software works in higher resolutions/color depths - SVGA usage was common in Windows, while DOS software was mostly limited to plain VGA

So, if it's not about acceleration, then perhaps about much greater video memory usage?

I can't see why would the second port of dual-ported RAM work any different depending on software...

Reply 5 of 37, by Anonymous Coward

User metadata
Rank l33t
Rank
l33t

One interesting exception to this rule is the Mach64. I have both DRAM and VRAM versions of this card. They have identical performance in DOS as far as I can tell.

"Will the highways on the internets become more few?" -Gee Dubya
V'Ger XT|Upgraded AT|Ultimate 386|Super VL/EISA 486|SMP VL/EISA Pentium

Reply 7 of 37, by Tiido

User metadata
Rank Oldbie
Rank
Oldbie

My SGRAM based Rage 3D II card is faster than the DRAM based version, I no longer remember by how much but on a 486DX4 based machine Doom gained several FPS from the SGRAM card.
My VRAM based VLB Mach32 is nearly as fast as ET4000W32i in DOS, write speeds are almost same, reads slightly worse and in Windows the Mach32 is waaaaaaay faster than the Tseng, I can run 1024x768 and it actually runs smoothly.

T-04YBSC, a new YMF71x based sound card & Official VOGONS thread about it
Newly made 4MB 60ns 30pin SIMMs ~
mida sa loed ? nagunii aru ei saa 😜

Reply 8 of 37, by Rawit

User metadata
Rank Member
Rank
Member

Is it Doom's Mode Y that benefits from SGRAM? I compared my G200 (SDRAM) and Savage4 (SGRAM) and they have similar performance. With Doom the G200 is around 2 frames faster than the Savage4, but the Savage4 feels smoother.

My build: Speedsys

Reply 9 of 37, by vlask

User metadata
Rank Member
Rank
Member

SGRAM cards like mentioned 3D Rage II had bigger memory clocks, thats why they were faster than EDO DRAM versions. They loose this compared to SDRAM as they could have same clocks. There are few exceptions like Nvidia RIVA 128ZX which had SDRAM support limited to 64bit bus compared to 128bit SGRAM. So in this case are SGRAM variants faster.....

Not only mine graphics cards collection at http://www.vgamuseum.info

Reply 10 of 37, by Scali

User metadata
Rank l33t
Rank
l33t

I think VRAM has become an umbrella term for a variety of different memory technologies that happen to suit graphics well.
Indeed, in early times, there was dual-ported memory, which meant you could avoid waitstates between CPU and video circuit. This dual-ported memory I believe was the original 'VRAM'.
These days we have GDDR, which is memory more optimized for high bandwidth, at the tradeoff for generally longer latencies than conventional DDR memory. Since modern GPUs are highly pipelined with very predictable (and therefore cacheable/prefetchable) memory access patterns, the latency can be hidden quite well, and bandwidth is all-important (it's your fillrate).

And ironically there are machines where the CPU also uses GDDR, because it's a shared memory system, with the focus on graphics, such as modern Xbox and PlayStations.

And there have been many technologies in between, including the aforementioned SGRAM (which was actually a budget option as well), and 'WRAM'... etc.
DRAM-based cards were budget cards, and generally had worse performance with accelerated tasks, but with pure software rendering like in most DOS games, you wouldn't really notice.

Because they're budget cards, it's often difficult to compare directly between DRAM and VRAM versions, due to different clockspeeds etc. VRAM cards generally also have the graphics chip and memory running at higher clocks.

In general, 'VRAM' just means Video RAM, and basically just means "the memory that is connected to your video circuit". The term is also used in cases where the machine doesn't actually have physically different types of memory, but some part of the memory is just reserved for video use (such as on a PCjr or Tandy 1000).

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 11 of 37, by dionb

User metadata
Rank l33t
Rank
l33t
Scali wrote:

[...]

In general, 'VRAM' just means Video RAM, and basically just means "the memory that is connected to your video circuit". The term is also used in cases where the machine doesn't actually have physically different types of memory, but some part of the memory is just reserved for video use (such as on a PCjr or Tandy 1000).

Colloquially, perhaps - but here we're referring specifically to the dual-ported VRAM of the early 1990s, which should in theory perform better than DRAM, actually does so in Windows, but puzzlingly not in DOS, which we're trying to understand.

Reply 12 of 37, by Scali

User metadata
Rank l33t
Rank
l33t
dionb wrote:

Colloquially, perhaps - but here we're referring specifically to the dual-ported VRAM of the early 1990s, which should in theory perform better than DRAM, actually does so in Windows, but puzzlingly not in DOS, which we're trying to understand.

Well, my point was that this was not clear, so more specification is required (specific cards, configurations, clocks etc.. Even BIOS versions may make a difference).

Aside from that, it's not too difficult to understand, as Windows accesses the video card via drivers, which can include acceleration features.
In DOS, the video card is basically used as a 'dumb' framebuffer, so the access speed is only dependent on the interface from CPU to ISA/VLB/PCI bus and video memory.
In general, the CPU/bus does not have enough bandwidth to saturate the memory system on a fast (accelerated) videocard. Also, since the acceleration features are never used, the only accesses are from the CPU (generally write-only) and RAMDAC (read-only). So you only have a limited use-case.

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 13 of 37, by Anonymous Coward

User metadata
Rank l33t
Rank
l33t

I really get annoyed when people refer to the memory on their graphics card as "VRAM" unless it's the dual ported stuff from the early 90s. I can make an exception for WRAM and other types of dual ported memory, but stuff like DDR SDRAM is NOT VRAM.

Then you have those people who refer to all graphics cards as "VGA adapters".

I also don't like how some doofus decided that VGA = 640x480, SVGA=800x600, and XGA=1024x768 and so on.
Sorry, but 640x480 in more than 16 colours is SVGA, not VGA.

I especially want to kick whoever decided to redefine a megabyte as 1,000,000 bytes to make it metric, just so the hard drive industry could avoid lawsuits and continue lying to us. Plus "mebibyte" and "kibibyte" sounds retarded. Outside of wikipedia nobody uses these terms.

"Will the highways on the internets become more few?" -Gee Dubya
V'Ger XT|Upgraded AT|Ultimate 386|Super VL/EISA 486|SMP VL/EISA Pentium

Reply 14 of 37, by mpe

User metadata
Rank Member
Rank
Member
Anonymous Coward wrote:

I especially want to kick whoever decided to redefine a megabyte as 1,000,000 bytes to make it metric.

I have a little more sympathy for this that the other definition where one megabyte is defined as 1000 KB (or 1,024,000 Bytes).

Dependency Injection Blog||486DX-50 EISA|NexGen Nx586

Reply 15 of 37, by Tiido

User metadata
Rank Oldbie
Rank
Oldbie
Scali wrote:

I think VRAM has become an umbrella term for a variety of different memory technologies that happen to suit graphics well.

The original VRAM was indeed dual ported memory. Second port is serial access and designed for stuff like framebuffer readout for display purposes so that main port can be used to read/write the actual graphics data, this almost doubled your memory bandwidth on CPU end without needing FIFOs or caches etc.

SGRAM (and GDDR) have write masks in them, so that you do not need a Read-Modify-Write operation just to change some parts of a whole word. It probably matters for GUI acceleration to have such feature on the memory level but how exactly I wouldn't know. On other regards they seem to be pretty much normal SDRAMs. I haven't looked at timing data of SGRAMs but GDDR flavors all have enormous latency, SGRAM possibly does have increased latency also.

VRAM nowdays is just short for "Video RAM" and I actually use it as such a lot too, as technically incorrect as it may be 🤣.

T-04YBSC, a new YMF71x based sound card & Official VOGONS thread about it
Newly made 4MB 60ns 30pin SIMMs ~
mida sa loed ? nagunii aru ei saa 😜

Reply 16 of 37, by maxtherabbit

User metadata
Rank Oldbie
Rank
Oldbie
Anonymous Coward wrote:

I especially want to kick whoever decided to redefine a megabyte as 1,000,000 bytes to make it metric, just so the hard drive industry could avoid lawsuits and continue lying to us. Plus "mebibyte" and "kibibyte" sounds retarded. Outside of wikipedia nobody uses these terms.

yes. a megabyte is 1024kB and a kilobyte is 1024 bytes. anything else is turbo retarded

Reply 17 of 37, by Tiido

User metadata
Rank Oldbie
Rank
Oldbie

They should have added decimal notation thing instead. I refuse to use the mibs and kibs, if I want to express the decimal bytes I'll use MeB and KeB etc. instead

T-04YBSC, a new YMF71x based sound card & Official VOGONS thread about it
Newly made 4MB 60ns 30pin SIMMs ~
mida sa loed ? nagunii aru ei saa 😜

Reply 18 of 37, by Grzyb

User metadata
Rank Member
Rank
Member
Scali wrote:

In general, the CPU/bus does not have enough bandwidth to saturate the memory system on a fast (accelerated) videocard.

If the bottleneck was in the CPU/bus, then the video memory speed shouldn't matter.
But apparently it does matter, and in a surprising way: DRAM being faster than VRAM.

Anyway, I would like to see some benchmarks results, with all the details - in which modes was the phenomenon observable? Just 13h, or some high-res, high-color, high-refresh modes as well?

Reply 19 of 37, by Scali

User metadata
Rank l33t
Rank
l33t
Grzyb wrote:

If the bottleneck was in the CPU/bus, then the video memory speed shouldn't matter.
But apparently it does matter, and in a surprising way: DRAM being faster than VRAM.

The question is: By how much?
And then the next question is: what is the root cause?
The explanation given earlier, that VRAM has increased latency, seems like a plausible one.
A CPU/bus cannot saturate the bandwidth of the memory, which means that you can rule out bandwidth as a cause.
Additional latency could be a plausible explanation. Another thing could be that the bandwidth 'on paper' is from burst transfers, which don't work effectively when you are performing writes from the CPU/bus at a slower speed.

I would only expect marginal differences anyway.

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/