Vramfs: Vram Based Filesystem for Linux
github.com
github.com
That would give proper caching, direct mmap support if desired, a reliable, correct and concurrent filesystem (as opposed to this author's "all of the FUSE callbacks share a mutex to ensure that only one thread is mutating the file system at a time"), etc.
> harder drive
Here's the direct YouTube link[0]I'd *HIGHLY* recommend this video to anyone here. It is exactly that fun silly computer science stuff where you also learn a shit ton. His channel is full of this stuff.
Don't ask why, ask why not
Is essentially the motto of his channel, and it is the best. Leads to lots of innovations and I think we all should encourage more of this kind of stuff. [0] https://www.youtube.com/watch?v=JcJSW7RprioVirtual disk should me more then 6 gb/s at least with ddr5.
- OS: Ubuntu 14.04.01 LTS (64 bit)
- CPU: Intel Core i5-2500K @ 4.0 Ghz
- RAM: 8GB DDR3-1600
- GPU: AMD R9 290 4GB (Sapphire Tri-X)
So that's an Gen 2 CPU, with DDR3 RAM and a PCIe 3.0 GPU.On a modern system, with a recent kernel+FUSE, I expect the results would be much better.
But we also now have the phram kernel module, with which you can create a block device completely bypassing FUSE, so using phram should result in even greater performance than vramfs.
Note that that CPU only has PCIe 2.0 according to Intel: https://www.intel.com/content/www/us/en/products/sku/52210/i...
Even gamers and (most) LLM users are not using the GPU all the time.
Some fuse drivers can avoid the overhead by letting the kernel know that the backing resource of a fuse filesystem can be handled by the kernel (e.g. for fuse based overlays FS where the backing storage is xfs or something), that probably isn't applicable here.
If you're in kernel space though I don't think you'd have access to OpenCL so easily, you'd need to reimplement it based on kernel primitives.
The overhead is quite high, because of the additional context switching and copying of data between user and kernel space.
> Could something like eBPF be used to make a faster FUSE-like filesystem driver?
eBPF can't really change any of the problems I noted above. To improve performance one would need to change how the interface between kernel and user space part of FUSE filesystem works to make it more efficient.
That said FUSE support for io_uring, which got merged recently in Linux 6.14, has a potential there, see:
It depends on your use case.
If you serve most of your requests from kernel caches, then fuse doesn't add any overhead. That was the case for me, when I had a FUSE service running to directly serve all commits from all branches (from all of history) at the same time as directories directly from the data in a .git folder.
I have 192GB of CPU VRAM in my desktop and that was cheap to obtain. Absolute best build decision ever.
How? Or what's "cheap" here? (Because I wouldn't call 192G of just regular RAM that's plugged into the motherboard cheap, I think everything else is more expensive, and if there's some hack here that I haven't caught I very much would like to know about it)
Which is pretty cheap compared to the cost of my whole build and whatever other things I've spent on. Cheap is relative, but I'm just saying that if you're going to spend $3000+ on a build, and you love to work with massive datasets, VMs, and things, $500 for a metric fuckton of RAM so that your system is never, ever swapping, is a very worthwhile thing to spend on.
192GB worth of GPU will cost you about $40000, for reference, and will be less performant if your goal is just a vramfs for CPU tasks.
* Beware that using 4 DDR5 slots will cut your memory bandwidth in half on consumer motherboards and CPUs. But I willingly made that tradeoff. Maybe at some point I'll upgrade to a server motherboard and CPU.
Hard to imagine a reasonable real-world use-case for vramfs. Still cool.
They all have MMUs right? So you could defrag all in-use memory to fewer refresh domains too.
> Warning: Multiple users have reported this to cause system freezes, even with the fix in #Complete system freeze under high memory pressure. Other GPU management processes or libraries may be swapped out, leading to nonrecoverable page faults.
and in general you have to be really careful swapping to anything that uses a driver that could itself be swapped (which FUSE is especially prone to, but IIRC even ZFS and NFS did(?) have caveats with swap).
OTOH that same page documents a way to swap to vram without going through userspace, so don't take this as opposition to the general idea:)
ZFS still does. If you run VMs off zvols you want to avoid putting swap there. Learned this the hard way.