Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Is Video RAM a Good Swap Device?

kdawson posted about 7 years ago | from the it's-there-why-not-use-it dept.

Data Storage 235

sean4u writes "I use a 'lucky' (inexplicably still working) headless desktop PC to serve pages for a low-volume e-commerce site. I came across a gentoo-wiki.com page and this linuxnews.pl page that suggested the interesting possibility of using the Video RAM of the built-in video adapter as a swap device or RAM disk. The instructions worked a treat, but I'm curious as to how good a substitute this can be for swap space on disk. In my (amateurish) test, hdparm -t tells me the Video RAM block device is 3 times slower than the aging disk I currently use. If you've used this technique, what performance do you get? Is the poor performance report from hdparm a feature of the hardware, or the Memory Technology Device driver? What do you use to measure swap performance?"

cancel ×

235 comments

Sorry! There are no comments related to the filter you selected.

yes (-1, Flamebait)

Anonymous Coward | about 7 years ago | (#20939861)

you bitches.

AGP or PCI-Express (5, Informative)

j_sp_r (656354) | about 7 years ago | (#20939867)

Is your adapter an AGP or PCI-Express card? Because PCI-Express has fast lanes both ways, and AGP is not so fast in writing back. That could explain a part of the performance problems.

Re:AGP or PCI-Express (1)

Like2Byte (542992) | about 7 years ago | (#20940055)

The GP implied (e.g.: "inexplicably still working") they're using older hardware; therefore, I'd imagine that PCI-E isn't being used on his system. AGP is possible; but, from the tone of the article, I'm leaning more toward his system using PCI.

What would be the bottlenecks if he was using PCI video RAM?

Re:AGP or PCI-Express (1)

LSD-OBS (183415) | about 7 years ago | (#20940163)

The bottleneck is always the bus on the card itself, between the VRAM and the PCI/AGP/whatever bus. For some reason they're never designed for decent transfer speeds in that direction, which has been the downfall of many good ideas in the past (not to mention a lot of 2D graphics algorithms)

Re:AGP or PCI-Express (1)

omeomi (675045) | about 7 years ago | (#20941021)

He did state that he's using the "built-in video adapter", which I would imagine is on-board, and thus neither PCI, AGP, or PCI-E.

Re:AGP or PCI-Express (4, Informative)

Andy Dodd (701) | about 7 years ago | (#20941083)

Whether it is built into the motherboard or is built into the chipset itself, it almost always still has an "internal only" PCI, AGP, or PCI-E interface, and is thus affected by the performance limitations of that interface.

Re:AGP or PCI-Express (2, Informative)

ckaminski (82854) | about 7 years ago | (#20941105)

Nearly all video adapters made in the past 10 years are either PCI, PCIe or AGP. Whether or not they are add in cards or soldered on the motherboard is irrelevant.

Re:AGP or PCI-Express (2, Insightful)

arth1 (260657) | about 7 years ago | (#20940071)

It shouldn't matter, cause AGP is in no circumstance slower than the 33 MHz PCI bus, and you can run a couple of IDE hard drives maxed out on a PCI ATA controller.

Re:AGP or PCI-Express (1, Informative)

Corporate Troll (537873) | about 7 years ago | (#20940123)

Not wanting to burst your bubble but there is a significant difference between good old PCI [wikipedia.org] and PCIe [wikipedia.org] .

Re:AGP or PCI-Express (1)

Corporate Troll (537873) | about 7 years ago | (#20940255)

Sorry, I get what you mean now... You mean that the write/read to AGP should be faster than a write/read to a disk because the bus is faster. I was comparing raw bus speeds...

Re:AGP or PCI-Express (1)

owlstead (636356) | about 7 years ago | (#20941277)

Are you really a troll or are you just dense? PCIe x 16 is a lot faster than AGP in in transfer from video card to the CPU.

Re:AGP or PCI-Express (1)

somersault (912633) | about 7 years ago | (#20940321)

Not wanting to burst your at first seemingly correct bubble, but the OP points out that you can run 2 old IDE HDs at full transfer rate on even 33Mhz PCI, so anything newer than that shouldn't be suffering a bottleneck on the bus (though some people have pointed out that reading back from AGP takes a long time compared to writes).

Re:AGP or PCI-Express (1)

Orange Crush (934731) | about 7 years ago | (#20940323)

Nobody said there wasn't. But the fact remains you can max out several IDE devices with an old interface card on the good old 33mhz PCI bus, and solid state VRAM shouldn't be any slower than a mechanical hard drive. So even if it is running over the slowest likely bus, that's still not the bottleneck. So it might be something in the card itself causing the slowdown.

Re:AGP or PCI-Express (1)

Corporate Troll (537873) | about 7 years ago | (#20940465)

No worries, I realised that after pushing "Submit"... Go back to the comment and you'll find that I corrected myself in a reply...

Re:AGP or PCI-Express (0, Redundant)

Yvan256 (722131) | about 7 years ago | (#20940213)

Given his "lucky/still working" description, it could even be PCI or even ISA graphics...

Re:AGP or PCI-Express (2)

paganizer (566360) | about 7 years ago | (#20940447)

or Vesa Local Bus. or MCA. But I think the most VRAM ever found on a MCA video card was maybe 8MB.

Re:AGP or PCI-Express (2, Informative)

edwdig (47888) | about 7 years ago | (#20940781)

What's a high end ISA graphics card going to have, 512 KB of RAM ? I can't picture anyone wanting to swap to that. PCI most likely wouldn't have more than a few MB of RAM, making it questionable as well.

I'd Say...Neither (2, Funny)

camperdave (969942) | about 7 years ago | (#20940225)

Is your adapter an AGP or PCI-Express card?

using the Video RAM of the built-in video adapter as a swap device
The adapter in question is built into the motherboard.

Re:I'd Say...Neither (2, Informative)

Corporate Troll (537873) | about 7 years ago | (#20940297)

Bull... Even onboard video adaptors are connected to via a bus and that bus will be either ISA, VESA Local Bus, PCI, AGP or PCIe, depending on the age of the machine.

Re:I'd Say...Neither (0)

Anonymous Coward | about 7 years ago | (#20940697)

Why bull?

Answering 'neither' to the question "is it AGP or PCI express" is still valid, even if the reason given is not.

Re:I'd Say...Neither (1)

Bodrius (191265) | about 7 years ago | (#20941125)

Because the onboard graphics adapter is still either AGP or PCI-e.

The bus defines that, and the onboard chip still uses either bus.

"Neither" is only a valid option if it is really old hardware and uses yet another bus (VESA? EISA?)... but I haven't seen those in... 10 years by now?

Built in still uses the bus.... (1)

tinkerghost (944862) | about 7 years ago | (#20940821)

Onboard video still uses the same bus structure as available for expansion (believe I saw 1 board with all PCI slots & an ISA onboard video but it was fucked from the get go). Most of the chipsets will simply load the data on the bus & be done with it - the BIOS cuts out the onboard at POST when another video card is detected. A few of the boards seem to route through the onboard in a serial rather than true bus fashion(greatly reduced framerates on boards with the same video card & similar chipsets w/ & w/out the onboard video).

Re:Built in still uses the bus.... (4, Informative)

sumdumass (711423) | about 7 years ago | (#20941123)

This sort of brings up another issue he might be happening. A lot of on board video cards use system memory to function properly. If the swap space is actually in system memory, the extra transfer overhear of going up the bus to the controller that then send it back to the memory that is actually sending the stuff to the video ram.. Well, you see what I mean. The extra few steps could be enough latency per read write operation to slow the thing down compared to a direct access method that would be present with an IDE connection as well as video memory built on to the video car itself.

I think the differences might be as noticeable as turning DMA (direct memory access) on and off. And yes, you can see a big bit of difference. It was actually worth me buying new drives just to have DMA access when it first started becoming available. I remember earlier versions of windows 98 and (95 I think), that wouldn't turn it on by default. After making sure the drives supported it and enabling it, people would almost think they had a new computer. There was that much of a difference in performance.

Re:Built in still uses the bus.... (1)

dpilot (134227) | about 7 years ago | (#20941269)

For that matter, if this is Unified (el-cheapo) Memory Architecture, and you've got "video memory" that you're not using, take a look in the BIOS and see if there's some way to dedicate less system memory for video. Giving the memory back to the system would be far better than trying to use it through the video subsystem.

Re:I'd Say...Neither (1)

Machtyn (759119) | about 7 years ago | (#20941225)

If the adapter is built onto the motherboard, are you sure it is not sharing physical memory? You have 1024MB RAM, 256 being used by graphics, so OS has 768MB to work with.

Of course, there are some boards out there with onboard graphics chipset with dedicated memory, but those are few and fairly expensive.

Still, as others have mentioned, even with onboard graphics, it is still using a bus, likely a PCI-E or AGP bus.

Re:I'd Say...Neither (1)

langelgjm (860756) | about 7 years ago | (#20941275)

What would be even funnier is if it were one of those cards that uses "shared" system memory for video memory.

As far as swap devices go, I prefer (-1, Flamebait)

Anonymous Coward | about 7 years ago | (#20939875)

niggers.

Re:As far as swap devices go, I prefer (3, Funny)

Anonymous Coward | about 7 years ago | (#20940365)

Dear troll,

You are not very good at this. People on slashdot are more or less immune to trolls that use racial slurs. In troll 101, you should have at least learned to disparage an OS or programming language if you really want to rile people up. This is a good troll, that is also topical:

"Linux is not a very good OS to use for swapping to the video card. It's video bus support is hopelessly dated and slow, though you can use the experimental driver if you patch the kernel."

That simple statement will get you far more responses, and perhaps even get modded up by some clueless folks with mod points. Then you can masturbate feverishly until the next time someone tries to cross your bridge.

Re:As far as swap devices go, I prefer (0)

Anonymous Coward | about 7 years ago | (#20940539)

How can you say this about teh Linuxxxx!!!

Re: Trolls (0)

Anonymous Coward | about 7 years ago | (#20940589)

Why does /. even allow AC posting still? Seems like a flame/troll enabler.

Re: Trolls (2, Insightful)

TheVelvetFlamebait (986083) | about 7 years ago | (#20940773)

Why does /. even allow AC posting still?
What's wrong with them? They're easy to ignore, and they offset the problem with the moderation system, where expressing certain opinions can guarantee you negative karma.

Besides, Slashdotters have never bought the "why are you running if you have nothing to hide" argument.

Re: Trolls (0)

Anonymous Coward | about 7 years ago | (#20941129)

Why does /. even allow twitter to continue posting? Seems like a flame/troll enabler moreso than an AC

OS overhead may well defeat any gains. (1)

BarnabyWilde (948425) | about 7 years ago | (#20939883)

OS overhead may well overshadow any gains from nanoseconds saved in the video RAM.

Re:OS overhead may well defeat any gains. (2)

LSD-OBS (183415) | about 7 years ago | (#20939999)

Bear in mind the poster is talking about *swap* space. That is, the hard drive. Video RAM is orders of magnitude faster, aside from issues reading back from the video bus.

Probably a good idea, provided you have PCIe (5, Informative)

default luser (529332) | about 7 years ago | (#20939897)

I'm assuming your ancient system uses an AGP interface for graphics, which has a very fast download rate, but very poor upload. The maximum performance of AGP uploading data from the card memory to the rest of the machine is pretty slow (less than 100MB/sec, IIRC), and it will vary depending on the implementation. This is probably the reason you got such slow benches.

PCIe will likely give you performance more in-line with main memory (most implementations now are hitting 1-2 GB/s).

Re:Probably a good idea, provided you have PCIe (1)

AvitarX (172628) | about 7 years ago | (#20940057)

100MB a second is still pretty damned fast.

ATA 133 (I will assume this, due to the "aging hd mentioned) is only 17MB/sec for comparison's sake. I believe (could be wrong) that AGP uploads at PCI speeds and downloads at up to 8xPCI. This would put it way past a disk in speed, and the slowdown is somewhere else.

Re:Probably a good idea, provided you have PCIe (4, Informative)

dougmc (70836) | about 7 years ago | (#20940177)

ATA 133 (I will assume this, due to the "aging hd mentioned) is only 17MB/sec for comparison's sake.
No, ATA [wikipedia.org] 133 is theoretically 133 MB/s. It's bytes, not bits.

And I used to regularly get sustained 25-30 MB/s from single drives (40 GB or so) on ATA 33 interfaces. Going to ATA 66, 100 or 133 may increase the speed when hitting the on-drive cache, but the drives themselves usually can't go that fast. How fast are the fastest IDE drives nowadays for sustained, sequential transfers -- 50 MB/s or so?

Re:Probably a good idea, provided you have PCIe (1)

imsabbel (611519) | about 7 years ago | (#20940667)

IDE drives get >75Mbyte in the outer zones, and drop to the 50s in the middle.
Some reach >60. So even UDMA66 would limit them non-trivially.

Re:Probably a good idea, provided you have PCIe (1)

pushing-robot (1037830) | about 7 years ago | (#20940909)

How fast are the fastest IDE drives nowadays for sustained, sequential transfers -- 50 MB/s or so?

I've seen newer 500GB IDE drives do 80MB/s at the start of the drive.

IDE and SATA are still equivalent for sequential transfers. Until drives reach sustained 100MB/s or 133MB/s, IDE won't be a bottleneck in that regard.

Re:Probably a good idea, provided you have PCIe (5, Informative)

ElecCham (78742) | about 7 years ago | (#20940987)

(ObDisclaimer: I work for Seagate.)

On a current-model 7200RPM SATA drive, you can expect to see around 80MB/sec at the outer edge of the disk. And the rule of thumb is, you see half that at the inner edge, and three-quarters in the middle. So call it a (nearly) guaranteed 40MB/sec, and an average of 60MB/sec.

These are not hard-and-fast numbers, but it's a pretty good estimate for a modern drive.

Re:Probably a good idea, provided you have PCIe (1)

AvitarX (172628) | about 7 years ago | (#20941035)

Thanks for correcting my lies.

Re:Probably a good idea, provided you have PCIe (1)

asuffield (111848) | about 7 years ago | (#20941081)

How fast are the fastest IDE drives nowadays for sustained, sequential transfers -- 50 MB/s or so?


Sustained transfer is a function of data density and spin rate - it's all about the rate at which bytes travel under the read heads. Spin rates are more or less fixed by mechanical limitations, with consumer disks running at 7.2k RPM, and high-end disks running at up to 16k, so you'll get about twice the sustained transfer rate from the really expensive models.

Aside from that, it basically depends on the size of the disk, since that's closely related to the data density.

You will see almost no variation across different manufacturers, but a wide variation across different models of disk.

Re:Probably a good idea, provided you have PCIe (1)

gfxguy (98788) | about 7 years ago | (#20940085)

If it's really that aging it might still even be PCI or, if it's really old, ISA.

It's hard to imagine a PCIe card being slower.

Re:Probably a good idea, provided you have PCIe (1)

InvalidError (771317) | about 7 years ago | (#20940769)

AGP is basically a souped-up single-drop PCI slot. AGP is fundamentally capable of doing full-speed in any mix of Read-Write as long as the target device is capable of sustaining the operation. The problem is that most GPUs have been designed as output-only devices and their host controller interfaces, be it PCI, AGP or PCIe, have been designed for fast writes to video memory but only implemented a low-cost, small-footprint, low-performance readback path since it is superfluous for normal operation. If you benchmark the readback throughput of early PCIe graphics card - those before the wholesale switch from GPU to GPGPU - probably all things up to Radeon X8xx and GF6 or possibly even X19xx and GF7, you will find that most of them also have relatively slow readback speeds.

Newer GPUs have been designed with GPGPU in mind which has a more symmetric traffic requirement: being able to do very fast computations on-card is pointless when it is impossible to get the results back in a timely manner. Take one of those GPGPUs, slap an AGP bridge onto it, put it in an AGP slot and you will get decent throughput in both directions.

Slow VRAM readback was a chip design decision, not a bus issue and not a bug. While the VRAM path is full-speed between the GPU core and RAM, the path between RAM controller and host controller is asymmetric in nearly all early PCIe GPUs as well of the vast majority of AGP and PCI ones. If you want a GPU with symmetric host-RAM RW capability, all Matrox GPUs, be it on PCI, AGP or PCIe have it IIRC - as should today's X2xxx and GF8.

AGP not that bad (0)

Anonymous Coward | about 7 years ago | (#20941259)

Thats not quite correct. Traditionally Windows OpenGL and Direct3D drivers has had poor readback speed, but linux less so. I just tested and got 825/625 MB/s (glDrawPixels/glReadPixels) on a FireGL X2 (R350) on AGP.

Just don't don't do it! (0, Flamebait)

Anonymous Coward | about 7 years ago | (#20939903)

This might come off as a troll or offtopic, but you shouldn't be swapping. Buy more main memory.

Just misinformed (3, Interesting)

spun (1352) | about 7 years ago | (#20939983)

It doesn't come across as troll or offtopic, just misinformed. If you can swap out an unused page of code or data to provide more room for disk cache, why not do it? You should take a look at what your OS is actually doing with memory some time.

Re:Just misinformed (4, Insightful)

Corporate Troll (537873) | about 7 years ago | (#20940211)

Video RAM is designed for performance, not for stability. If a bit flips in your video RAM, a pixel is going to be bad or a texture will be slightly different. You're not going to notice.

A bit flip in your swap space (or main RAM), now that is something you really don't want to happen....

Re:Just misinformed (2, Insightful)

mikael (484) | about 7 years ago | (#20940615)

It will be more than slightly different if one of the most significant bits of any byte is changed in such a way, it may very well be white or black instead of medium gray. Also, VRAM is used for more than just pixel data now. It it also used to store geometry in the form of display lists and executable code for vertex, geometry and pixel shaders. One bit flipped in a floating-point value or in a executable bit of code and it could affect an entire rendered frame.

Although, I can only imagine the senior engineers at companies at Nvidia raising their hands to their head and screaming "Noooooooo!!!!". I guess that happens when you choose to have one storage device have a faster bus transfer rate than all the others.

Re:Just misinformed (1)

Overzeetop (214511) | about 7 years ago | (#20940229)

If you can buy enough memory not to have to swap, why would you? Swap is for people who can't afford any more memory, and are willing to take a massive performance hit to avoid said expense. If you're running very few apps, most of your memory is going to be data, and if most of your memory is data, then swapping out unused code to disc will not free up much memory (on a percentage basis). I'm with the GP on this one.

Re:Just misinformed (3, Interesting)

Corporate Troll (537873) | about 7 years ago | (#20940423)

Swap is more than that... It also allows you to recover a machine that runs out of memory due to a runaway process. Login remotely won't work if no process gets memory anymore, so you can't kill the runaway process. With swap, you'll be able to log in, kill the process and recover the machine. That said, it won't be fast, but at least you've got an option.

Read up on Virtual Memory [wikipedia.org] , because there is much more behind it that just "dumping memory that's not used to disk".

Re:Just misinformed (4, Informative)

arth1 (260657) | about 7 years ago | (#20940685)

If you can buy enough memory not to have to swap, why would you? Swap is for people who can't afford any more memory, and are willing to take a massive performance hit to avoid said expense.

Bzzt - wrong.
Even high-end systems use swap space, because it allows for swapping out parts of memory that isn't called, freeing up that memory for things like disk cache, which does have a positive effect.

Doing "free" on a system here, I see that there's 886492 kB of free memory, of which 879896 kB is used for disk cache. 72892 kB is swapped to disk, and if there were no swap, the disk cache would have been that much smaller. Even if I had umpteen gigabytes of RAM free, that still would be 70 MB of extra cache by using a swap partition. That's a Good Thing.

What's a Bad Thing is when swap is used because you run low on memory -- then you get trashing and a seriously slow system. But on a healthy system with enough free memory, where the kernel can swap out pages not because it has to, but because it makes sense, using swap is a Good Thing.

Re:Just misinformed (1)

AVee (557523) | about 7 years ago | (#20941029)

Swap is for people who can't afford any more memory, and are willing to take a massive performance hit to avoid said expense.
Cheapskate! Ram is for people who can't afford any more Level 2 cache, and are willing to take a massive performance hit to avoid said expense.

In fact, Level 2 cache is for... Oh well, nevermind.

Re:Just misinformed (1)

Spazmania (174582) | about 7 years ago | (#20940231)

If you can swap out an unused page of code or data to provide more room for disk cache, why not do it?

Because your idea of "unused" and Linux's idea of "unused" don't always match up well.

Re:Just misinformed (1)

Molt (116343) | about 7 years ago | (#20940335)

On that basis though wouldn't it make more sense to use the video RAM as disk cache?

Re:Just misinformed (1)

ToasterMonkey (467067) | about 7 years ago | (#20940413)

The machine in question is meant to be a server right? Sure it might do some swapping, not out of necessity, but just to make room for more filesystem cache. For that, all he needs a bit of harddrive space. If the machine is swapping because real memory is low (why else would you be concerned with swap performance?), then add more RAM. Simple.
If there is a funky server process that needs to be highly responsive but sleeps long periods of time in between use, Linux has parameters to encourage it not to be swapped out.

Have enough RAM + don't take stuff out of RAM if you still need it = who needs swap??
Having more RAM is ALWAYS better than scavenging some from old processes. Swapping just improves the efficiency of available RAM for people who couldn't get more of it.

size (3, Informative)

TheSHAD0W (258774) | about 7 years ago | (#20939909)

How much RAM is in your video card? 64 megabytes? 128? If it's an older machine, probably much less than that. Assuming you have less than a gigabyte of main RAM in your system it's probably much more worthwhile to drop a few dollars on expanding that and running whatever RAM disk you need in there.

Sounds like a quite pointless idea (1)

wlad (1171323) | about 7 years ago | (#20940005)

Video card memory is much more expensive than normal RAM for a reason, as it has to support crazy throughputs for things like alpha blending. This throughput advantage does not apply when the host (CPU) accesses the memory. PCI Express is a lot faster than AGP, but it's still a bottleneck that makes it much slower than native RAM. Like the person above me already states, you're much better off just buying some extra RAM.

Re:Sounds like a quite pointless idea (1)

weierstrass (669421) | about 7 years ago | (#20940283)

Why is it better to buy something that will cost money, than to use something you already have that is going to waste, even if that (completely free) performance is inferior?

Re:Sounds like a quite pointless idea (1)

wlad (1171323) | about 7 years ago | (#20940525)

OK, you have a point, if it's the built in graphics card or you got it with the PC you can just as well use it. But those are generally cards with very little memory, or even of the 'hypercache' brand that costs you main memory to use. And generally, that 16MB of fast swap space extra won't really make a performance gain that is worth all the trouble.

Re:size (4, Informative)

arivanov (12034) | about 7 years ago | (#20940237)

Not quite so.

If it is really old it may be running one one of the early Intel Pentium Triton chipsets. The TX will not cache any memory above 64 and the HX needs to be reconfigured to cache above 64. Even after reconfiguration it will just about work for 512MB. There are other similar vagaries related to most old hardware. Ali depending on release and version tanks at 384 or 768 and so on. Even chipsets as recent as Intel 815e while capable of 2G were deliberately bastardised to support only 512MB in order not to undercut the inexistent market for high-end Rambus/i810 based workstations.

So there are quite a few cases where it is more cost effective to use an old and long past its hayday high end video card as a swap device. All the way up to around 2001-2002. From there onwards nearly everything supported sane memory sizes so it is pointless.

Re:size (1)

TheSHAD0W (258774) | about 7 years ago | (#20941145)

Welllll... What's better? A big RAM disk in an uncached portion of main memory, or a small RAM disk on a video card - also uncached?

Re:size (2, Informative)

arth1 (260657) | about 7 years ago | (#20940279)

Expanding the RAM isn't always feasible. I have one dns/dhcp/proxy/smb server with 512 MB RAM, and that's max for the i815P chipset (Tualatin-S CPU). Adding more RAM would mean switching out the motherboard, which would also mean switching out the CPU, and we're up to so much money that it's easier just to add a new server and move everything over. Since the average server load is close to zero and only peaks once a day (when doing compressed backups), there's no point in moving to anything faster.

However, more RAM would mean being able to increase the squid cache, which now is limited to 24 GB, due to RAM, not disk space.

Regards,
--
*Art

Maybe, but need GPU specs (4, Interesting)

redelm (54142) | about 7 years ago | (#20939913)

This is certainly a clever idea for small amounts of swap (~256 MB). But to make it work well, you'd have to find the GPU commands for block moves from main RAM to vidRAM. That's the only way to activate the AGPx2 and higher modes.

But there is a fundamental problem: vidRAM is optimized for writes from main RAM. Not reads. In many cases, reading vidram is extremely slow because the raster generator is busy reading it. Writes are buffered. Reads cannot be.

Re:Maybe, but need GPU specs (0)

Anonymous Coward | about 7 years ago | (#20940903)

And pray tell us , How will we guarantee that no other program or process doesn't access this Video ram area and corrupt the contents and then this corruption is swapped back into a running process or program?
Please tell us why that cant happen ?
    The result would be like the mother of all bugs , It woudd act like flaky system ram
and the result can be systemic and if say a running program serializes (stores to disk this corruption we have the mother of all bugs )
  Why do we have this Guarantee if any that this wont happen ?
Ps, for those with microprocessor dynamic ram lab and understands how the Os uses memory,please reply . If we truly have this guarantee this would be a great idea, otherwise it seems damn foolish
  Putting he question another way, How is the use this Ram locked out from say another program or process that uses the video memory ?

 

Re:Maybe, but need GPU specs (1)

644bd346996 (1012333) | about 7 years ago | (#20941221)

No programs would have direct access to the video RAM, any more than they have access to the address space of other running programs. Only the kernel itself would be able to control what gets swapped out to vram.

Seriously, you write as though your brain hasn't been used since the heyday of Windows 3.1. Go learn what a real operating system is these days.

AGP/PCI-E (-1, Troll)

Anonymous Coward | about 7 years ago | (#20939915)

All Good People/Punch Coons In-Eyes

Re:AGP/PCI-E (-1)

Anonymous Coward | about 7 years ago | (#20940001)

Don't the raccoons get angry?

Re:AGP/PCI-E (-1, Troll)

Anonymous Coward | about 7 years ago | (#20940075)

Don't the raccoons get angry?

As a member of PETA, I sincerely apologize for the confusion. I was referring to niggers.

Please, never attack a raccoon. Unlike the other coons, they contribute to society.

Re:AGP/PCI-E (0)

Anonymous Coward | about 7 years ago | (#20940191)

s/niggers/trolls/g

Re:AGP/PCI-E (0)

Anonymous Coward | about 7 years ago | (#20940115)

Yes, and that's why they want to kill whitey.

Performance != Stability (5, Insightful)

bostons1337 (1025584) | about 7 years ago | (#20939923)

This doesn't sound like the most stable thing to do especially if your running a server on the same computer. It sounds good on paper but implementing it is a whole different game. From my years in IT never try anything like this on production servers, thats what test servers are for.

Re:Performance != Stability (1)

verbatim_verbose (411803) | about 7 years ago | (#20940181)

Eh... if you're running production servers, spend a few bucks and buy adequate RAM and disks.

This is more an exercise for novelty/home enthusiasts.

Re:Performance != Stability (1)

IcephishCR (7031) | about 7 years ago | (#20940201)

But if it works well in the test environment your could then transition into production - I would us this for other items than swap; most servers have plenty of ram, its those small seek happy applications that need alot of temp space (like AV and Spam checkers for mail servers, PHP temp space) items like these could be mapped there instead of tying up disk I/O for very small and transient files

No (0)

Anonymous Coward | about 7 years ago | (#20939931)

VRAM speed is optimized for access by the GPU.

In addition, AGP buses will provide much faster writes than readback. PCIe devices should have less of this problem.

Are you looking at the right timings? (4, Informative)

arivanov (12034) | about 7 years ago | (#20940097)

Err... Which hdparm timings are you looking at?

One of the biggest advantages of using VRAM for disks is the nearly 0 seek latency.

As a result even if the card is slower than disk on read you are still likely to have an overall performance gain.

In addition to that there is a number of architectural vagaries to consider. AGP is asymmetric. Reading is considerably slower than writing (can't find anywhere by how much. Damn...).

video RAM (4, Insightful)

mcmonkey (96054) | about 7 years ago | (#20940145)

Are you sure the system has video RAM? Doesn't built-in video generally share the system RAM?

Re:video RAM (1)

demonbug (309515) | about 7 years ago | (#20940575)

I was wondering the same thing. If that is the case, it makes sense that it would be pretty slow - all that you would be doing by making use of the "video RAM" is cannibalizing system RAM, and accessing it in a presumably slower way (since any reads/writes to it would have the extra step of going through the video system, which depending on the age of the system is likely to be relatively slow).

Re:video RAM (2, Informative)

julesh (229690) | about 7 years ago | (#20940981)

Doesn't built-in video generally share the system RAM?

Not always. For example, I have a machine that has 32MB of video RAM, and can use additional system RAM if necessary.

Short answer: (1, Insightful)

Ihlosi (895663) | about 7 years ago | (#20940159)

Is video RAM a good swap device

No.

It's an interesting hack to use it as such, but in terms of performance you're better off investing in more RAM and a faster HDD.

Re:Short answer: (1)

AVee (557523) | about 7 years ago | (#20941133)

If you were to choose between spending money on one or the other you may well be right, however for people like me, the ones with a big box of old hardware bur never enough memory it may well be a cheaper solution.

yeah, I know it means no screen (4, Funny)

jollyreaper (513215) | about 7 years ago | (#20940193)

I know headless means that the system doesn't have a screen but I still get this idea of a box strapped to a horse, chasing down Ichabod Crane.

Re:yeah, I know it means no screen (2, Funny)

curmudgeous (710771) | about 7 years ago | (#20940843)

...chasing down Ichabaud Crane.

There, fixed that for you.

Re:yeah, I know it means no screen (1)

eharvill (991859) | about 7 years ago | (#20941219)

...chasing down Ichabaud Crane.
There, fixed that for you.
How does that compare to 2400 baud?

Quote: Direct Rendering or fast swap. Your choice. (0)

Anonymous Coward | about 7 years ago | (#20940235)

I, for one, pick Direct Rendering...

In other words, this is useless.

Re:Quote: Direct Rendering or fast swap. Your choi (1)

Bert64 (520050) | about 7 years ago | (#20940521)

But his server is headless, as servers should be. What is he going to be directly rendering to?
He also stated the videocard was built in, so he cant even put it to good use in another machine.

Finally! (0)

Anonymous Coward | about 7 years ago | (#20940275)

Finally! A practical use for those ATI video cards [slashdot.org] that have 1 GB of video RAM!

Interesting Idea (1)

GodCandy (1132301) | about 7 years ago | (#20940343)

I have never used the ram on my graphics card for swap or as a ramdisk however that is an interesting idea. I use ram as ramdisk for some of the directories on my gentoo stations. It seems to make some processes work faster. I would have to do some down and dirty testing to see if the overall performance increase is worth the amount of ram used by the ramdisk. I currently have no less than 4 gigs in any machine that I am doing this with thus it is not a big issue however if you are running on 512 or even 1 gig and are using quite a bit of space for your ramdisk it will end up causing it to be slower than normal due to the shrinking in the amount of ram available.

I do also agree that agp is a slower technology and that most older graphics cards only contain small amounts of memory in comparison to the mass amounts of ram that can be bought today for little money.

Who knows... It might work great... I may have to test this out tonight and see what I come up with...

Useful even if not so fast (3, Insightful)

TeknoHog (164938) | about 7 years ago | (#20940347)

Heck, I remember RAM expansion cards for ISA slots. I'm sure this is faster, though I didn't get any meaningful boost when I tried this once. Nevertheless, if you're running headless system, it's better IMHO if you get some use of the display hardware, rather than no use. Even if it's a little slow. You shouldn't rely on swap as a memory expansion anyway, it's just a way to gracefully degrade performance when you hit the limit.

I think it's also nice to have swap on a different physical device/bus from your main hard drive. Maybe the swap isn't any faster, but at least it isn't slowing down any other hard drive usage.

Works even better with really old video cards (5, Funny)

Waffle Iron (339739) | about 7 years ago | (#20940529)

Old-fashioned dual-ported VRAM is an excellent solution for an e-commerce site. You can be loading customer transactions and one-click purchases from the VRAMs' random-access ports while you're simultaneously serving web pages from the serial-access ports. Your performance will double!

Now if you want truly blazing speed, you can track down some of that dual-ported static RAM that came in 40-pin DIPs. Full random access on both ports would let you serve dynamic web pages while you run customer transactions, all with zero wait states on the ISA bus!

Don't try this with linux. (0)

Anonymous Coward | about 7 years ago | (#20940737)

Linux is not a very good OS to use for swapping to the video card. It's video bus support is hopelessly dated and slow, though you can use the experimental driver if you patch the kernel.

Re:Don't try this with linux. (0)

Anonymous Coward | about 7 years ago | (#20940925)

No, no, no! You have to do it way up at the top like the racial slur guy!

Alot of sever boards have low end pci video card.. (0)

Joe The Dragon (967727) | about 7 years ago | (#20940853)

Alot of sever boards have low end pci video cards built into with other i/o on the same pci bus. So this will not work that good in a setup like that.

Optimizations are necessary (2, Insightful)

Rolman (120909) | about 7 years ago | (#20940899)

It's very cool that the memory becomes available so easily with just a couple driver parameters. It's a pity that there's a lot to optimize before it can really shine.

Memory architecture on a GPU is very different from system memory. Memory there is not linear and the video memory controller will go through a lot of remapping to present it as such, something that's probably very slow because of the VBIOS. Then there's the issue of tuning the bus so that reads and writes are using its full bandwidth, and again a poor VBIOS implementation may be the bottleneck.

The best but harder solution would be to have a means to program the video memory controller directly to map pages of system memory and do all the copying and moving itself. Of course, this is hardly ever going to happen, but some improvements can still make it into the VBIOS, some of which will probably happen once GPGPU-style programming starts getting more attention as both nVidia and AMD/ATI are seemingly interested in pushing with things like CUDA [nvidia.com] and Stream Computing [amd.com] .

The concept as it is now, however, remains extremely cool. It might still be orders of magnitude slower in terms of latency and throughput compared to system memory, but it should be a lot more responsive than a hard drive just because there are no seek times involved. That said, hdparm -t may not be the best tool for measuring performance, so i'd be more interested in a random access benchmark since it may make some use of the parallel memory architecture inherent on a video card.

Sounds like a stupid idea to me (0)

TheLink (130905) | about 7 years ago | (#20941037)

0) AGP performance sucks for this
1) How sure are you that they test video ram well enough to use for that purpose? Some people might not notice a few display artifacts due to video ram having one bit stuck at zero or one, but for swap that's not good.
2) Just buy more _real_ ram, nowadays for normal usage, I recommend setting a small swap partition, that's only purpose is to tell you that you're running out of ram (by making the machine more sluggish). Set the swap too big and you have the entire machine running from swap which nowadays is about as good as powering the machine off abruptly (since that's what everyone does rather than wait weeks or more). Hard drives are too many magnitudes slower than real RAM for users to want to recreate the "Drum memory" era. Who sets their ssh and tcp timeouts to 1 month? ;)

3) If you need more ram than the old machine can get you, buy a new machine, the last I checked PC hardware is cheap, they're amongst the cheapest things in the world for the technology and materials you get. Use the old machine for something else or give it away.

tried this, (0)

Anonymous Coward | about 7 years ago | (#20941039)

you get really crappy read speed even with pcie atleast with nvidia 7600, the write works nice but really usless. Someone should make a pcie card with slots for ddr/pc133 so we could these gigs that just lays in the drawer this would be far more usefull.

Might be possible to decrease any shared memory (1)

Thorwak (836943) | about 7 years ago | (#20941085)

Since it's an old machine with onboard video it's quite possible it's using system RAM as graphics RAM. So, check out the BIOS, there might be a setting to reduce the amount of memory allocated to the graphics adapter in the fist place. More efficient than trying to swap through some obscure hack :)

Ha! (2, Funny)

TheVelvetFlamebait (986083) | about 7 years ago | (#20941205)

And to think people laughed at me when I bought a shiny new 1GB video card!
Load More Comments
Slashdot Login

Need an Account?

Forgot your password?