[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181105155815.i654i5ctmfpqhggj@angband.pl>
Date: Mon, 5 Nov 2018 16:58:15 +0100
From: Adam Borowski <kilobyte@...band.pl>
To: Pintu Agarwal <pintu.ping@...il.com>
Cc: linux-mm@...ck.org, open list <linux-kernel@...r.kernel.org>,
kernelnewbies@...nelnewbies.org
Subject: Re: Creating compressed backing_store as swapfile
On Mon, Nov 05, 2018 at 08:31:46PM +0530, Pintu Agarwal wrote:
> Hi,
>
> I have one requirement:
> I wanted to have a swapfile (64MB to 256MB) on my system.
> But I wanted the data to be compressed and stored on the disk in my swapfile.
> [Similar to zram, but compressed data should be moved to disk, instead of RAM].
>
> Note: I wanted to optimize RAM space, so performance is not important
> right now for our requirement.
>
> So, what are the options available, to perform this in 4.x kernel version.
> My Kernel: 4.9.x
> Board: any - (arm64 mostly).
>
> As I know, following are the choices:
> 1) ZRAM: But it compresses and store data in RAM itself
> 2) frontswap + zswap : Didn't explore much on this, not sure if this
> is helpful for our case.
> 3) Manually creating swapfile: but how to compress it ?
> 4) Any other options ?
Loop device on any filesystem that can compress (such as btrfs)? The
performance would suck, though -- besides the indirection of loop, btrfs
compresses in blocks of 128KB while swap wants 4KB writes. Other similar
option is qemu-nbd -- it can use compressed disk images and expose them to a
(local) nbd client.
Meow!
--
⢀⣴⠾⠻⢶⣦⠀ Have you heard of the Amber Road? For thousands of years, the
⣾⠁⢰⠒⠀⣿⡁ Romans and co valued amber, hauled through the Europe over the
⢿⡄⠘⠷⠚⠋⠀ mountains and along the Vistula, from Gdańsk. To where it came
⠈⠳⣄⠀⠀⠀⠀ together with silk (judging by today's amber stalls).
Powered by blists - more mailing lists