Win 7 , MMIO and Video/device memory use, in system mem

charles3

New member
Local time
8:29 AM
Messages
26
To prevent thread drift in http://www.sevenforums.com/performa...-my-memory-mia-help-me-find-3.html#post403581, I've moved the non OP topics to this one.


q.gif
Quote: Originally Posted by mushroomboy
What your saying is my 512MB GFX card gets mirrored? I only have 1G in the system right now, if I'm running a game that utalizes all 512MB of gfx, plus the 60% plus the 450MB the program is using... That's somewhere around 1.5 to 2G that's being used when I game.......... I know I've got a paige file but damn that doesn't have sound math there.


In reality the math is quite sound, Take a look at how “backwards compatible” hardware is, and how old ways of doing things have stuck with us for years long after they should have died a painful death.

your vid card does use 512Mb of memory, check out your Device Manager, first view hidden devices, then (Device Manager, View -> Resources By Type) , and look at all the little things taking up memory. Look at memory and IO each and every little thing in there is a bit of communication with another device if you map the ranges, you will find some gaps, and some intentional overlaps. All that is how your machine works.



Quote:
I only see X GB of ram, but I have 4GB, what is wrong with my memory? - OCZ Forum
The computer reserves blocks of MMIO addresses for Video RAM, then buses, bridges, BIOS, then DRAM.




q.gif
Quote: Originally Posted by mushroomboy
. Basically if your theory held true if you had a 2G video card and 2G onboard then where is the computers ram!? Gone because you have to mirror the video cards image so it knows what to see?


yep, it happens in real life, you have a machine with so little usable memory in real life that it swaps to disk whenever you try to run anything.

Lets see what Microsoft says about memory mapping, and how it relates to usable memory.



Quote:
The system memory that is reported in the System Information dialog box in Windows Vista is less than you expect if 4 GB of RAM is installed
For example, if you have a video card that has 256 MB of onboard memory, that memory must be mapped within the first 4 GB of address space. If 4 GB of system memory is already installed, part of that address space must be reserved by the graphics memory mapping. Graphics memory mapping overwrites a part of the system memory. These conditions reduce the total amount of system memory that is available to the operating system.
...
the total system memory that is available to the operating system is always less than the physical RAM that is installed



how about the mac-vs pc argument when apple had 64 bit support, and PC's 64 bit support sucked?

Quote:
AppleInsider | Road to Mac OS X Snow Leopard: 64-bits, Santa Rosa, and more
OEMs will encourage customers to upgrade a 2GB machine to 4GB, even though the usable RAM might be limited to 2.3GB. This is especially a problem on high-end gaming machines that have huge graphics cards as well as lots of RAM."






Go to Device Manager, View -> Resources By Connection . Then do the math for your system and see how much memory each item is sucking up.


Quote:
Ask Dan: What's with the 3Gb memory barrier?
4Gb of RAM, and a pair of Nvidia's oddball 1Gb GeForce 7950 GX2 cards. Result: 56.25% of the installed memory absent without leave. You might as well have only bought 2Gb



Are all these people from the past so wrong about how pc hardware works? Or has Windows 7 changed the fundamentals of how computer hardware works?




q.gif
Quote: Originally Posted by mushroomboy
It's independent, just as off board sound was created so the computer doesn't spend resources on sound. It's ingenious! adding external devices so that we don't have our CPU do the work!? What shall we call these devices? PCI!? GREAT!!!




yep, that's the physical structure/protocol but HOW do you move things around, where does the CPU write the bits that get moved? Where does the vid/sound card READ the bits from? It all has to get stored someplace...



computer does spend resources on sound, and other things, just not as much if the device is “hardware” vs “ a port on a stick”


Quote:
Softmodem - Wikipedia, the free encyclopedia
A Softmodem, or software modem, is a modem with minimal hardware capacities, designed to use a host computer's resources (mostly CPU power and RAM but sometimes even audio hardware) to perform most of the tasks performed by dedicated hardware in a traditional modem.



