Overv / vramfs

VRAM based file system for Linux
1.26k stars 65 forks source link

High memory usage #34

Closed gcoimbra closed 1 year ago

gcoimbra commented 1 year ago

I'm observing about 6.59% of ram usage by vramfs process in a 16 GiB system. I'm allocating 8 GiB of vram. Is this normal?

gcoimbra commented 1 year ago

Actually, I have a further update. It seems that vramfs is allocating directly on system ram. I noticed that, after I use dd to fill an swapfile located on the directory mounted by vramfs, the memory showed as occupied in the GPU by radeontop decreases to zero (before it was full, as I use all VRAM with vramfs)

twobombs commented 1 year ago

create vram tmpfs [ example assumes 24Gb card ]

mkdir /tmp/vram ./root/vramfs/bin/vramfs /tmp/vram/ 23G & sleep 10 truncate -s 23G /tmp/vram/cache

setup cache as a blockdevice losetup /dev/loop33 /tmp/vram/cache

create & mount swap mkswap -f /dev/loop33 swapon /dev/loop33

Green-Sky commented 1 year ago

I think the nvidia driver now pins both, vram and system ram. I wonder with which version that started. (running Driver Version: 515.86.01)

twobombs commented 1 year ago

have not noticed this behaviour in Ubuntu 23.04 and NV 525.x Screenshot from 2023-03-26 14-55-59

gcoimbra commented 1 year ago

I think we can close this issue. I'm sorry I forgot to add here that I've discovered that because of problems with OpenCL drivers with AMD, the allocated memory by swapon was not in the GPU's VRAM, instead it was in my own RAM. That's why it reported that amount of memory utilization.