Understanding zram concepts in embedded system

2.1k Views Asked by At

I'm new to zram concept.

Basically I'm understanding memory allocation for zram devices and usage in Embedded system.

I Googled to find maximum size that can be assigned to disksize /sys/block/zram/disksize but its in vain.

I have few basic doubts .

The procedure to use zram is

Basically suggested disksize is to use 25% of total RAM memory. Total RAM size is 512MB of my device.

echo "134217728" > /sys/block/zram0/disksize

mkswap /dev/block/zram0

swapon /dev/block/zram0
  1. What is the maximum size limit for /sys/block/zram0/disksize that can be assigned?

  2. From where the memory is get allocated for zram is that from emmc or RAM?

  3. The mkswap fails to create swap disk if i assign 4GB for /sys/block/zram0/disksize but not 3.9GB why?
  4. Also zram is RAM based block device can any please through some light on RAM based block device?
1

There are 1 best solutions below

1
On