Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
KDE5 apps (esp. dolphin) hang during NFS writes.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
steve_v
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jun 2004
Posts: 113
Location: New Zealand

PostPosted: Sat Aug 18, 2018 9:27 am    Post subject: KDE5 apps (esp. dolphin) hang during NFS writes. Reply with quote

When any kind of write operation on a mounted NFS share is initiated from a KDE application (most noticeably dolphin or ark), the entire process and all child windows become extremely slow or freeze entirely for the duration.
This is not a new problem, it's been around for as long as I have been using KDE5 and NFS. I have experienced it with several distros: Debian (8,9) Artix & Gentoo as client, and Debian (7,8) & Devuan (1) on the server.
As the Gentoo community appears to be the most knowledgable of the distros mentioned, I figure now is the time to ask...

The remote filesystem is (currently) a 24TB ZFS (ZoL 0.7.9 on Devuan) RAIDZ6 pool, with sync disabled (battery-backed), over NFS 4.1 on a point-to-point(unswitched) dedicated 1000 Mb/s ethernet link.
Server hardware is nothing amazing (dual X5460 with 48GB RAM), but is generally capable of saturating the ethernet link r/w.
CLI applications (cp, mv etc.), and server-local applications operating on the same filesystem are unaffected.
There are no relevant errors logged anywhere I can find, and both server and client system activity appears normal apart from the relevant client process being in "disk sleep".

The only reference I can find on the internet-at-large is an old reddit post that boils down to: mount shares with 'sync', and suffer ludicrously slow transfers.
This does work, but it incurs an unacceptable performance penalty.


Any idea what is causing this, and what I can do about it? Even where to start looking? Any more information that would be useful?
I was under the impression that KDE's file operations are handled in a separate thread, and blocking the UI during background tasks is a bit 1995, not to mention incredibly annoying.
I don't have another DE installed, but I can do if it would be useful as a comparison - my tests do tend to indicate that this is a KDE specific problem.


------
Client fstab:
Code:
192.168.4.100:/mnt/tank         /mnt/tank               nfs             vers=4.1,soft,intr,noatime,nofail       0 0

Server exports:
Code:
/mnt/tank               192.168.4.200(rw,no_subtree_check,crossmnt)

ZFS pool (server) properties:
Code:
NAME  PROPERTY               VALUE                  SOURCE
tank  type                   filesystem             -
tank  creation               Sat Dec  7 21:31 2013  -
tank  used                   16.0T                  -
tank  available              3.97T                  -
tank  referenced             367K                   -
tank  compressratio          1.10x                  -
tank  mounted                yes                    -
tank  quota                  none                   default
tank  reservation            none                   default
tank  recordsize             128K                   local
tank  mountpoint             /mnt/tank              local
tank  sharenfs               off                    local
tank  checksum               sha256                 local
tank  compression            lz4                    local
tank  atime                  off                    local
tank  devices                on                     default
tank  exec                   on                     default
tank  setuid                 on                     default
tank  readonly               off                    local
tank  zoned                  off                    default
tank  snapdir                hidden                 default
tank  aclinherit             restricted             default
tank  createtxg              1                      -
tank  canmount               on                     default
tank  xattr                  sa                     local
tank  copies                 1                      default
tank  version                5                      -
tank  utf8only               off                    -
tank  normalization          none                   -
tank  casesensitivity        sensitive              -
tank  vscan                  off                    default
tank  nbmand                 off                    default
tank  sharesmb               off                    default
tank  refquota               none                   default
tank  refreservation         none                   default
tank  guid                   16036283944289202795   -
tank  primarycache           all                    default
tank  secondarycache         all                    default
tank  usedbysnapshots        0B                     -
tank  usedbydataset          367K                   -
tank  usedbychildren         16.0T                  -
tank  usedbyrefreservation   0B                     -
tank  logbias                latency                default
tank  dedup                  off                    local
tank  mlslabel               none                   default
tank  sync                   disabled               local
tank  dnodesize              legacy                 default
tank  refcompressratio       1.00x                  -
tank  written                367K                   -
tank  logicalused            17.2T                  -
tank  logicalreferenced      40.5K                  -
tank  volmode                default                default
tank  filesystem_limit       none                   default
tank  snapshot_limit         none                   default
tank  filesystem_count       none                   default
tank  snapshot_count         none                   default
tank  snapdev                hidden                 default
tank  acltype                off                    default
tank  context                none                   default
tank  fscontext              none                   default
tank  defcontext             none                   default
tank  rootcontext            none                   default
tank  relatime               off                    local
tank  redundant_metadata     all                    default
tank  overlay                off                    default
tank  com.sun:auto-snapshot  false                  local