other things like non hardware raid, soft soundcards, USB , and other stuff uses the cpu/mem to get the job done. if your moving a few hundred gigs of data across a USB port you will see more CPU usage than if you used the same speed fireware, because 1394 does more "in hardware" than USB.




q.gif
Quote: Originally Posted by mushroomboy
[edit] Infact, what happens if you have a video card with more ram than the PC!? OMG We created a problem!


you can “lock up” the pc during boot (POST fail), or the vid card will not have “all” the memory on it in use.
if you want to try and see what happens when you have a vid card outstrip your memory, get a couple of Newegg.com - PNY VCQFX5800-PCIE-PB Quadro FX5800 4GB 512-bit GDDR3 PCI Express 2.0 x16 SLI Supported Workstation Video Card - Workstation Graphics / Video Cards and be sure to disable swap (if it will let ya) and see what happens..




q.gif
Quote: Originally Posted by mushroomboy
Think outside the box. Sometimes the better answers are so crazy they just work.


see if your explanation, or my explanation works in real life, how does the data get transferred from one device to another? Lots of ways, one of those ways is the memory location.


once more, are all these people from the past so wrong about how pc hardware works? Or has Windows 7 changed the fundamentals of how computer hardware works?

Even Wikipedia has some good stuff on this very issue

Quote:
Memory-mapped I/O - Wikipedia, the free encyclopedia
Memory-mapped I/O (MMIO) and port I/O (also called port-mapped I/O or PMIO) are two complementary methods of performing input/output between the CPU and peripheral devices in a computer.




Quote:
Framebuffer - Wikipedia, the free encyclopedia
While framebuffers are commonly accessed via a memory mapping directly to the CPU memory space, this is not the only method by which they may be accessed.




Toms hardware has this very same question answered... in 2007...

Quote:
http://www.tomshardware.com/forum/243662-30-does-video-card-count-system-memory
tlreaves 07-17-2007 at 08:39:44 PM
To answer your question, yes the video card memory shows up as system memory in the strictest sense of the word.

But when you have 2GB of physical memory, and your video card has 768MB, and windows is assigning the rest to your sound card, pci busses, etc... there are no addresses left over for your extra RAM to operate. This is why 32-bit XP usually does not "register" more than 3.2-3.5 GB of physical memory.
 

My Computer My Computer

At a glance

win 7, R24x 88564gbgeneric pny 9500gt
OS
win 7, R2
CPU
4x 885
Motherboard
uniwide
Memory
64gb
Graphics Card(s)
generic pny 9500gt
Sound Card
road7
Monitor(s) Displays
generic
Screen Resolution
80 columns
Hard Drives
4x 300gb raid0
PSU
3x500w , hot swap
Case
, nut
Cooling
, very
Keyboard
qwerty
Mouse
, eak, a!
Internet Speed
70 baud
Yes but the paigefile isn't active,
Just set your pagefile.sys to reside on a different drive, and it will get accessed “once in a while” even if you have plenty of memory free. It will get hit hard when you run out of physical memory, but it is accessed once in a while.



Yes but the paigefile isn't active,as it shouldn't be reported as % of physical memory.
The page file is on a disk, and is “overflow” for ram. One of the things that a page file brings to the table, is that programs can address it just like physical memory.
If your theory is that windows pagefile.sys never gets hit, feel free to set it to something like a usb drive, and do a bit level compare. It does change from time to time.
Better yet, set it to a memory card that can be write protected by flipping a switch, and see how stable your system gets.

I know things go to paigefile, but what's active in the card isn't exactly mirrored or what's active in your system memory.
That's correct, big memory users (like vid cards) start out at a given “small” chunk, and then arrange for more, this is a something is complex to explain to people who may not care about the nitty gritty.



They rarely discuss memory to this depth in the nvidia or ati/amd (or is is daamit these days) boards.



