Re: Creating compressed backing_store as swapfile

2018-11-05 Thread Austin S. Hemmelgarn
On 11/5/2018 11:53 AM, valdis.kletni...@vt.edu wrote: On Mon, 05 Nov 2018 11:28:49 -0500, "Austin S. Hemmelgarn" said: Also, it's probably worth noting that BTRFS doesn't need to decompress the entire file to read or write blocks in the middle, it splits the file into 128k blocks and

Re: Creating compressed backing_store as swapfile

2018-11-05 Thread valdis . kletnieks
On Mon, 05 Nov 2018 11:28:49 -0500, "Austin S. Hemmelgarn" said: > Also, it's probably worth noting that BTRFS doesn't need to decompress > the entire file to read or write blocks in the middle, it splits the > file into 128k blocks and compresses each of those independent of the > others, so it

Re: Creating compressed backing_store as swapfile

2018-11-05 Thread Austin S. Hemmelgarn
On 11/5/2018 11:14 AM, valdis.kletni...@vt.edu wrote: On Mon, 05 Nov 2018 11:07:12 -0500, "Austin S. Hemmelgarn" said: Performance isn't _too_ bad for the BTRFS case though (I've actually tested this before), just make sure you disable direct I/O mode on the loop device, otherwise you run the

Re: Creating compressed backing_store as swapfile

2018-11-05 Thread valdis . kletnieks
On Mon, 05 Nov 2018 11:07:12 -0500, "Austin S. Hemmelgarn" said: > Performance isn't _too_ bad for the BTRFS case though (I've actually > tested this before), just make sure you disable direct I/O mode on the > loop device, otherwise you run the risk of data corruption. Did you test that for

Re: Creating compressed backing_store as swapfile

2018-11-05 Thread valdis . kletnieks
On Mon, 05 Nov 2018 20:31:46 +0530, Pintu Agarwal said: > 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]. What platform

Re: Creating compressed backing_store as swapfile

2018-11-05 Thread Austin S. Hemmelgarn
On 11/5/2018 10:58 AM, Adam Borowski wrote: 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

Creating compressed backing_store as swapfile

2018-11-05 Thread Pintu Agarwal
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