When using swap in ZFS, system stops when you start using swap
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Native ZFS for Linux |
New
|
Unknown
|
|||
Release Notes for Ubuntu |
Fix Released
|
Undecided
|
Unassigned | ||
ubiquity (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
zfs-linux (Ubuntu) |
Won't Fix
|
High
|
Jean-Baptiste Lallement |
Bug Description
# Problem
When using swap in ZFS, system stops when you start using swap.
> stress --vm 100
if you doing swapoff will only occur OOM and the system will not stop.
# Environment
jehos@MacBuntu:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu Eoan Ermine (development branch)
Release: 19.10
Codename: eoan
jehos@MacBuntu:~$ dpkg -l | grep zfs
ii libzfs2linux 0.8.1-1ubuntu13 amd64 OpenZFS filesystem library for Linux
ii zfs-initramfs 0.8.1-1ubuntu13 amd64 OpenZFS root filesystem capabilities for Linux - initramfs
ii zfs-zed 0.8.1-1ubuntu13 amd64 OpenZFS Event Daemon
ii zfsutils-linux 0.8.1-1ubuntu13 amd64 command-line tools to manage OpenZFS filesystems
jehos@MacBuntu:~$ uname -a
Linux MacBuntu 5.3.0-13-generic #14-Ubuntu SMP Tue Sep 24 02:46:08 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
jehos@MacBuntu:~$ zpool list
NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
bpool 1.88G 66.1M 1.81G - - - 3% 1.00x ONLINE -
rpool 230G 124G 106G - - 9% 53% 1.00x ONLINE -
jehos@MacBuntu:~$ zfs get all rpool/swap
NAME PROPERTY VALUE SOURCE
rpool/swap type volume -
rpool/swap creation 목 10월 10 15:56 2019 -
rpool/swap used 2.13G -
rpool/swap available 98.9G -
rpool/swap referenced 72K -
rpool/swap compressratio 1.11x -
rpool/swap reservation none default
rpool/swap volsize 2G local
rpool/swap volblocksize 4K -
rpool/swap checksum on default
rpool/swap compression zle local
rpool/swap readonly off default
rpool/swap createtxg 34 -
rpool/swap copies 1 default
rpool/swap refreservation 2.13G local
rpool/swap guid 182093302137046
rpool/swap primarycache metadata local
rpool/swap secondarycache none local
rpool/swap usedbysnapshots 0B -
rpool/swap usedbydataset 72K -
rpool/swap usedbychildren 0B -
rpool/swap usedbyrefreserv
rpool/swap logbias throughput local
rpool/swap objsetid 393 -
rpool/swap dedup off default
rpool/swap mlslabel none default
rpool/swap sync always local
rpool/swap refcompressratio 1.11x -
rpool/swap written 72K -
rpool/swap logicalused 40K -
rpool/swap logicalreferenced 40K -
rpool/swap volmode default default
rpool/swap snapshot_limit none default
rpool/swap snapshot_count none default
rpool/swap snapdev hidden default
rpool/swap context none default
rpool/swap fscontext none default
rpool/swap defcontext none default
rpool/swap rootcontext none default
rpool/swap redundant_metadata all default
rpool/swap encryption off default
rpool/swap keylocation none default
rpool/swap keyformat none default
rpool/swap pbkdf2iters 0 default
Changed in ubiquity (Ubuntu): | |
importance: | Undecided → High |
tags: | added: rls-ee-incoming |
Changed in ubuntu-release-notes: | |
status: | New → Fix Released |
Changed in ubiquity (Ubuntu): | |
status: | Incomplete → Triaged |
Changed in zfs-linux (Ubuntu): | |
status: | Incomplete → Triaged |
Changed in zfs-linux (Ubuntu): | |
importance: | Undecided → Critical |
tags: |
added: rls-ff-incoming removed: rls-ee-incoming |
Changed in zfs-linux (Ubuntu): | |
importance: | Critical → High |
Changed in zfs: | |
status: | Unknown → New |
Changed in zfs-linux (Ubuntu): | |
status: | Triaged → Won't Fix |
A swapfile on ZFS is a bad idea. Swapped out pages get pushed through the vfs into zfs and each page of swap will be magnified in the number of free pages required to get this page out to disk.