Microsoft issues significant fix for Vista graphics memory overflows
the virtualized graphics memory came out of the same 2GB pool as the application, which was especially RAM-hungry with the most powerful graphics cards such as a 1GB Radeon X2900XT. As both the application and virtual graphics memory driver fought for RAM, the two would sometimes run out of space. The hotfix attempts to mitigate this problem by only creating a virtual graphics memory space if an application specifically demands it, a process Microsoft calls "lockable." With the fix applied, only lockable applications can generate a virtual graphics memory space.



That is the key phrase “ only lockable applications can generate a virtual graphics memory space” . before that fix, memory would be body slammed with the address space requirement, now things can be talked about.
So we now have some more “on demand” memory that , if all your game playing is “hunt the wumpus” the card and the system do not allocate much memory, Cryostasis, it takes up more.
This is part of the memory management that took a long time to get right, and it should be the way things are for the next while.



Your running 1g of memory, can win7 64 install on something that small?






I'm just saying as far as active memory goes there is a reason why we created expansion slots.



I don't get how the expansion slots fit into the conversation about MMIO, other than their location in allocated memory.



it's just wrong to tell them they need more physical memory and that it's mirrored like that.



I've given you some article references on this design issue, posted how you can look at this info on your own system, and I'd like some proof on how all these other people, and I, have been wrong all these years. Win7 is the first “main” 64 bit system, and it is built on years of 64 bit debugging, both from a end user (workstation) and a server background. Part of the drive for going to 64 bit was the memory limits that at first a few people, (scientists then artists, now the rest of us) run into. When your vid card costs 10k, and the box you are running it on costs 50k , its a different league vs a desktop home build.



These memory limitations are very well known, and started to be addressed a long time ago when microsoft released a work around that would let 32 bit windows 2000 servers address more than 4gb.



