[f2fs-dev] Trying to use compression options in f2fs

2023-06-21 Thread Michael Opdenacker via Linux-f2fs-devel

Greetings,

I'm trying to compare the performance of the various compression options 
in f2fs versus the default settings, on an SD card.


Here's what I'm doing:

 * Creating the filesystem:
   mkfs.f2fs -f -l data -O compression,extra_attr /dev/mmcblk0p3
 * Mounting the filesystem:
   mount -o compress_algorithm=zstd:22 /dev/mmcblk0p3 /mnt/data

I'm running the tests on the Beaglebone Black board with a single-core 
1GHz ARM CPU, using Linux 6.3.6. I'm using mkfs.f2fs 1.15.0 
(2022-05-13), built by Buildroot.


However, I see no significant difference in terms of disk usage, read 
and write time, typically when I write and read an ARM root filesystem 
(from the Raspberry Pi Lite distro), compared to creating and mounting 
the filesystem with no special options. On Btrfs, the differences 
between compression options are really important.


I chose zstd:22 because I expected it to be the slowest choice in terms 
of compression. I'm expecting all files to be compressed (if they are 
compressible) by default.


Am I missing anything?

Thanks in advance,

Michael.

--
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



___
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


Re: [f2fs-dev] Trying to use compression options in f2fs

2023-06-22 Thread Michael Opdenacker via Linux-f2fs-devel

Hi,

Many thanks for the tips!

On 22.06.23 at 08:56, Jaegeuk Kim wrote:

Hi,

On 06/21, Michael Opdenacker via Linux-f2fs-devel wrote:

Greetings,

I'm trying to compare the performance of the various compression options in
f2fs versus the default settings, on an SD card.

Here's what I'm doing:

  * Creating the filesystem:
mkfs.f2fs -f -l data -O compression,extra_attr /dev/mmcblk0p3
  * Mounting the filesystem:
mount -o compress_algorithm=zstd:22 /dev/mmcblk0p3 /mnt/data

This doesn't try to compress any file. Do we want to compress what files?
That can be specified by the extention name like:
# mount -o compress_extension=bar,compress_algorithm=zstd:22 ...

Or, you can set compression flag:
# touch foo.bar
# chattr +c foo.bar
# write() to foo.bar


Actually, I was looking for a way to compress all files by default, and 
I overlooked "compress_extension=*" which should work for all files, in 
particular the binaries in the root filesystem which don't have any 
particular extension.


Thanks again
Cheers
Michael.

--
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



___
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel