In short, no. The description ram-DISK (which is nothing to do with zram) basically indicates that a portion of RAM is being used to store programs (as they would be on a disc such as hard drive or cd or dvd or flashdrive, for example). That pseudo-disc stored in RAM is obviously using up some of the RAM for pure 'storage' purposes, but of course some RAM has to be kept left over because actually running a program requires it to be loaded (and uncompressed) into RAM so it can be executed. Problem is big programs executing from RAM may end up wanting more space than RAM is available. Traditional way out of that is to have what is called swap space on external (non-RAM) storage - then VIRTUAL RAM is the size of (total RAM - any ramdisc size) + size_of_swap_space. You probably know that Virtual RAM works by swapping out some actual active executing programs (when they are not actively running) into the swap-space and then loading them back in again when CPU wants to execute them (this is a slight simplification of the process of course). Trouble is the swapping-out and swapping-in process from RAM to external storage is SLOW...bigpup wrote:.Furthermore, if you are using such as a usb-flashstick, using zram for swap does not require continual data writes to the flash device, which helps it last longer
Is this working the same as the ram disk that Puppy uses when running from a USB flash drive?
zram is a clever trick, where a portion of the 'free non-Virtual RAM' (i.e. actual RAM) is used as an in-RAM swap space. At first sight that idea seems ridiculous because clearly that zram swap space is using some actual RAM, which would appear to defeat its purpose. However, the 'trick' is that the programs swapped into that zram area are automatically COMPRESSED. The total Virtual RAM will be whatever (actual RAM remains + the zram data-compressing space), which is same formula as conventional swap space. But the difference it that the zram data is highly compressed so effectively Virtual RAM is much bigger since effectively = actual RAM + (zram-size x compression factor), and it's fast cos really it is all in actual RAM (so fast access). So end advantage of using zram is that yes, actual non-zram-swap RAM will be less since some used for zram swap, but the zram swap, being compressed is like having part of the actual RAM magnified in size (without disadvantage of slow access to external storage swap).
Yes, decompression does take CPU cycles (time) but generally that decompression is done much faster than external storage access would have taken.
No. It's a separate thing. Puppy's methodology, uses some RAM, including simply storing programs inside a pseudo storage disc in RAM (ramdisk), which can certainly be accessed fast since in RAM (but still has to be copied into other part of RAM for actual instruction execution since ramdisk is acting like a storage disc, not like RAM, if you see what I mean...); what is left can be divided into RAM + zram-swap per above description, which gives a much larger overall VIRTUAL RAM in which instructions are (effecively) actually executed (albeit via page swapping in and out of the fast effectively size-magnified compressed RAM-based swap space).bigpup wrote: Does this conflict with proper operation of the Puppy ram disk?
How Puppy works:
http://bkhome.org/archive/puppylinux/de ... works.html
Unfortunately, I've seen comments dismissing zram as not-working, which reveals they have never actually tested its operation. Of course it magnifies effective Virtual RAM memory, which means you can run more processes before machine runs out of virtual RAM space (after which it would crash...). You can test that from a webbrowser by loading memory-hungry pages such as gmail or facebook and opening more and more tabs of these till crash inevitably happens - you will find you can open more such tabs with zram enabled. You can also monitor RAM usage in either 'free' or 'top' utility and see the RAM+zram-swap actually running out. And using zram-swap is MUCH faster than when external slow storage space swap is being used, so it is a win win situation, but of course if you want to run even more processes you also need to have external storage swap, but zram-swap will be used first (once external swap actually starts being used you would notice your system slowing down........ but at least would help prevent actual system crash/freeze...).
wiak