Your paigefile is usually data that is accessed more frequently but not enough to be in physical ram.
The last system that used “access time” as a way to determine if things should go from physical to disk was sun, about 25 years ago. It was a horrible system that nobody has tried since. You would go to lunch, and the memory contents would be swapped to disk (because you weren't using them), then you come back from lunch, move the mouse and wait 5 min for things to get swapped from disk, BACK to memory because of the time out.



Today, if you have enough physical memory, the only time the pagefile.sys file gets hit is for an occasional update.



I know how this all works, but it's not a mirror.
Please cite and share with the rest of us.
 

My Computer My Computer

At a glance

win 7, R24x 88564gbgeneric pny 9500gt
OS
win 7, R2
CPU
4x 885
Motherboard
uniwide
Memory
64gb
Graphics Card(s)
generic pny 9500gt
Sound Card
road7
Monitor(s) Displays
generic
Screen Resolution
80 columns
Hard Drives
4x 300gb raid0
PSU
3x500w , hot swap
Case
, nut
Cooling
, very
Keyboard
qwerty
Mouse
, eak, a!
Internet Speed
70 baud
Charles.....
If you think it's mirrored how can I run tri-sli gtx 295's(thats 5.25gb of video ram) on a pc with only 3gb of system memory?
 

My Computer My Computer

At a glance

Windows 7 Ultimate x64 (RTM)Phenom II 955 @ 3.93ghz8gb Corsair XMS DDR3 @ 1750mhz NorthBridge@30...NVIDIA GeForce GTX 295
Computer Manufacturer/Model Number
Home Grown
OS
Windows 7 Ultimate x64 (RTM)
CPU
Phenom II 955 @ 3.93ghz
Motherboard
GA-MA790XT-UD4P
Memory
8gb Corsair XMS DDR3 @ 1750mhz NorthBridge@3023mhz
Graphics Card(s)
NVIDIA GeForce GTX 295
PSU
Antec 750w
Cooling
Zalman 9900
Keyboard
Logitech G15
Mouse
Microsoft Sidewinder
Internet Speed
16/down 8/up
Think of vid card being kinda like being a small system. It has memory section, a CPU section, i/o programming, etc.


The communication between the system memory goes kinda like this, you draw a stick figure (with additional data) in memory, that information gets mirrored into video memory, once that stick figure is in the fast vid card memory, the basic image can be combined with the additional information,(from the system memory) to do all the “work” in transforming the simple image into the monalisa.


If you playing a simple game, like “hunt the wumpus” , the negotiation between the vid card and the system reserves a tiny bit of memory, both in the system, and on the card. The card then uses an additional amount of additional memory within the card to “make things pretty”, however the majority of the memory in the card is not in active use.


Just like your home pc doesn't use all its memory playing minesweeper.


If you have a 4 gig system running a 32 bit version of XP you can use the following tools to see the amount of memory in use, VidMemWatch , RivaTuner with GPUMonitor, or you can download nvidias debug tool, PerfHUD ( if you can run software with the debug code in place ).


this is prefhud running http://www.youtube.com/watch?v=S3_fP3-psJY
Please post your results for us to see.


how can I run tri-sli gtx 295's(thats 5.25gb of video ram) on a pc with only 3gb of system memory?


The answer is simple, the memory assignments start out small, then fill up bit by bit until they run out, just like on your PC. Pity your just getting this info now, to a problem known ages ago (1980's), and well publicized for a few years prior to the release of win7. This was one of the tipping points behind the big push to “go 64”, check out this article from 2008.




bit-tech.net | Review - Is More Memory Better?
As you may or may not know, 32-bit operating systems are limited to addressing a maximum memory size of 4,294,967,296 bytes, or "4GB" in more normal terms. However, this 4GB is shared between all MMIO (Memory-Mapped Input Output) devices - this includes graphics cards. Therefore, that nice, shiny new 512MB graphics card you've just bought limits your entire system memory use to just 3.5GB. What about the newest Nvidia GeForce 280 GTX with 1GB of GDDR3? That'll reduce your system memory to just 3GB.




Did you expect to use all 5.25 gigs in a 4gig getup effectively? If so it sounds like you weren't very diligent in your research.
 

My Computer My Computer

At a glance

win 7, R24x 88564gbgeneric pny 9500gt
OS
win 7, R2
CPU
4x 885
Motherboard
uniwide
Memory
64gb
Graphics Card(s)
generic pny 9500gt
Sound Card
road7
Monitor(s) Displays
generic
Screen Resolution
80 columns
Hard Drives
4x 300gb raid0
PSU
3x500w , hot swap
Case
, nut
Cooling
, very
Keyboard
qwerty
Mouse
, eak, a!
Internet Speed
70 baud
bit-tech.net | Review - Is More Memory Better?
As you may or may not know, 32-bit operating systems are limited to addressing a maximum memory size of 4,294,967,296 bytes, or "4GB" in more normal terms. However, this 4GB is shared between all MMIO (Memory-Mapped Input Output) devices - this includes graphics cards. Therefore, that nice, shiny new 512MB graphics card you've just bought limits your entire system memory use to just 3.5GB. What about the newest Nvidia GeForce 280 GTX with 1GB of GDDR3? That'll reduce your system memory to just 3GB.




Did you expect to use all 5.25 gigs in a 4gig getup effectively? If so it sounds like you weren't very diligent in your research.

I think you're confusing address space used by the video card with RAM used by the video card. In a 32 bit system, the video card memory will be mapped in to the 4GB address space, but this isn't the case in a 64 bit system. If you have 4GB on a 64 bit system, all of it should be addressable as RAM, and the video card memory will be mapped somewhere else.

Looking at MalciousOne's system specs, he has 64 bit Windows, so the quote off of bit-tech doesn't really apply to what he said. If he did have only 3GB of RAM and 5GB of VRAM, there'd be no affect on the overall stability of the system whatsoever as the two aren't related.
 

My Computer My Computer

At a glance

Windows 8.1 Pro x64Intel Core i7 4790k8GB Corsair Dominator 1600MHzMSI TwinFrozr GeForce GTX770
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom Built
OS
Windows 8.1 Pro x64
CPU
Intel Core i7 4790k
Motherboard
MSI Z97S Krait Edition
Memory
8GB Corsair Dominator 1600MHz
Graphics Card(s)
MSI TwinFrozr GeForce GTX770
Sound Card
ASUS Xonar DX/XD 7.1
Monitor(s) Displays
Dell 24" S2409W + Dell 20" E207WFP
Screen Resolution
1920x1080 + 1680x1050
Hard Drives
1x 120GB OCZ Agility 3, 1x 750GB Western Digital Caviar Black, 1x 1TB Western Digital Caviar Blue
PSU
Corsair HX850 modular
Case
Fractal Design Define R4
Cooling
Corsair H60 w/ twin Corsair SP120 fans
Keyboard
Logitech G510S Keyboard
Mouse
Logitech G500S Laser Mouse
Internet Speed
40Mbps
Antivirus
Microsoft Security Essentials
Browser
Google Chrome
Other Info
LG Blu-Ray player
bit-tech.net | Review - Is More Memory Better?
As you may or may not know, 32-bit operating systems are limited to addressing a maximum memory size of 4,294,967,296 bytes, or "4GB" in more normal terms. However, this 4GB is shared between all MMIO (Memory-Mapped Input Output) devices - this includes graphics cards. Therefore, that nice, shiny new 512MB graphics card you've just bought limits your entire system memory use to just 3.5GB. What about the newest Nvidia GeForce 280 GTX with 1GB of GDDR3? That'll reduce your system memory to just 3GB.


Did you expect to use all 5.25 gigs in a 4gig getup effectively? If so it sounds like you weren't very diligent in your research.

I think you're confusing address space used by the video card with RAM used by the video card. In a 32 bit system, the video card memory will be mapped in to the 4GB address space, but this isn't the case in a 64 bit system. If you have 4GB on a 64 bit system, all of it should be addressable as RAM, and the video card memory will be mapped somewhere else.

Looking at MalciousOne's system specs, he has 64 bit Windows, so the quote off of bit-tech doesn't really apply to what he said. If he did have only 3GB of RAM and 5GB of VRAM, there'd be no affect on the overall stability of the system whatsoever as the two aren't related.
Right. Charles, you seem to think that the amount of memory a GPU card has is merely what it takes from the system RAM. Which is wrong. GPU memory is ON THE CARD. It is in ADDITION to system RAM. It is used for Video processes, thus freeing up MORE RAM for the system. Doing it the way you said is pointless.

~Lordbob
 

My Computer My Computer

At a glance

Windows 7 Ultimate x64, Mint 9Intel i5-2500k2x 4Gb Corsair VENGEANCE DDR3-1600NVidia GeForce N260GTX Twin Frozr
Computer Manufacturer/Model Number
Hera
OS
Windows 7 Ultimate x64, Mint 9
CPU
Intel i5-2500k
Motherboard
ASUS P8P67 Pro
Memory
2x 4Gb Corsair VENGEANCE DDR3-1600
Graphics Card(s)
NVidia GeForce N260GTX Twin Frozr
Sound Card
Realtek HD OnBoard Audio
Monitor(s) Displays
ASUS 24" Monitor
Screen Resolution
1920x1080
Hard Drives
G.SKILL Phoenix Series 60GB SATA II MLC Internal Solid State Drive (SSD)
SAMSUNG Spinpoint F3R 1TB 7200 RPM 32MB Cache SATA II
PSU
Cooler Master Real Power Pro 750W
Case
Cooler Master Haf 932
Cooling
Fans
Keyboard
Razer Tarantula
Mouse
Razer Lachesis
Internet Speed
not fast enough
Dude? Where's my memory!

Windows7 is pretty smart in how it manages video memory in system space, smarter than vista and XP, it has to be. Memory on vid cards is getting to the point where the old ways just weren't cutting it anymore. On screen patterns were getting more complex, at higher resolutions, and with vid cards having more video memory, combined with applications using more and more memory, something had to give.



NVIDIA is pretty good at grabbing more memory from the system, it has a utility called turbocache
NVIDIA TurboCache
allowing the graphics processing unit (GPU) to share the capacity and bandwidth of dedicated video memory and dynamically available system memory, TurboCache turbocharges performance and provides larger total graphics memory.


TurboCache can be pretty aggressive , as the screen shots indicate, and its pretty obvious that “shared system memory” comes from the systems memory.

WDDM is also pretty good about allocating and offloading stuff from video memory.

Windows Display Driver Model - Wikipedia, the free encyclopedia
WDDM drivers allow video memory to be virtualized , and video data to be paged out of video memory into system RAM. In case the video memory available turns out to be insufficient to store all the video data and textures, currently unused data is moved out to system RAM or to the disk. When the swapped out data is needed, it is fetched back.

Incredible and as difficult as it might be to imagine, there are certain situations where stuff in video memory gets swapped down all the way to disk, and then all the way back up to vid memory. This is done so that as a system slows down, it doesn't crash or hang. In other words, it fails gracefully, in a way it can recover.


WDDM and TurboCache do overlap a bit, but in general unless your running under 2 gig of system memory, or over 1 gig of vid memory, (or around there abouts) , it does not matter that much.


The changes and updates to WDDM have enabled LESS memory to be used when dealing with large vid/graphic memory sets. Unfortunately that has arrived with larger and more complex display requirements, QHD and at some point UHDV.

Windows 7 Way Smarter With Graphics RAM - Tom's Hardware
“The elimination of the duplicate system memory copies which ‘speed up’ certain operations introduced slightly reduced performance as the CPU now has to read data back from the video memory. An analysis of real-world application statistics showed that these operations were rare,” Chitre said. “Our observation has been that these slow-downs do not impact the end-user functionality directly and that the memory savings directly result in Windows 7 being much responsive overall.”


What they are saying above is that there were multiple copies of what was in video memory, placed in system memory so that things could be worked on. They stopped doing that, and the reward of more system memory outweighed the penalties of having to “tipple fetch”something.

There are few references available on this , and those that are, happen to be out of date, overly complex and off target, or otherwise non applicable. (such as)
http://www.microsoft.com/whdc/device/display/graphicsmemory.mspx is an older reference that does contain some hints for programmers, but its outdated, and i've been reluctant to reference, it is out of date, and may bring more questions out than answers. http://people.redhat.com/drepper/cpumemory.pdf is an incredibly detailed account on the hows and whys of memory , but at 117 pages long, people might get lost in relating “Cache Effects” to the topic at hand.



Memory management in x86 computers is a niche subject that is not for everyone, and can be tough for people who haven't been dealing with it for a while to understand. If you have a specific question that the links don't answer, please ask it.

So if you disagree, please post something that backs up your theory, like reference works, screen shots, academic papers, something other than “no it isn't” . http://video.google.com/videoplay?docid=-572077907195969915&ei=rQYSS6HfIYjUqQLFxL26Dg
 

Attachments

  • laptop-vid-system-mem-use.gif
    laptop-vid-system-mem-use.gif
    37.2 KB · Views: 52
  • vid-sharedsys,win7-1.gif
    vid-sharedsys,win7-1.gif
    81.1 KB · Views: 55

My Computer My Computer

At a glance

win 7, R24x 88564gbgeneric pny 9500gt
OS
win 7, R2
CPU
4x 885
Motherboard
uniwide
Memory
64gb
Graphics Card(s)
generic pny 9500gt
Sound Card
road7
Monitor(s) Displays
generic
Screen Resolution
80 columns
Hard Drives
4x 300gb raid0
PSU
3x500w , hot swap
Case
, nut
Cooling
, very
Keyboard
qwerty
Mouse
, eak, a!
Internet Speed
70 baud
Back
Top