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

Joined: 01 Jul 2004 Posts: 2994 Location: 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. _________________ Core-i7-2700K@4.1GHz/8GB RAM/180GB SSD/Intel HD3000 graphics
What the heck am I advocating? |
|
| 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 Advocate

Joined: 01 Jul 2004 Posts: 2994 Location: 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. _________________ Core-i7-2700K@4.1GHz/8GB RAM/180GB SSD/Intel HD3000 graphics
What the heck am I advocating? |
|
| Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 29956 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: 1146 Location: Austria
|
|
| Back to top |
|
 |
boerKrelis Apprentice

Joined: 01 Jul 2003 Posts: 229 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: 2156
|
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 Moderator


Joined: 30 Nov 2004 Posts: 9464 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. _________________ Gentoo Handbook | My website |
|
| Back to top |
|
 |
|