4 ms·
would be interesting to combine this with `zram` to move compressed swap to vram instead
by riobard 4y ago
would be interesting to combine this with `zram` to move compressed swap to vram instead
- drpixie 4y agoand you have all that GPU processing power for compressing & decompressing :)
- rbanffy 4y agoBut then you'd need to transfer uncompressed data over the PCIe bus.
- codeflo 4y agoI assume you're tongue in cheek, but just to make a serious point, it should never make sense to swap from cheap RAM to more expensive RAM. The whole point of swap is to move rarely used stuff into storage with a lower cost per GB. Otherwise, you would just buy more RAM in the first place.
- userbinator 4y agoVRAM will still be faster than HDD.
- dspillett 4y ago> you would just buy more RAM in the first place Unless you have hit the limit on how much "normal" RAM the current machine(s) can have/address, and/or you need extra memory for something now, etc. Or, of course, you are just playing with something cool but ultimately pointless!
- alexvoda 4y agoFor example, you might have a laptop with soldered RAM and a discrete GPU. There may be tasks where you don't need the dGPU but could use the extra RAM.
- citrin_ru 4y agoUnless you have a notebook/desktop with a powerful GPU and there were no option with all things staying the same but a cheaper GPU so you ended up which under-utilised GPU.
- unphased 4y agoIt's relatively fast (probably could be faster than NVMe if optimized, i did not rtfm) and it is available. it's not the most horrible of ideas. I am fairly fairly certain lots of applications will load assets into vram and then evict them from system memory. Why not leverage this for general purpose use if it makes sense (after taking into account the security implications of course)?
- ZiiS 4y agoIf you pay for GPU memory for the 10% of tasks you need it; it is cheaper then system RAM the rest of the time.
- riobard 4y agoYou need to factor in the compression ratio to see the benefits of swapping from RAM to RAM :P
- peter_d_sherman 4y agoAgreed! It would be interesting to implement this and a highly parallelizable GPU background data compression algorithm... It could be zram (zram would be a good choice!), it could be something else, it all depends on what kind of performance/compression is desired, and how parallelizable the compression algorithm is...
- KRAKRISMOTT 4y agoIntel Optane anyone?
- LargoLasskhyfv 4y agoI did that long ago with an IBM T60p, which had a 32bit Centrino, and only 3.25 or 3.5GB usable RAM out of 4GB. While the ATI FireGL had 256MB. At the time there was no ZRAM, but its predecessor compcache. IIRC I only needed about 2MB VRAM for the stuff I did, any capability the FireGL had wasn't supported by MESA/XORG/DRI at the times, apart from useless GLXGEARS. What can I say? After much fiddling it worked stable, resulting in running into the limits of that POS much later. Extending its usability. Not that much, but noticeable. Even Google Earth ran. Probably because it did anything in software anyways, on that combo of supported and exposed capabilities of the GPU at that time.