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


  1. Posts : 26
    win 7, R2
       #1

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


    To prevent thread drift in 35-60% of my memory is MIA.. help me find it!, I've moved the non OP topics to this one.


    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.




    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?




    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.




    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..




    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


  2. Posts : 26
    win 7, R2
    Thread Starter
       #2

    mushroomboy said:
    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.



    mushroomboy said:
    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.

    mushroomboy said:
    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?






    mushroomboy said:
    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.



    mushroomboy said:
    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.



    mushroomboy said:
    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.



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


  3. Posts : 41
    Windows 7 Ultimate x64 (RTM)
       #3

    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


  4. Posts : 26
    win 7, R2
    Thread Starter
       #4

    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.


    MaliciousOne said:
    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


  5. Posts : 3,322
    Windows 8.1 Pro x64
       #5

    charles3 said:

    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


  6. Posts : 6,885
    Windows 7 Ultimate x64, Mint 9
       #6

    Everlong18 said:
    charles3 said:

    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


  7. Posts : 26
    win 7, R2
    Thread Starter
       #7

    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
    Attached Thumbnails Attached Thumbnails Win 7 , MMIO and Video/device memory use, in system mem-laptop-vid-system-mem-use.gif   Win 7 , MMIO and Video/device memory use, in system mem-vid-sharedsys-win7-1.gif  
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 17:26.
Find Us