Subj : zramfs for swap To : andy5995 From : Maurice Kinal Date : Mon Aug 31 2026 02:35 am Hej andy5995! > Using zramfs is new to me, I've been using it for about a month. I > have 14GB Ram. New to me as well. Offhand it sounds like /dev/ramX which I used to use before I became familiar with the kernel's tmpfs. Comparing tmpfs with nvme0n1p2 - which I currently have mounted on /dev/lfs; # dd if=/dev/zero of=/mnt/lfs/tmp/temp.data bs=4k count=400000 400000+0 records in 400000+0 records out 1638400000 bytes (1.6 GB, 1.5 GiB) copied, 2.69985 s, 607 MB/s # mount -t tmpfs -o size=32g none /mnt/ramdisk # dd if=/dev/zero of=/mnt/ramdisk/temp.data bs=4k count=400000 400000+0 records in 400000+0 records out 1638400000 bytes (1.6 GB, 1.5 GiB) copied, 1.36623 s, 1.2 GB/s In the above example "fdisk -l /dev/nvme0n1" shows the disk as, "Disk model: Samsung SSD 970 EVO Plus 250GB", and nvme0n1p2 is sized to 32G, same as the ramdisk which is ECC DDR4. Note the doubling of write speed as well as saving a precious write cycle on the nvme in question. > Do you think this set up should be adequate? How many penguins? I reserve 2G per penguin, which in this case is 32G (2G x 16 penguins). Normally I don't require a 32G ramdisk but seeing I have a total of 128G available I thought it would make for a comparable example as shown above. > The most RAM intensive I do is compiling and once in a while, My best guess is yes. You probably don't need a 8G ramdisk but if you have 4 penguins then you should be able to get away with a 8G ramdisk which leaves 2G in reserve. Also I would go with tmpfs rather than zramfs which I've never heard of up to now. If I were you I'd compare the output of dd between zramfs and tmpfs and that should help you decide. Chances are good they will be the same seeing they are deploying the same ram. However tmpfs space uses only what it needs, not unlike a virtual image. Without knowing for sure, my bet is on tmpfs being the most dynamic of all the ramdisk types. For sure that is where my money is. Het leven is goed, Maurice -o o- o- o- -o o- o- -o o- -o o- -o o- -o o- -o (\ /) /) /) (\ /) /) (\ /) (\ /) (\ /) (\ /) (\ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ .... Monig biþ uncuþ treowgeþofta, teorað hwilum. Many a trusted friend will prove to be unknown, will fail at times. --- GNU bash, version 5.3.15(1)-release (x86_64-pc-linux-gnu) * Origin: Little Mikey's EuroPoint @ (2:280/464.113) .