View previous topic :: View next topic |
Author |
Message |
Well.Heeled.Man n00b
Joined: 25 Aug 2011 Posts: 19
|
Posted: Sat Mar 24, 2012 6:10 pm Post subject: Use VRAM as System RAM before actual RAM |
|
|
Hi Folks,
Just a quick question that I was pondering:
I have an Nvidia 570m with 1.5 GB of VRAM. This is considerably faster than my system RAM, and underutilized in a Gentoo system. Can I set aside say, 1GB of this as system RAM and force the system to use this before the system RAM. In normal usage, it seems that I would never really be in a position where I would need to use the system RAM and I would get a minor performance boost.
I would guess that I would need to set up some kind of block device on my VRAM that is mounted a swap, and use vm.swapiness in sysctl to encourage swapping before RAM usage. However, even with swapiness=100, it will still use my system RAM as I have 16GB of it. Does anyone have any experience/comments/guides RE: this and in particular, a way to force the system to use swap in preference to RAM.
Cheers,
Scott |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9679 Location: almost Mile High in the USA
|
Posted: Sat Mar 24, 2012 7:03 pm Post subject: Re: Use VRAM as System RAM before actual RAM |
|
|
Well.Heeled.Man wrote: |
I have an Nvidia 570m with 1.5 GB of VRAM. This is considerably faster than my system RAM, |
I don't quite understand this. Video graphics card memory has additional latency to access - system RAM is always faster. Video RAM (with bus latency) however is faster than hard drive, so you can always swap to it with benefit
Swap is swap. This means the system actually uses real system RAM and then "swaps" it out to secondary storage, whether it be hard disk or video memory. Of course this is slower than just using real RAM.
However, since you have 16GB RAM there's no need for swap.
Not sure where you see where the performance boost. At best PCI/PCIe/AGP memory is memory mapped and you can access the mapped area directly without paging... but as swap you lose any speed benefit as it will need to copy from/to the storage. _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
Well.Heeled.Man n00b
Joined: 25 Aug 2011 Posts: 19
|
Posted: Sat Mar 24, 2012 7:18 pm Post subject: |
|
|
Using it a swap was just how I envisaged it working, but I see what you mean. I was not thinking about the additional latency; I was only thinking about the fact that my VRAM is overclocked DDR5 @ 1900mhz and my RAM is DDR3 @ 1333.
Is it possible to directly map the PCIe VRAM? Obviously this would have implications for the GPU, but I am not sure I need more than 0.5GB VRAM for non-gaming workloads. |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9679 Location: almost Mile High in the USA
|
Posted: Sun Mar 25, 2012 5:47 pm Post subject: |
|
|
It takes several tens of cycles to access the first byte for PCIe, then the memory controller on the video board has its own latency to deal with, which is probably not much different than DDR3 overall. The sum of the two will probably be worse than the DDR3 by itself.
This isn't really worth it in my opinion. The latency will kill overall. And not even mentioning the bandwidth of PCIe versus a direct memory controller connection. _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54237 Location: 56N 3W
|
Posted: Sun Mar 25, 2012 6:53 pm Post subject: |
|
|
Well.Heeled.Man,
With well designed software and a decent amount of on chip CPU cache, you rarely get a CPU stall waiting for main memory.
Instead the cache hit ratio is over 95% and CPU cache is full CPU core speed.
It may not be possible to cache VRAM in th CPU. That would mean the CPU has to snoop on what the GPU does to its VRAM, which sounds expensive in terms of bus bandwidth _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
ToeiRei Veteran
Joined: 03 Jan 2005 Posts: 1191 Location: Austria
|
Posted: Mon Mar 26, 2012 11:18 am Post subject: |
|
|
I once used the Graphic cards memory as a block device for keeping swap files... Wouldn't that solve your problem somehow?
The howto I used back in 2006: http://my.stargazer.at/2006/04/10/graphikspeicher-als-storage-verwenden/
maybe that helps _________________ Please stand by - The mailer daemon is busy burning your messages in hell... |
|
Back to top |
|
|
boerKrelis Apprentice
Joined: 01 Jul 2003 Posts: 241 Location: The Netherlands
|
Posted: Mon Mar 26, 2012 11:49 am Post subject: |
|
|
The VRAM is wicked fast *from the perspective of the GPU*. From the CPU, writing to it isn't quick and reading is even slower (it's not really a use case to read textures *back* from VRAM). |
|
Back to top |
|
|
depontius Advocate
Joined: 05 May 2004 Posts: 3509
|
Posted: Mon Mar 26, 2012 12:30 pm Post subject: |
|
|
I've heard that from a cost perspective, you may just be ahead to get a small SSD for use as a swap device. _________________ .sigs waste space and bandwidth |
|
Back to top |
|
|
i92guboj Bodhisattva
Joined: 30 Nov 2004 Posts: 10315 Location: Córdoba (Spain)
|
Posted: Mon Mar 26, 2012 12:38 pm Post subject: |
|
|
Any of the specs that you read for your graphics vram is referred only to it working in conjunction with your gpu, not the main cpu. In any chain, the strength of it is defined by the strength or the weakest link, in this case, the bus. If your reasoning was right, then there'd be no sense in having memory slots. We'd just plug the ram into the pcie or agp slots and be done with it. |
|
Back to top |
|
|
|