On 2022-04-08, Stefan Hagen <sh+openbsd-m...@codevoid.de> wrote: > Mihai Popescu wrote (2022-04-08 05:17 CEST): >> Since my computer is struggling with chromium and I suspect it's the >> disk access being too slow, I want to map the directory accessed by >> chromium ( i think it is ~/.cache) into the memory. >> >> Looking in the man, i spotted rd, but i think i need to setup this in >> the kernel. >> The next choice is tmpfs. >> The next one is mfs. >> >> I have no experience with this stuff, so does it worth to take this approach? >> If so, what is the recommended fs, please? >> Is it possible to map/mount a directory from a partition only, or is >> it the entire partition only accepted as a mount argument?
Just as with a disk/network filesystem, you can mount it at whatever directory you like. So directly over /home/username/.cache is possible. > I haven't played with rd or tmpfs, but this works: rd is for creating the "ramdisk" kernel for the installer or similar use-cases. tmpfs is disabled in GENERIC kernels, so you'll need to build your own, and hope you don't run into the reason for it being disabled. mfs is probably right for this case (but do check speeds though; for Mihai's use-case it seems likely to be better, but a decent SSD is likely to be same/faster than mfs.