* dump tree always shows compression level 3, zstd
@ 2019-12-21 6:27 Chris Murphy
2019-12-21 6:34 ` Qu Wenruo
0 siblings, 1 reply; 3+ messages in thread
From: Chris Murphy @ 2019-12-21 6:27 UTC (permalink / raw)
To: Btrfs BTRFS
kernel 5.4.5
btrfs-progs 5.4
test file is linux.tar (not compressed), it's the only file on the
file system in each case
/dev/sda5 53G 2.8G 50G 6% /mnt none
/dev/sda5 53G 2.2G 50G 5% /mnt zstd 1
/dev/sda5 53G 2.1G 50G 4% /mnt zstd 15
mount and dmesg both show the value for the level I've set; but btrfs
insp dump-t shows extents always have compression 3.
[47567.500812] BTRFS info (device sda5): use zstd compression, level 1
item 14 key (328583 EXTENT_DATA 2060582912) itemoff 15488 itemsize 53
generation 51 type 1 (regular)
extent data disk byte 6461308928 nr 20480
extent data offset 0 nr 131072 ram 131072
extent compression 3 (zstd)
==================
[47793.161246] BTRFS info (device sda5): use zstd compression, level 15 │
item 170 key (328584 EXTENT_DATA 2735341568) itemoff 7220 itemsize 53
generation 54 type 1 (regular)
extent data disk byte 2168475648 nr 24576
extent data offset 0 nr 131072 ram 131072
extent compression 3 (zstd)
I'd expect a bigger difference between level 1 and 15, so I'm a little
suspicious that it really is always using level 3. But it's also
possible that it's just a bug with inspect always reporting level 3.
The rate of the level 15 copy is slower.
--
Chris Murphy
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: dump tree always shows compression level 3, zstd
2019-12-21 6:27 dump tree always shows compression level 3, zstd Chris Murphy
@ 2019-12-21 6:34 ` Qu Wenruo
2019-12-21 18:51 ` Chris Murphy
0 siblings, 1 reply; 3+ messages in thread
From: Qu Wenruo @ 2019-12-21 6:34 UTC (permalink / raw)
To: Chris Murphy, Btrfs BTRFS
[-- Attachment #1.1: Type: text/plain, Size: 1889 bytes --]
On 2019/12/21 下午2:27, Chris Murphy wrote:
> kernel 5.4.5
> btrfs-progs 5.4
>
> test file is linux.tar (not compressed), it's the only file on the
> file system in each case
>
> /dev/sda5 53G 2.8G 50G 6% /mnt none
> /dev/sda5 53G 2.2G 50G 5% /mnt zstd 1
> /dev/sda5 53G 2.1G 50G 4% /mnt zstd 15
>
>
> mount and dmesg both show the value for the level I've set; but btrfs
> insp dump-t shows extents always have compression 3.
>
>
> [47567.500812] BTRFS info (device sda5): use zstd compression, level 1
>
> item 14 key (328583 EXTENT_DATA 2060582912) itemoff 15488 itemsize 53
> generation 51 type 1 (regular)
> extent data disk byte 6461308928 nr 20480
> extent data offset 0 nr 131072 ram 131072
> extent compression 3 (zstd)
This number is not compression level, but compression algorithm.
typedef enum {
BTRFS_COMPRESS_NONE = 0,
BTRFS_COMPRESS_ZLIB = 1,
BTRFS_COMPRESS_LZO = 2,
BTRFS_COMPRESS_ZSTD = 3,
BTRFS_COMPRESS_TYPES = 3,
BTRFS_COMPRESS_LAST = 4,
} btrfs_compression_type;
Level is not recorded in that field.
Thanks,
Qu
>
>
> ==================
>
> [47793.161246] BTRFS info (device sda5): use zstd compression, level 15 │
>
> item 170 key (328584 EXTENT_DATA 2735341568) itemoff 7220 itemsize 53
> generation 54 type 1 (regular)
> extent data disk byte 2168475648 nr 24576
> extent data offset 0 nr 131072 ram 131072
> extent compression 3 (zstd)
>
>
> I'd expect a bigger difference between level 1 and 15, so I'm a little
> suspicious that it really is always using level 3. But it's also
> possible that it's just a bug with inspect always reporting level 3.
> The rate of the level 15 copy is slower.
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: dump tree always shows compression level 3, zstd
2019-12-21 6:34 ` Qu Wenruo
@ 2019-12-21 18:51 ` Chris Murphy
0 siblings, 0 replies; 3+ messages in thread
From: Chris Murphy @ 2019-12-21 18:51 UTC (permalink / raw)
To: Qu Wenruo; +Cc: Btrfs BTRFS
On Fri, Dec 20, 2019 at 11:34 PM Qu Wenruo <quwenruo.btrfs@gmx.com> wrote:
>
>
>
> On 2019/12/21 下午2:27, Chris Murphy wrote:
> > kernel 5.4.5
> > btrfs-progs 5.4
> >
> > test file is linux.tar (not compressed), it's the only file on the
> > file system in each case
> >
> > /dev/sda5 53G 2.8G 50G 6% /mnt none
> > /dev/sda5 53G 2.2G 50G 5% /mnt zstd 1
> > /dev/sda5 53G 2.1G 50G 4% /mnt zstd 15
> >
> >
> > mount and dmesg both show the value for the level I've set; but btrfs
> > insp dump-t shows extents always have compression 3.
> >
> >
> > [47567.500812] BTRFS info (device sda5): use zstd compression, level 1
> >
> > item 14 key (328583 EXTENT_DATA 2060582912) itemoff 15488 itemsize 53
> > generation 51 type 1 (regular)
> > extent data disk byte 6461308928 nr 20480
> > extent data offset 0 nr 131072 ram 131072
> > extent compression 3 (zstd)
>
> This number is not compression level, but compression algorithm.
>
> typedef enum {
> BTRFS_COMPRESS_NONE = 0,
> BTRFS_COMPRESS_ZLIB = 1,
> BTRFS_COMPRESS_LZO = 2,
> BTRFS_COMPRESS_ZSTD = 3,
> BTRFS_COMPRESS_TYPES = 3,
> BTRFS_COMPRESS_LAST = 4,
> } btrfs_compression_type;
>
> Level is not recorded in that field.
Oh lovely, that's embarrassing. Thanks for the answer!
--
Chris Murphy
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-12-21 18:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-21 6:27 dump tree always shows compression level 3, zstd Chris Murphy
2019-12-21 6:34 ` Qu Wenruo
2019-12-21 18:51 ` Chris Murphy
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).