mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-22 01:22:00 +00:00
Allow memory reclamation through deletion
When going to zram, things were solid for space reduction as data was written, however memory could no longer be reclaimed. It turns out that zram supports TRIM, and by telling xfs discard, we have it do trim-on-demand. It is by default off out of performance concerns, but I don't think that applies to a zram backed filesystem.
This commit is contained in:
parent
2ecab0432c
commit
490827fe3a
@ -14,7 +14,7 @@ memtot=$(grep ^MemTotal: /proc/meminfo|awk '{print $2}')
|
||||
memtot=$((memtot/2))$(grep ^MemTotal: /proc/meminfo | awk '{print $3'})
|
||||
echo $memtot > /sys/block/zram0/disksize
|
||||
mkfs.xfs /dev/zram0 > /dev/null
|
||||
mount /dev/zram0 /mnt/overlay
|
||||
mount -o discard /dev/zram0 /mnt/overlay
|
||||
mkdir -p /mnt/overlay/upper /mnt/overlay/work
|
||||
mount -t overlay -o upperdir=/mnt/overlay/upper,workdir=/mnt/overlay/work,lowerdir=/mnt/remote disklessroot /sysroot
|
||||
mkdir -p /sysroot/etc/ssh
|
||||
|
Loading…
Reference in New Issue
Block a user