From: "Austin S. Hemmelgarn" <ahferroin7@gmail.com>
To: valdis.kletnieks@vt.edu
Cc: Adam Borowski <kilobyte@angband.pl>,
kernelnewbies@kernelnewbies.org,
Pintu Agarwal <pintu.ping@gmail.com>,
open list <linux-kernel@vger.kernel.org>,
linux-mm@kvack.org
Subject: Re: Creating compressed backing_store as swapfile
Date: Mon, 5 Nov 2018 11:28:49 -0500 [thread overview]
Message-ID: <6a1f57b6-503c-48a2-689b-3c321cd6d29f@gmail.com> (raw)
Message-ID: <20181105162849.CituD82OpTE_XqnXL8HOx3Wddk6mP9g1olOFl4NYG6I@z> (raw)
In-Reply-To: <42594.1541434463@turing-police.cc.vt.edu>
On 11/5/2018 11:14 AM, valdis.kletnieks@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 risk of data corruption.
>
> Did you test that for random-access. or just sequential read/write?
> (Also, see the note in my other mail regarding doing a random-access
> write to the middle of the file...)
>
Actual swap usage. About 16 months ago, I had been running a couple of
Intel NUC5PPYH boxes (Pentium N3700 CPU's, 4GB of DDR3-1333 RAM) for
some network prototyping. On both, I had swap set up to use a file on
BTRFS via a loop device, and I made a point to test both with LZ4 inline
compression and without any compression, and saw negligible performance
differences (less than 1% in most cases). It was, of course,
significantly worse than running on ext4, but on a system that's so
resource constrained that both storage and memory are at a premium to
this degree, the performance hit is probably going to be worth it.
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 can just decompress the 128k block that holds the actual
block that's needed.
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
next prev parent reply other threads:[~2018-11-05 16:29 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-05 15:01 Creating compressed backing_store as swapfile Pintu Agarwal
2018-11-05 15:01 ` Pintu Agarwal
[not found] ` <20181105155815.i654i5ctmfpqhggj@angband.pl>
2018-11-05 16:07 ` Austin S. Hemmelgarn
2018-11-05 16:07 ` Austin S. Hemmelgarn
2018-11-05 16:14 ` valdis.kletnieks at vt.edu
2018-11-05 16:14 ` valdis.kletnieks
2018-11-05 16:28 ` Austin S. Hemmelgarn [this message]
2018-11-05 16:28 ` Austin S. Hemmelgarn
2018-11-05 16:53 ` valdis.kletnieks at vt.edu
2018-11-05 16:53 ` valdis.kletnieks
2018-11-05 16:55 ` Austin S. Hemmelgarn
2018-11-05 16:55 ` Austin S. Hemmelgarn
2018-11-08 9:51 ` Pintu Agarwal
2018-11-08 9:51 ` Pintu Agarwal
2018-11-05 16:12 ` valdis.kletnieks at vt.edu
2018-11-05 16:12 ` valdis.kletnieks
2018-11-08 9:46 ` Pintu Agarwal
2018-11-08 9:46 ` Pintu Agarwal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6a1f57b6-503c-48a2-689b-3c321cd6d29f@gmail.com \
--to=ahferroin7@gmail.com \
--cc=kernelnewbies@kernelnewbies.org \
--cc=kilobyte@angband.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=pintu.ping@gmail.com \
--cc=valdis.kletnieks@vt.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).