This pool is ~78% full, though this appears to have no bearing on the issue as the problem has existed long before it reached this state.

Client emerge info:
Code:
Portage 2.3.40 (python 3.6.5-final-0, default/linux/amd64/17.0/desktop/plasma, gcc-7.3.0, glibc-2.26-r7, 4.14.63-gentoo x86_64)
=================================================================
System uname: Linux-4.14.63-gentoo-x86_64-Intel-R-_Core-TM-_i7-4960X_CPU_@_3.60GHz-with-gentoo-2.4.1
KiB Mem:    32881544 total,   6612716 free
KiB Swap:    4194300 total,   4194300 free
Timestamp of repository gentoo: Fri, 17 Aug 2018 15:00:01 +0000
Head commit of repository gentoo: 03a89df55a0073d62659a16f1a18c6da50708d61
sh bash 4.4_p12
ld GNU ld (Gentoo 2.30 p2) 2.30.0
app-shells/bash:          4.4_p12::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.24.3-r1::gentoo
dev-lang/python:          2.7.14-r1::gentoo, 3.5.5::gentoo, 3.6.5::gentoo
dev-util/cmake:           3.9.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.34.11::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.15.1-r2::gentoo
sys-devel/binutils:       2.30-r2::gentoo
sys-devel/gcc:            7.3.0-r3::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r3::gentoo
sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers)
sys-libs/glibc:           2.26-r7::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-max-age: 24
    sync-rsync-extra-opts:
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: no

localrepo
    location: /usr/local/portage
    masters: gentoo

dotnet
    location: /var/lib/layman/dotnet
    masters: gentoo
    priority: 50

mozilla
    location: /var/lib/layman/mozilla
    sync-type: laymansync
    sync-uri: git://anongit.gentoo.org/proj/mozilla.git
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -fomit-frame-pointer -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS=" --jobs=12 --load-average=12 --autounmask-unrestricted-atoms"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ftp.swin.edu.au/gentoo"
LANG="en_NZ.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en_GB en_US"
MAKEOPTS="-j12 -l12"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli crypt cups cxx dbus declarative display-manager dri dts dvd dvdr elogind emboss encode exif ffmpeg flac fortran gdbm gif glamor gpm gtk iconv ipv6 jpeg kde kipi kwallet lcms ldap libnotify libtirpc lzma mad mng modules mp3 mp4 mpeg multilib ncurses nptl nvidia offensive ogg opengl openmp pam pango pcre pdf phonon plasma png policykit ppds qml qt5 readline sdl seccomp semantic-desktop spell ssl startup-notification svg symlink tcpd tiff timidity truetype udev udisks unicode upower usb vdpau vorbis widgets wxwidgets x264 xattr xcb xcomposite xml xv xvid zlib" ABI_X86="64" ALSA_CARDS="hda-intel" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon plan sheets stage words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx f16c mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" CURL_SSL="gnutls" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en-GB en-US" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby23" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Back to top
View user's profile Send private message
bunder
Bodhisattva
Bodhisattva


Joined: 10 Apr 2004
Posts: 5802

PostPosted: Sat Aug 18, 2018 10:29 am    Post subject: Reply with quote

Code:
tank  dedup                  off                    local


did you have dedup enabled at some point? default is off, but the source says local which would suggest that you had it enabled in the past. dedup is slow and uses a fair bit of memory, so if you did use it at some point i would recommend backing up the pool and recreating it.
_________________
overlay | patches
Neddyseagoon wrote:
The problem with leaving is that you can only do it once and it reduces your influence.
Back to top
View user's profile Send private message
steve_v
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jun 2004
Posts: 113
Location: New Zealand

PostPosted: Sat Aug 18, 2018 10:36 am    Post subject: Reply with quote

bunder wrote:
did you have dedup enabled at some point?
Not as far as I am aware. I may have manually set it to off at some point though.
If it were dedup causing performance problems, I would expect it to affect everything, but that's not what I'm seeing here anyway.


Last edited by steve_v on Sat Aug 18, 2018 10:39 am; edited 1 time in total
Back to top
View user's profile Send private message
bunder
Bodhisattva
Bodhisattva


Joined: 10 Apr 2004
Posts: 5802

PostPosted: Sat Aug 18, 2018 10:39 am    Post subject: Reply with quote

just to cover the bases, does "zpool get dedupratio" return 1x? if its any higher, then dedup was definitely enabled.

edit: or "zpool status -D"
_________________
overlay | patches
Neddyseagoon wrote:
The problem with leaving is that you can only do it once and it reduces your influence.
Back to top
View user's profile Send private message
steve_v
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jun 2004
Posts: 113
Location: New Zealand

