FS#51970 - [linux] Writing is very slow on a F2FS root partition
Attached to Project:
Arch Linux
Opened by UnicornDarkness (Xorg) - Saturday, 26 November 2016, 18:21 GMT
Last edited by Toolybird (Toolybird) - Sunday, 13 November 2022, 20:20 GMT
Opened by UnicornDarkness (Xorg) - Saturday, 26 November 2016, 18:21 GMT
Last edited by Toolybird (Toolybird) - Sunday, 13 November 2022, 20:20 GMT
|
Details
Description:
When I run 'pacman -Syu', it takes a very long time to update packages: the progression bar seems frozen. This issue appears when Arch Linux is installed on a F2FS partition. On Ext4, no troubles. For comparison: - updating a kernel takes about 30 seconds on my VM (the virtual drive is located on a Ext4 partition on a HDD). - updating a kernel takes more than 3 minutes on my host system (F2FS partition on a SSD). VM on a HDD is faster than host on a SSD. *Cough* Additional info: * pacman 5.0.1 * linux-ck-sandybridge 4.8.11 * linux-lts 4.4.34 * f2fs-tools 1.7.0 * F2FS.txt and EXT4.txt files are attached for comparison (having two installed kernels on host isn't performance bottleneck) Steps to reproduce: Updating packages by using Pacman. |
This task depends upon
Closed by Toolybird (Toolybird)
Sunday, 13 November 2022, 20:20 GMT
Reason for closing: Fixed
Additional comments about closing: Reporter says "Old bug, cannot reproduce it with another computer."
Sunday, 13 November 2022, 20:20 GMT
Reason for closing: Fixed
Additional comments about closing: Reporter says "Old bug, cannot reproduce it with another computer."
FWIW, I have no problem with this with a F2FS USB installation.
(1/2) upgrading linux-ck-sandybridge [---------------------------] 100%
The package extraction is very slow, the progress bar is frozen. After time, it progresses a bit, and then look like still frozen.
I'm looking for tuning F2FS mount options, like the garbage collector.
Extraction into Ext4 partition (SSD): tar xf /var/cache/pacman/pkg/linux-ck-sandybridge-4.8.11-1-x86_64.pkg.tar.xz 3,00s user 0,35s system 106% cpu 3,139 total
Extraction into F2FS partition (SSD): tar xf /var/cache/pacman/pkg/linux-ck-sandybridge-4.8.11-1-x86_64.pkg.tar.xz 4,79s user 0,43s system 13% cpu 37,773 total
The /var/cache is located on the same SSD. I think it is a write performance issue with F2FS.
As you can see, on the SSD, the extraction time is ~12 higher on the F2FS partition.
Maybe mount options?
- type f2fs (rw,noatime,background_gc=off,user_xattr,acl,inline_data,extent_cache,active_logs=6)
- type ext4 (rw,relatime,commit=60,data=writeback)
Extraction into Ext4 partition (SSD): bsdtar -x -J -f /var/cache/pacman/pkg/linux-ck-sandybridge-4.8.11-1-x86_64.pkg.tar.xz 3,07s user 0,07s system 94% cpu 3,339 total
Extraction into F2FS partition (SSD): bsdtar -x -J -f /var/cache/pacman/pkg/linux-ck-sandybridge-4.8.11-1-x86_64.pkg.tar.xz 4,45s user 0,16s system 15% cpu 30,526 total
This is with background_gc=on. So the garbage collector is not the source of this issue.
A simple update by pacman with 50 packages takes 30-60 Minutes while the system becomes unusable and hangs.
doing "sudo fstrim -v /" while that immediately eliminates the "hang" but the pacman stuff stays very slow.
2TB NVME PCIE 4 drive with 5GB/sec.
Are there any mount options i could try to get around this?
Beside of this bug, the system and all the apps are way faster and quicker in launch times. I like it and i really want to use it.
FYI, here are my mount options in /etc/fstab:
LABEL=ArchLinux / f2fs rw,nodiscard,relatime,lazytime,background_gc=on,no_heap,inline_xattr,inline_data,inline_dentry,flush_merge,extent_cache,mode=adaptive,active_logs=6,alloc_mode=default,fsync_mode=posix 0 1