Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×
Hardware

Convert Unneeded VRAM Into A Storage Device 244

Pawel Kot writes "Have you ever thought why does your graphics card has so much memory? Do You think you have not enough RAM or awfully slow swap file? Do you need fast ram-disk or diskless machine? Go for it! Take one of these cheap 128MB graphics cards and enjoy the speed. Michal Schulz wrote a good description on how to take the advantage of not used video card memory."
This discussion has been archived. No new comments can be posted.

Convert Unneeded VRAM Into A Storage Device

Comments Filter:
  • by Julius X ( 14690 ) on Monday September 02, 2002 @07:29PM (#4186118) Homepage
    Isn't this a bit wasteful? I mean you can buy 128mb of memory for a LOT cheaper than one of those "ultra cheap 128mb graphics cards".

    I'll stick with buying RAM and using my graphics card for what it was designed for. Besides...this only applies to X users anyway.
    • It's art irony and hacking in one....

      Rock on :)
      • The art would be improved if there was some way to use the memory as a display buffer AND as a disk. I think it might look pretty neat to watch a grep -r work on that puppy.
        • Word. I would love to fire up an Xvnc in monochrome mode and crunch away at Life32. Who needs DirectX 8 now, Microsoft? :)
          • Well, I have 128 MB graphics card running at 350 MHz or something. What I would like to do is use that ram and idle cycles to work on folding@home or something like that.

            There has to be some kind of seti-style challenge which could be optimized for the types of calculations that a good graphics card does. Anyone?
        • The art would be improved if there was some way to use the memory as a display buffer AND as a disk. I think it might look pretty neat to watch a grep -r work on that puppy.

          Reading from a display buffer doesn't affect what you see, so nothing would visibly happen during the grep.

          • Reading from a display buffer doesn't affect what you see, so nothing would visibly happen during the grep.

            One good pedantic answer deserves another:

            If the inode table were onscreen, the "last access" date would be getting reset all over the place.

            (Incidently, I used to run programs on the Apple ][ like this - flip over to hgr or gr and watch them execute).

            --
            Evan (no reference)

    • if people are going to have a computer come w/a video card that has 64mb of VRAM or they have only part time need for VRAM then they can use this as a fast alternative to physical space for swap.
    • i think this technique is for the geel of it, not really for the practicality.

      its one of those mountains geeks climb because its there.

    • From the article, (slightly modified). My karma is capped anyway, so...

      What the hell can I do with that?

      Well, many things. When I was thinking about it, I have found two ways to use it. One of them is making any filesystem on that and mounting it somewhere, the other is more sophisticated:
      meehow:~# mkswap /dev/mtdblock0
      meehow:~# swapon /dev/mtdblock0

      Later on, more possibilities occur. You can use this methon in X11 terminals, to limit network bandwitch for example. During bootup such terminal would load kernel and compressed filesystem. The FS may be placed then on such mtdblock device and kernel may boot from it. Using console-only server with some kind of modern 32MB gfx card may use the vram as huge swap (which is way faster than swap on disk). New ideas are welcome :)
    • by Anonymous Coward
      What if all banks or the memory addressable by the controller are filled? This is a nifty little solution. I currently have a slightly older machine that is maxed with 768 megs of PC133 memory (3 banks, max support 256 per bank).

      It's currently being employed as a database and fileserver. There is a possible project coming up where the database will be quite a bit larger--768 will probably be used up--but this is not really essential. A ramdisk may be necessary. I could go out and buy a new machine, but I don't have to. I could use this fun method. This is a nifty solution for a ramdisk.

      Are there any PCI cards on the market that are made just for this purpose? e.g. not a video card, but just a PCI card with DDR or DIMM banks and maybe a controller (not talking about those cpu/dimm pci machine on a card setups).
      • I'd love to know that as well--I'd never thought of that. I can't find RAM that'll fit in my system right now. Supposedly my system is using PC2100 DIMM RDRAM, but when I buy that it doesn't seem to fit. A PCI card like you mention would work nicely to allow for multiple types of RAM. The only problem I foresee is that PCI cards are kind of close together and there might not be room to put extra RAM in either the top or bottom of the card. I'm sure there are ways to work around this though.
    • by Anonymous Coward
      Here's some instances...

      I just happen to have a nVidia geForce2go which I'm using in vesa mode becasue the nvidia module is proprietary...

      Now I can swap to the video memory I'm not using and put that memory to use.

      How about using that video memory for /tmp on headless servers? (Its common to leave a video card in headless servers for maintanance).

      I just don't understand why people are so negative when people have come up with a new way to show just how flexible the linux kernel can be... just because some feature doesn't meet your needs doesn't mean it doesn't meet mine.

      If you want a one size fit all solution, then try some of those companies in the northwest part of the country.
      • I just don't understand why people are so negative...

        Sort of like when the guy cut and pasted an advertisement as a Slashdot article, it's the spirit of the submission that leads to the likely response. In this case the submission basically argues that one should use a "cheap 128MB video card" as RAM, yet in my neck of the woods I can buy over a GB of DDR333 RAM for less than I can buy a 128MB videocard. It just was a really nonsensical way of wording that.
    • Have you checked Pricewatch? In my experience videocard prices fall faster than RAM, especially VRAM. Not to mention the fact that being on an PCI-X bus (64-bit 66MHz instead of the traditional 32-bit 33MHz) more than doubles your memory bandwidth compared to conventional SDR. Run some benchmarks, then we'll talk.
    • by jareds ( 100340 ) on Monday September 02, 2002 @08:03PM (#4186273)

      Besides...this only applies to X users anyway.

      That's not true. You don't need to use X to do this, you just need a video card. In fact, if you're just using the machine in console mode, you may as well use your video memory for swap or something.

    • Isn't this a bit wasteful?
      It would be if you bought the card for the express purpose of using the VRAM that way. When I saw this, I had a flashback. When I was using DOS 5/6, with the then-revolutionary ability to remap memory into Upper Memory Blocks between the ROMs and VRAM, I ran into a problem using that memory.

      Most of the drivers and TSRs that I wanted to load in the space originally allocated for monochrome video (a 32K block between B0000 and B7FFF) required more space to load than to run so I came up with the solution of 'borrowing' some VRAM and wrote the Video Hole package to do just that. I used a BIOS call to change the display page from 0 to 6 (for reasons I never quite understood, 7 didn't work on my old Trident 8900) and 'borrowed' 24000 bytes (6 pages of VRAM) from the VRAM to allow a program (say MSCDEX?) to fit in there, then 'recalled' the loan, changing back to page 0. That extra 24K more than took care of the transient portion of a lot of programs that otherwise couldn't use the Video Hole.

      I don't know if anyone else ever used the darned thing (nobody ever sent me the $5 shareware fee for doing so) but it got uploaded to a bunch of BBSes and works in the real mode phase of Win95 and 98 - if you have hardware with real mode drivers that don't know how to load low and relocate the resident portion high, it will do the job fine.

      • Although Alan Kay et. al. designed the Xerox Alto [spies.com] to use 80% of its resources for the Graphical User Interface (the real innovation -- understanding that the purpose of the computer is its user interface), SmallTalk needed extra memory and used the bottom part of the screen video memory for its stack. As a result, you could see when something crashed or went into infinite recursion.
    • Isn't this a bit wasteful? I mean you can buy 128mb of memory for a LOT cheaper than one of those "ultra cheap 128mb graphics cards".

      sometimes we get servers thrown in our laps that already have gfx cards which aren't needed. my last Sun came with 128mb video card plus an onboard 64mb card. i don't use either one since i use serial console on the thing.

      I'm working on cd's that will install themselves into memory filesystems [blackant.net]. Problem is, to get a decent set of apps i need a lot of memory. Using vram would be very nice, maybe not for a machine that i would spec out since i'd buy it with enough RAM, but what about borrowing/hijacking machines? Imagine using this cd to go to library, boot computer from cd, cd ejects (so there's no trace of you since upon reboot, mem is wiped), you walk on. what you left behind: a machine running gnutella and using memory file systems to store files on. getting more space from the vram would be essential.

    • by JohnsonWax ( 195390 ) on Monday September 02, 2002 @09:10PM (#4186546)
      Basically Apple is finding a use for all of that VRAM while users are futzing around not playing 3D games. Granted, it's finding interesting ways to accelerate 2D video and using the AGP to pull from main RAM as well, but it's in the same sprit as stuffing random data in there.

      Rather than buy an extra card for this purpose, the question to ask is how much of that 128MB am I using day-to-day. If the answer is *none* (as Apple determined) then this is a good thing.
    • No, this is a great idea. My main machine dual boots, Linux for work, 98se for games. Since I use the XFree nv driver, there's a bit chunk of memory in my video card that's doing nothing. Hey, shit, most of my video card is doing nothing but I digress.

      So I can swap onto it. Or use it for /tmp or something. Great idea.

      BTW, geek challenge: Use opengl2 shader instructions to do something useful other than accelerate games - bit parallel math cruches for compression video, say. Or crack DES3.

      Dave
  • Dur... (Score:5, Insightful)

    by Loligo ( 12021 ) on Monday September 02, 2002 @07:29PM (#4186120) Homepage

    If you're THAT low on memory, you're not likely to have a 128 meg video card.

    Or a 64 meg card, even.

    -l
  • by Kragg ( 300602 ) on Monday September 02, 2002 @07:30PM (#4186122) Journal
    Cool! Finally I have somewhere to store my Quake 3 savegames - on the spare memory of my laptop's 16meg graphics card!

    Or maybe not...
    • Yeah, it would be a great idea. I really like how when you would restart your computer, it automatically would remove all those disc cluttering save game files.
  • I think on a megabyte to megabyte basis, RAM is far cheaper than VRAM. This has a high coolness factor, but a very low usefulness factor. Unless all your memory slots are broken (like the ones in my old mothrboard)
    • While they use the term "VRAM", harkening back to the days when you could get a DRAM or VRAM equipped Virge 3D (the VRAMs were better, if only because they allowed for higher refresh rates at higher resolutions), I think they only mean "using the RAM on your video card as main system RAM", and of course most video cards come with DDR RAM these days.
  • Chances are... (Score:3, Interesting)

    by thelinuxking ( 574760 ) on Monday September 02, 2002 @07:31PM (#4186133)
    If you HAVE a new 128 mb video card (which isn't that cheap!), you probably also have a fast processor and motherboard, and lots of memory anyway.

    I strongly doubt you would buy a fast processor with an agp motherboard (needed for the card), and desperately needed memory so badly, that you take from the 128 mb video card.
    • Well there actually are some that are fairly cheap. They are just basic accelerators with minimal capabilites and a lot of RAM. Not sure why you'd want one, but you can get them for like $40-$50, made by SiS.

      Of course this is still more expensive than all RAM except for RDRAM (which is about the same price) so is still silly. And yes, most people who oen 128MB video cards own something like a GeForce 4 and can thereofr afford to back that up with plenty of system RAM.
    • Who cares? its something to do while waiting for the next linux kernel release to appear. Oh, and it is nice for machines with which you dont use the graphics card at all (which came with one for some reason) - like those which just sit there being all firewally and only ever get poked by a serial console when things go bad.
    • Nevermind that 128 meg cards are not quite as cheap as the author alludes. If a man came up to you on the street and offered you a 64 or 128 megabyte DIMM, of proper type for your system, would you not take it home, plug it in, and enjoy it, all while being thankful for the most fortunate occasion?

      Not long ago, I built a new Athlon XP desktop box (Win98, non-taxing business apps and light browsing) with a 64 meg S3 card, with s-video and composite NTSC outputs, some motion compensation bullshit, and terrible 3D performance. My old V3 2000 smoked it on just about everything during a comparative burn-in session, with a K6-2.

      The V3 has 16 megs of RAM. The S3 has four times as much. And since it's nearly useless for anything OpenGL and it's driving a fixed 1024x768 LCD, it's never going to use more than 4 megs of that RAM for a framebuffer.

      I picked the S3 because it was -cheap-. Cheaper than 32meg nVidia cards, cheaper than off-brand Voodoo3 cards made in Korea with surplus, post-nVidia GPUs, cheaper than Trident, cheaper than a Riva128 or a 2 meg Matrox, or any of ATi's available offerings.

      I realize that S3 is dead, and will always be (thanks, SonicBlue - and I'll never have an empeg now, either). But the driver is stable, and the machine will be running the same install of 98 until some catastrophic hardware failure makes cause for something different. As long as it performs acceptably with IE's smooth scrolling features, and the wind-up start menu included with 98SE, all is golden.

      So, cheap&stable is the order of the day.

      If I were building a headless Linux box instead of a more interactive machine, I'd have chosen the same card. I reiterate: I could not find a cheaper AGP video card from any retailer that I was purchasing other items from. (gotta factor in shipping costs, yaknow...)

      Getting ~60 megs of really fucking fast swapspace -for free- sounds like a winner, to me. And if you still think it's a bad idea, search Slashdot for old discussions of using CompactFlash cards as swap. Talk about silly, expensive means of adding virtual RAM...

      I'd run something like this in a heartbeat on a headless machine, or one not destined for 3D work. Noone needs 16 megs, let alone 32, 64, or 128 just for a framebuffer. Might as well do something useful with it, even if it is slightly more expensive than an equal-capacity DIMM.

      It is, once again, free.
  • is it just me, but as i was trying to decipher the english in the post, i could just hear him saying, "Hi, have you ever thought why does your graphic card has so much memory?"

    i usually could care, but this post reads like ghetto yoda.

  • by ergo98 ( 9391 ) on Monday September 02, 2002 @07:33PM (#4186140) Homepage Journal
    ...How to use that "cheap" P4 as a, err, inexpensive coffee warmer.
  • Have you ever thought why does your graphics card has so much memory?

    No, I haven't. That's probably because I think in proper English. "Why does your graphics card has so much..."

    How 'bout this? "Have you ever thought, 'why does my graphics card have so much memory?'"

  • by Ted_Green ( 205549 ) on Monday September 02, 2002 @07:37PM (#4186158)
    So what if it's cheaper to buy ram, or that it's not effecient or what not. Half the hacks posted on Slashdot tend to be next to useless anyways.

    It's a cool hack, simple as that.
    • The guy probably spent *days* figuring this thing out, and, for what? Who will use this? What value does it provide? It's a cool hack, sure, but it serves no point. If you're going to hack something, at least make the end result worthwhile.

      Some people love hacking their cars, but they don't use their gas tank to hold their washer fluid simply because it's possible to do so.

      - A.P.
  • yah - works well (Score:3, Insightful)

    by cullenfluffyjennings ( 138377 ) <c.jennings@ieee.org> on Monday September 02, 2002 @07:38PM (#4186166) Homepage
    The AGP interface is much faster than the memory interface on most recent intel based machines. I do computer vision where a bunch of scratch pad memory is required - the memory on the graphics card is fast and can interlace with acces to main memory. Rumour has it many games take advantage of this. In Linux you can do it with X stuff and in Windows you can use DirectX to do it.
    • The AGP interface is much faster than the memory interface on most recent intel based machines.

      This might be true in theory but its not even close to true in practice. Memory access via AGP only hits about 10% of its theoretical maximum with current video cards. And read speeds are attrocious because the videocard designers assume there's going to be lots of data going from the CPU to VRAM but not much coming back.

      So, to parrot all the other posts saying this, this hack is completely useless, regardless of any cool factor you might find in it. There's absolutely no way I can imagine anyone finding a REAL use for this in practice.

      • by Anonymous Coward
        1. It's still faster than HDD swap.

        2. For a 2D desktop you will have spare video card ram.

        3. Use this video ram in preference to HDD swap.
      • Couldn't a bios upgrade make it more I/O friendly? Of course I'm sure that would break numerous patents on the memory interface.
    • The AGP interface, at 1 GB/sec, is less than 1/3'rd the speed of the memory interface (3.2 GB/sec). Now, that speed is only attainable through deep buffering (basically, block transfers). Writing and reading to video memory from the CPU is, and always will be, extremely, hideously, painfully slow. Slow to the point where the XRender guys (read their mailing list) are talking about pulling blocks of data of the vid card, compositing them with the CPU, and putting them back on the vidcard.
  • by md04 ( 241548 )
    Ramdisks.. Takes me back to the days of my Amiga. I always thought the ramdisk on that was a great boost.. Made a lot of things a hell of a lot easier.
    • Ramdisks.. Takes me back to the days of my Amiga. I always thought the ramdisk on that was a great boost.. Made a lot of things a hell of a lot easier.

      I know, like the time I reformatted my harddrive. I moved my OS into RAM (I had more RAM than harddrive at the time) reformatted, put it back.

      I didn't even need a reboot. :-)
  • but useless.

    Well, that's probably what makes it a cool hack ;-)

  • speed? (Score:4, Interesting)

    by awing0 ( 545366 ) <adam AT badtech DOT org> on Monday September 02, 2002 @07:45PM (#4186187) Homepage
    Would the speed of the VRAM be affected by the AGP read back bandwidth issue? I'm looking for the story that was posted on slashdot a while back, but the search function is less than adequate.

    On another note, this would be usefull for older machines that only have SIMMS and use EDO/FP RAM which is a lot more expensive than todays SD/DDR RAM. But, alas, those old machine don't have AGP ports. So, really, I don't see the point to this.
    • But, alas, those old machine don't have AGP ports. So, really, I don't see the point to this.

      There's some PCI cards out there. I don't know how much memory they have (mine GF2PCI has 32 meg). Quick check reveals some 64Meg cards, which is not bad (compared to 64Meg SIMMs..).
      Bigger problem IMO is power consumption. GF2 seems to eat some juice even without heavy 3D. Also if you have some rather shitty PCI cards, you really have to choose place of grapphics card well, SB live was one example of this b0rkiness. Anyway, 5PCI slots, 1 for real use and 4 x64meg each. that would be nice..
  • RAM right now varies from PC-133 (133Mhz) up do DDR400 (200Mhz DDR effectively 400Mhz)
    where as VRAM on most cards with 128meg of VRAM range from 600Mhz-700Mhz. So would there be a bottleneck accessing this VRAM from the AGP bus as opposed to RAM from the FSB? (I believe the AGP runs at 66Mhz still?)
  • by Anonymous Coward
    From first hand experience in the field, graphics hardware guys do not sweat reliability of the data inside their DRAMs. If you're storing important data there, be prepared for it to disappear, particularly if you are a l33t overclocker.
  • I guess, since you can't use your texture RAM in Linux anyway (unless you want to watch 3d screen savers), you might as well put all the RAM on that GeForce 4 to use somehow.

    - A.P.
    • Actually, the extra memory space can be used by X to cache pixmaps, allowing them to be blitted to the frame buffer quicker.
  • Wow, does this take me back! I remember the really good old-school DOS memory managers (QEMM, for example) were able to create a handful more conventional memory beyond the 640k limit by using video memory in textmode. Quite handy for things like Word Perfect 5.1.

    <JOKE>
    So I guess Linux is finally catching up to DOS.
    </JOKE>
    • by Safety Cap ( 253500 ) on Monday September 02, 2002 @08:17PM (#4186338) Homepage Journal
      ~create a handful more conventional memory beyond the 640k~
      During one QA session with QEMM 6.x, we managed to create something in the neighborhood of 900k (!) conventional memory. If memory serves, the trick was to stealth the roms out with QEMM, copy command.com onto Kernl386.exe and fire up Win 3.1 (if any of you punks who didn't live on the top floor of 150 Pico remember different, please chip in).
      • Not possible in _graphics_mode_. Reason: Graphics memory at the time was in the 640K+ range. As soon as a program enabled that uses graphics, it accesses the remapped conventional memory and you have contention for the same address space.

        IF you have a program that can write outside that space for graphics operations, and you remap just about everything, you could theoretically get most of the first meg as conventional -- in theory only or in short run tests where you don't care what works or how well it works.

        • Not possible in _graphics_mode_.
          I'm not talking about graphics mode: the whole jazz about command.com allows you to run a "dos shell" in protected mode. Lucky for you, I found my old copy of Unauthorized Windows 95 by Andrew Schulman (IDB Books Worldwide, 1994). Let me quote from Chapter 6: Win386 and MSDPMI (pp 161-2)
          Writing in
          Windows Tech Journal (March 1992), David Thielen, then a Microsoft employee, noted:
          Win386 isn't really even part of Windows. It's a preemptive multitasking kernel that controls multiple virtual machines. Once Win386 has initialized itself, it loads Windows in the system VM (the main virtual machine that always exists). However, it could just as easily load COMMAND.COM instead, resulting in a multitasking DOS. (No, I won't tell you how to do this.)
          Well, after Chapter 5's discussion of how to make DOSX.EXE load something other than the Windows kernel, it should be fairly apparent how to do the same thing with WIN386.EXE. Just as DOSX.EXE insists on running KRNL286.EXE or KRNL386.EXE, WIN386.EXE (actually, the SHELL VxD within WIN386) insists on running KRNL386.EXE But just as with DOSX, WIN386 will run any file called KRNL386.EXE: even COMMAND.COM, if you rename it!
          The point isn't that you're running graphics mode, or not. The point is that COMMAND.COM thinks that it can get to the first meg of memory without that pesky text thing taking up space at B000h-B7FFh (remember, the ROMs at 0xA000-0xAFFF, 0xB800-0xC800, and 0xF000-0xFFFF are all gone thanks to QEMM).
          • The point isn't that you're running graphics mode, or not. The point is that COMMAND.COM thinks that it can get to the first meg of memory without that pesky text thing taking up space at B000h-B7FFh (remember, the ROMs at 0xA000-0xAFFF, 0xB800-0xC800, and 0xF000-0xFFFF are all gone thanks to QEMM).

            Video memory typically starts at A000, and can start lower. Video ROMs are typically at C000-C800. B000-B800 is for monochrome (MGA). With that trivia out of the way...

            While the book you quote is good, you're out of your element. For one, I don't need to quote his book as I was there and know what I'm talking about .

            Loading something somewhere means nothing if it can't survive there. Adapters can initialize from A000-10000h without warning the OS or memory manager. This means corrupted programs or data. To use one piece of memory or another required much machine-specific tinkering. To use a contiguous block required quite a few rare circumstances.

            Loading anything above 1M leads to the program thinking (rightly) that it is still in the first meg. -- and it will attempt to write into the first meg if it can be executed at all. Usually, it can't. _DOS_ programs in the first meg run in real mode meaning that they will do things that are illegal in protected mode unless rewritten. _All_ programs above the first meg run in protected mode or don't run at all. (Nit: A small space called the HMA at 1M+ through 1M+~64K can still execute in real mode, though they would have to be patched or they would still attempt to write into the first 64K.)

            Once you handle all those problems in your code you end up with a protected mode program that no longer needs real mode. No real mode, no reason to use the first meg -- just allocate the memory from the OS/memory manager and let it mess with the first meg if it needs to. That's why DOS sucked so bad -- no memory to do jack unless you avoided it entirely.

            I worked at Qualitas -- makers of 386MAX (similar to QEMM). I debugged and tested MAX, compressed system BIOSes, a seperate 286 memory manager (yes, they existed), and a memory diagnostics program (RamExam). Shulman's book is a wee bit thicker because of the work that I and a few others at Qualitas did using debuggers that could do odd things like boot DOS from DOS -- not a big deal now, but an unreal thing to design back in the day unless you had specialized hardware.

  • There was some work done toward getting Linux to map VRAM in as regular-old user or kernel memory. I don't have the link handy, but I believe I saw it on the linux-kernel list.

    Occasionally I have delusions of trying something like this - treating the division between the VRAM and regular RAM as a case of non-uniform memory access, and using existing algorithms to prefer the faster memory.
  • If you've used up all the slots you have available for RAM, this is one way to pack more RAM into your machine.
  • Prior Art (Score:2, Interesting)

    Heh, does anyone remember the virii that spread through the MS-DOS console VRAM? It was a pain at LAN parties where we would swap vidcards all the time. I can't recall the name, but it TSR'd in B800:0000 real mode. You can view the VRAM in Windows or DOS using debug:
    C:\>debug
    -db800:0 B800:0000 2D 07 64 07 62 07 38 07-30 07 30 07 3A 07 30 07 -.d.b.8.0.0.:.0.

    This goes to show how virus authors's creativity evolves pretty fast, its funny how nowadays someone is showing how to use VRAM for legitimate purposes. Who would have known? Those crazy VXers thought of it first.

  • Don't you know how perty X is with 64MB of DDR on a GeForce3? Try running top and you'll see that X barely even shows up on the charts with that much ram on a video card. I rarely see more than 5% memory usage by X.
    • Five percent of what amount of RAM though? I think the point of the little experiment was to add swap space to an older system without much system RAM. I would imagine that if you system only utilizes such a small percentage it is because you have a more proportionate total system RAM to your video RAM (unlike the system in the story submitted).
  • The guy who was working on the Doom port was trying to get extra memory from anywhere that he could so that he could load the WAD files entirely into memory.

    He had this wonderful idea of allocating the frame buffer and then using the excess video memory to store extra data.

    It failed miserably when he realised that you can't actually read from the Dreamcast's VRAM, only write.
  • have a motherboard with an embedded graphics controller and this lets me make use of the otherwise dead card (I don't want to buy another monitor)
  • Hidden Security (Score:2, Interesting)

    by Anonymous Coward
    Say you want the hide "data", outside of normal memory. This a great way to add secure memory.

    Write a fast bitblit routine to erase the "hidden memory. Use the graphic engine to add real time xor of crypto keys.

    Don't think of it as just memory but think of it as secret memory.

    Shaun
  • Although I don't have a lot of VRAM to spare, this gave me an idea I might play with...

    I have an old 486DX4 system, with one of those cool AMD 486 processors with double L1 cache and Write-Back (WB) cache mode. (Trust me, these 486's are much faster than the rest of the pack). There's only one problem though: the motherboard has very few L2 cache (256k), which makes it unable to cache more than 32MB of RAM in WB mode. So, to put in more memory, I would either have to switch to Write-Through (WT), which would be slow, or have a mix of cacheable and non-cacheable memory, which is even slower.

    What does all this have to do with the mentioned article, you might wonder? Well, it immediately gave me the idea that I might be able to add more RAM to that PC, use the lowest (cacheable) part for the system, and use the above as a Memory Technology Device (MTD), perhaps putting some swap space on it. Weird, huh? Still, if it works, it'll probably be somewhat better than leaving the extra memory in a drawer gathering dust...

    Too bad I'll be travelling in a few days, so my spare time right now is next to zero. *sigh* But I'll have to try it sometime.

  • I used a similar technique on my XT compatible after I upgraded it with a VGA card with 256KB of RAM on it (long after everyone had thrown away their XTs). So long as you managed to avoid writing into the visible screen, a lot of it could be used for storage (with a bit of work on the page selection registers). I still have that machine. It's got 640k on the main board, 256k on the VGA, and 2 MB on an EMS 4.0 board. (2.875 MB total) There were times when I used every byte.

    Of course there's a big difference between boosting a maxed out XT and expanding the capacity of your P4 2.8Ghz from 2GB to 2.064GB.

  • Dude is an insane genius. All props.
  • by eddy ( 18759 ) on Monday September 02, 2002 @08:59PM (#4186510) Homepage Journal

    Just kidding. No one would be nasty and put viral code where no scanner has gone before.

  • 128 megs!!! (Score:2, Insightful)

    by SiIverFish ( 544878 )
    wow! 128 megs of ram! for the low low price of only $400!!!! yeah, maybe in 1994!
  • Why so much RAM? (Score:2, Interesting)

    by yancey ( 136972 )
    I've often wondered why operating systems today require so much RAM in the first place. Most people just want to browse the web, check their email, and perhaps play some music. Why does Windows, or any other OS, require such resources to pull off these relatively simple tasks?
    • If you just want to get on the web, check your e-mail, and perhaps play some music, then why do you have a computer? Sell your PC and buy a PDA or cell phone.

      Why do operating systems require so much memory? They don't. You can get onto the internet with a 486DX/33, 340MB IDE hard drive, 16MB RAM, 14" VGA monitor, Windows 95 (or Linux 1.x), and 14.4Kbps modem. Floppy drive optional.

      In fact, about two or three years ago, I bought a system like that for $50 ($25 for the 486 PC and $25 for the VGA monitor). I used it as a web server, after I dug up a USRobotics Courier v.34ter (33.6K) external modem. I upgraded the flash ROM on the Courier to support 56Kbps, got a dial-up account at a local ISP, and installed RedHat 5.2 (the oldest RedHat CD I could find after searching for five minutes). The CDROM, one of the hard drives, a serial port, and some other miscellaneous hardware failed after a while, but it kept chugging on, until I finally replaced it with a DEC Multia.

      Why do operating systems today use so much RAM? Because of the User Experience. If you want to have a bunch of services (or daemons) running in the background, you're going to need lots of RAM. Do you want your applications to load quickly? Well, one option you have at your disposal is to partially load the application at bootup, then keep that portion in memory permanently. That eats up a lot of memory. Maybe you don't use the application so often, but you don't want it to take five minutes or more to load. Well, you can cache frequently accessed data, the directory structure, extended attributes, etc. Depending on how efficient your cache is, you can get away using small amounts or huge amounts of RAM. Of course, the law of diminishing returns applies here, as well.

      Speaking of efficiency, take a look at the programs written for MS DOS in the early 1980s. Most of them were written in assembler. When people started using higher level languages, the memory footprint increased (tremendously, in some cases, where inexperienced programmers did not optimize their code at all, allowing that faster processors and more memory would cover up their experience). When developers use object oriented, interpreted, high level languages, the memory footprint explodes and the execution speed becomes unbearable, except under the fastest processors. Try running a large Java application on your 486/33 or Pentium 75. I bet it won't run too quickly.

      Why does the operating system provide all these services, features, and user experience goodies? Because users want the operating system to do so. If you don't, then try using a real-time, microkernel based operating system. QNX is an example of this. MSDOS, a glorified program loader, is a somewhat decent example of a minimalist kernel distributed with the bare minimum of tools necessary to boot up a PC. It probably couldn't even boot up some modern PCs, given that it is a 16 bit real-mode app, and we're pushing the boundaries of 32 bit computing.

      In short, features suck up bandwidth, speed, and memory. You can't run XP on a 486, because it preloads IE6 (and other apps) into memory at bootup, caches everything, runs as resolutions unsupported by your Trident 8900C video card, and has so many things popping up, sliding away, and running in the background, your poor 486 processor and ISA video card would be unable to keep up.

      Nobody said you had to upgrade beyond your 486/33 and MSDOS 6.x. It still works just fine, I'm sure, and you'll probably notice that WordPerfect for DOS loads up extremely quickly.... much faster than Office XP does.

      Why do people upgrade? They want programs to have talking, dancing paper clips. WordPefect for DOS doesn't even have a single wizard, just a text help screen.

  • My old amiga could do this. My A1200 had 2 megs of vram and when its 8 megs of fast ram was used up the system would often start moving into that memory. Thing is it slowed down the computer considerably.

    Even my A3000 can do this with Cybervision (RTG software) once fast ram was used up it could use the memory on the video card as zorro expansion memory (ie memory attached to the system expansion bus).

    Neat thing was it did this all dynamically and automatically - without you having to specify space or anything.
    • Actually all Amiga's back to the original A1000 can do that. The Amigas essentially had two memory buses: One for the CPU and all the auxilliary chips (referred to as "chipram" - this included the video chip, timers, audio, etc.) and one that was exclusively accessible by the CPU ("fastram")

      Some models came only with chipram as default.

      Running programs from "chipram" was slow, since the CPU was unable to access it and would have to wait whenever any of the other chips accessed it.

      When you allocated memory, you could choose to request a specific type of memory (if you needed the memory to be accessible to the auxilliary chips, you'd request chip ram, if you needed the speed you'd request fastram) or not care, in which case fast ram was allocated unless there was no big enough block of fastram available.

  • I don't know about anyone else in here, but I actually plan on trying to implement this. We all seem to be overlooking one great big niche here: servers. I run an AMD K6-II as my server, it has a single stick of 128 MB RAM. It also has an old 4 MB video card in an AGP 2x slot, that means I can add 4 MB of 132 MHz RAM, totalling my physical RAM out to 132 MB. No, that isn't very much, but hey, do I run X on my server?
    No.
    Do I have a video card sitting in my AGP slot?
    Yes.
    Is there a legitimate reason -not- to use that card for something at least?
    NO!!!

    Sure, my desktop has 512 MB RAM, and 64 MB VRAM, I don't need to dip into that extra RAM, but for my server, that's 4 more MB that I have available now before I have to access a terribly slow swap file. Besides, isn't this the main use of *NIX anyway, webserving? All modern PCs have AGP slots now, if you run your own server, and it has a PII or newer, chances are good it has AGP support, at -least- 1x. Chances are also good you have a video card lying around. So why not do something cool with it, rather than collect dust?

    Just a thought guys.
  • now if only i could find "one of these cheap 128MB graphics cards" so I could "enjoy the speed"
  • a way to use the unused processor power of that gfx card to run an extra seti@home ;-)
  • Gamecube audio ram (Score:2, Insightful)

    by mypalmike ( 454265 )
    This is actually a fairly common practice in Gamecube programming, only using audio ram. The GC has a measly 24 Megs of main ram and a whopping 16 Megs of audio ram. The transfer is reasonably fast, and it certainly makes it easier to port a PS2 engine which from the PS which has 32 Megs. There was an article in Game Developer not too long ago about automating this as virtual ram using the PowerPC's memory-mapping capabilities rather than the manual approach usually taken.
  • I have got a Pentium 200 MMX with 128 Mb of ECC EDO, no free memory slots. It sounds quite fair to buy a 64 Mb PCI graphics card for less than $100, if I could use like 60 Mb for fast swap.

    BUT: What if I put 60 MB swap on this fast VRAM-swap, and another 256 MB swap on an old, rotten and slow IDE drive? Will Linux detect that the first swap is faster and make extensive use of it, or will the slow 256 MB swap ruin my performance anyways?

On the eighth day, God created FORTRAN.

Working...