vramfs Unused RAM is wasted RAM, so why not put some of that VRAM in your graphics card to work? vramfs is a utility that uses the FUSE library to create a file system in VRAM. The idea is pretty much the same as a ramdisk, except that it uses the video RAM of a discrete graphics card to store files. It is not intented for serious use, but it does actually work fairly well, especially since consumer GPUs with 4GB or more VRAM are now available. On the developer's system, the continuous read performance is ~2.4 GB/s and write performance 2.0 GB/s, which is about 1/3 of what is achievable with a ramdisk. That is already decent enough for a device not designed for large data transfers to the host, but future development should aim to get closer to the PCI-e bandwidth limits. See the benchmarks section for more info. Requirements Linux with kernel 2.6+ FUSE development files A graphics card with support for OpenCL 1.2 Building First, install the OpenCL driver for your graphics card and verify that it's recognized as an OpenCL device by running clinfo . Then install the libfuse3-dev package or build it from source. You will also need pkg-config and OpenCL development files, ( opencl-dev , opencl-clhpp-headers package or equivalent), with version 1.2 of the OpenCL headers at least. Just run make to build vramfs . If you want to debug with valgrind, you should compile with the minimal fake OpenCL implementation to avoid filling your screen with warnings caused by the OpenCL driver: valgrind: make DEBUG=1 Mounting Mount a disk by running bin/vramfs <mountdir> <size> . The mountdir can be any empty directory. The size is the disk size in bytes. For more information, run bin/vramfs without arguments. The recommended maximum size of a vramdisk is 50% of your VRAM. If you go over that, your driver or system may become unstable because it has to start swapping. For example, webpages in Chrome will stop rendering properly. If the disk has been inactive for a while, the graphics c...
First seen: 2025-03-29 18:29
Last seen: 2025-03-30 12:32