From mboxrd@z Thu Jan 1 00:00:00 1970 From: pintu.ping@gmail.com (Pintu Agarwal) Date: Mon, 5 Nov 2018 20:31:46 +0530 Subject: Creating compressed backing_store as swapfile Message-ID: To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org 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 ? Thanks, Pintu From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ua1-x92b.google.com ([2607:f8b0:4864:20::92b]) by shelob.surriel.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91) (envelope-from ) id 1gJgO9-0000j1-Os for kernelnewbies@kernelnewbies.org; Mon, 05 Nov 2018 10:02:01 -0500 Received: by mail-ua1-x92b.google.com with SMTP id u19so2218606uae.4 for ; Mon, 05 Nov 2018 07:02:00 -0800 (PST) MIME-Version: 1.0 From: Pintu Agarwal Date: Mon, 5 Nov 2018 20:31:46 +0530 Message-ID: Subject: Creating compressed backing_store as swapfile To: linux-mm@kvack.org, open list , kernelnewbies@kernelnewbies.org List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces@kernelnewbies.org Message-ID: <20181105150146.s8yIBKAsXawvDJHy44iF7FYymM_UfjkTBJrffae4kFI@z> 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 ? Thanks, Pintu _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies