linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: <changfengnan@vivo.com>
To: "'Chao Yu'" <yuchao0@huawei.com>
Cc: jaegeuk@kernel.org, linux-f2fs-devel@lists.sourceforge.net
Subject: [f2fs-dev] 答复:  [f2fs-devel] Why does f2fs not reduce disk space when compression is on?
Date: Tue, 13 Apr 2021 09:44:50 +0800	[thread overview]
Message-ID: <003301d73006$98277a20$c8766e60$@vivo.com> (raw)
In-Reply-To: <d422dfaf-aba9-76a5-44ca-035ebc598ff0@huawei.com>

Thanks, I got it.


-----邮件原件-----
发件人: Chao Yu <yuchao0@huawei.com>
发送时间: 2021年4月13日 9:16
收件人: Fengnan Chang <changfengnan@vivo.com>
抄送: jaegeuk@kernel.org; chao@kernel.org;
linux-f2fs-devel@lists.sourceforge.net
主题: Re: [f2fs-dev] [f2fs-devel] Why does f2fs not reduce disk space when
compression is on?

On 2021/4/12 21:13, Fengnan Chang wrote:
> I'm testing the f2fs data compression feature. I created a new FS with
> the flags extra_attr and compression, use chattr -R +c on the test dir
to enable compression for the directory.
> I found that when compression was turned on, the files did not take up
any less space.
> Using trace, I see that the data is indeed compressed.
> Is there a mistake in my testing method, or is this how it was designed
and why?

https://lore.kernel.org/lkml/20200130185335.GA225399@google.com/

I guess we should document it well in f2fs.rst to avoid any confusion, let
me post a patch for that soon.

Thanks,

>
> This is my test method:
>
> # mount
> /dev/nvme0n1 on /mnt type f2fs
> (rw,lazytime,relatime,background_gc=on,discard,no_heap,user_xattr,inli
> ne_xattr,acl,inline_data,inline_dentry,flush_merge,extent_cache,mode=a
> daptive,active_logs=6,alloc_mode=reuse,fsync_mode=posix,compress_algor
> ithm=lz4,compress_log_size=2)
> # df
> Filesystem           1K-blocks      Used Available Use% Mounted on
> /dev/root               114901    112444         0 100% /
> devtmpfs                497436         0    497436   0% /dev
> tmpfs                   500060         0    500060   0% /dev/shm
> tmpfs                   500060        52    500008   0% /tmp
> tmpfs                   500060        20    500040   0% /run
> /dev/nvme0n1          10483712    499724   9983988   5% /mnt
> # mkdir test
> # chattr -R +c test/
> # dd if=/dev/zero of=/mnt/test/file bs=1M count=100 # sync # df
> Filesystem           1K-blocks      Used Available Use% Mounted on
> /dev/root               114901    112444         0 100% /
> devtmpfs                497436         0    497436   0% /dev
> tmpfs                   500060         0    500060   0% /dev/shm
> tmpfs                   500060       368    499692   0% /tmp
> tmpfs                   500060        20    500040   0% /run
> /dev/nvme0n1          10483712    602232   9881480   6% /mnt
>
>
> _______________________________________________
> Linux-f2fs-devel mailing list
> Linux-f2fs-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
> .
>






_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

      reply	other threads:[~2021-04-13  1:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-12 13:13 [f2fs-dev] [f2fs-devel] Why does f2fs not reduce disk space when compression is on? Fengnan Chang
2021-04-13  1:15 ` Chao Yu
2021-04-13  1:44   ` changfengnan [this message]

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='003301d73006$98277a20$c8766e60$@vivo.com' \
    --to=changfengnan@vivo.com \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=yuchao0@huawei.com \
    /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).