PostPosted: Sat Aug 18, 2018 10:40 am    Post subject: Reply with quote

bunder wrote:
does "zpool get dedupratio" return 1x?

Code:
NAME  PROPERTY    VALUE  SOURCE
tank  dedupratio  1.00x  -

Ed.
Code:
 dedup: no DDT entries
Back to top
View user's profile Send private message
bunder
Bodhisattva
Bodhisattva


Joined: 10 Apr 2004
Posts: 5802

PostPosted: Sat Aug 18, 2018 10:42 am    Post subject: Reply with quote

darn. that would have been easy.

i'm actually out of ideas if you're already turning sync off everywhere. :(
_________________
overlay | patches
Neddyseagoon wrote:
The problem with leaving is that you can only do it once and it reduces your influence.
Back to top
View user's profile Send private message
steve_v
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jun 2004
Posts: 113
Location: New Zealand

PostPosted: Sat Aug 18, 2018 10:59 am    Post subject: Reply with quote

Yeah, sync is off everywhere.
This is not a ZFS or NFS performance problem per-se - file transfers are plenty fast, but KDE applications (and only KDE applications as far as I have tested) hang while they are in progress.
Perhaps the NFS mount and/or server is blocking during writes, but I can't see it from the CLI - the mount gets slower as expected, but it's still usable.
The behaviour of KDE applications is different, the dolphin UI in particular stops updating altogether for the duration of any large write - even seemingly unrelated windows.
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3648
Location: Hamburg

PostPosted: Sat Aug 18, 2018 3:38 pm    Post subject: Reply with quote

Maybe try to add explicitely "async" to the mount options? And does "rpcinfo -p" show running rpc processes?
Back to top
View user's profile Send private message
steve_v
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jun 2004
Posts: 113
Location: New Zealand

PostPosted: Sat Aug 18, 2018 6:44 pm    Post subject: Reply with quote

toralf wrote:
try to add explicitely "async"
No dice.
"async" added to client fstab entry & share remounted. Copied ~800Mb fille to NFS mount with dolphin: dolphin UI unresponsive for the duration.
Task manager and application launcher also unresponsive for the duration. Input events for affected applications register after the copy has completed.
Kwin is OK, I can switch windows with alt-tab etc. while the copy is running. Non-KDE applications appear completely unaffected.
The same file operation with 'cp' from the CLI has no deleterious effect on KDE at all.

The only ideas I can come up with are that IO is somehow getting serialised in kdelibs, or there's a buffer filling up somewhere... but that's just pure speculation.

I can probably generate a more comprehensive list of things that lock up when writing to NFS, but so far what they all have in common is using KF5 / kdelibs.

Async mount option doesn't show in mtab though, for whatever reason:
Code:
192.168.4.100:/mnt/tank /mnt/tank nfs4 rw,noatime,vers=4.1,rsize=1048576,wsize=1048576,namlen=255,soft,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=192.168.4.200,local_lock=none,addr=192.168.4.100 0 0


toralf wrote:
does "rpcinfo -p" show running rpc processes?
Yup.
Client:
Code:
   program vers proto   port  service
    100000    4   tcp    111  portmapper
    100000    3   tcp    111  portmapper
    100000    2   tcp    111  portmapper
    100000    4   udp    111  portmapper
    100000    3   udp    111  portmapper
    100000    2   udp    111  portmapper

Server:
Code:
rpcinfo -p
   program vers proto   port  service
    100000    4   tcp    111  portmapper
    100000    3   tcp    111  portmapper
    100000    2   tcp    111  portmapper
    100000    4   udp    111  portmapper
    100000    3   udp    111  portmapper
    100000    2   udp    111  portmapper
    100024    1   udp  34543  status
    100024    1   tcp  52937  status
    100003    2   tcp   2049  nfs
    100003    3   tcp   2049  nfs
    100003    4   tcp   2049  nfs
    100227    2   tcp   2049
    100227    3   tcp   2049
    100003    2   udp   2049  nfs
    100003    3   udp   2049  nfs
    100003    4   udp   2049  nfs
    100227    2   udp   2049
    100227    3   udp   2049
    100021    1   udp  35153  nlockmgr
    100021    3   udp  35153  nlockmgr
    100021    4   udp  35153  nlockmgr
    100021    1   tcp  33971  nlockmgr
    100021    3   tcp  33971  nlockmgr
    100021    4   tcp  33971  nlockmgr
    100005    1   udp  49867  mountd
    100005    1   tcp  42407  mountd
    100005    2   udp  51276  mountd
    100005    2   tcp  41137  mountd
    100005    3   udp  34631  mountd
    100005    3   tcp  41993  mountd
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum