On an unrelated note(but since btrfs was thought to be a problem at some
point), I've discovered that btrfs with zstd:5 (or worse zstd:15) can
cause (at least) mouse cursor stuttering(like it was skipping frames),
while zstd:1 doesn't(likely because of the low CPU usage during
compression), regardless of how fast/many writes are happening on the
SSD(2-6M/s with zstd:15, 38-50+M/s with zstd:1), apparently due to high
CPU usage during the compression. (zstd unspecified means zstd:3 aka
default)

Normal CPU usage by itself(eg. during compiling) doesn't cause such
stuttering though. I've tested this on a Lenovo Ideapad Z575, 16G RAM,
Kingston SSD SA400S37240G firmware SBFK71F1, and I've personally
switched to zstd:1

ie.
```
diff --git a/fs/btrfs/zstd.c b/fs/btrfs/zstd.c
index 6b9e29d050f3..02ffdb27c360 100644
--- a/fs/btrfs/zstd.c
+++ b/fs/btrfs/zstd.c
@@ -22,7 +22,7 @@
 
 #define ZSTD_BTRFS_MAX_WINDOWLOG 17
 #define ZSTD_BTRFS_MAX_INPUT (1 << ZSTD_BTRFS_MAX_WINDOWLOG)
-#define ZSTD_BTRFS_DEFAULT_LEVEL 3
+#define ZSTD_BTRFS_DEFAULT_LEVEL 1
 #define ZSTD_BTRFS_MAX_LEVEL 15
 /* 307s to avoid pathologically clashing with transaction commit */
 #define ZSTD_BTRFS_RECLAIM_JIFFIES (307 * HZ)
```

but zstd:1 in /etc/fstab should also work, unless using too old kernel
that doesn't know about it (hence why I prefer using the patch anyway)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1833281

Title:
  System freeze when memory is put on SWAP in Linux >4.10.x

To manage notifications about this bug go to:
https://bugs.launchpad.net/linux/+bug/1833281/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to