[Akonadi] [Bug 334218] synchronizations of large folders with filesystem contents hogs a Sandybridge core for minutes stat()ing every file in it

Martin Steigerwald Martin at Lichtvoll.de
Fri May 2 12:33:27 BST 2014


https://bugs.kde.org/show_bug.cgi?id=334218

--- Comment #1 from Martin Steigerwald <Martin at Lichtvoll.de> ---
I bet that stat()ing files isnĀ“t the only issue here, as find -ls also uses a
variant of the stat() call on each file and as demonstrated it way faster:

Warm caches:

martin at merkaba:~/.local/share/local-mail/.Lichtvoll.directory/.Linux.directory>
strace -c find kernel-ml -ls 2>&1 >/dev/null
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 90.93    4.199983          17    250167           newfstatat
  6.34    0.292629         770       380           getdents
  1.97    0.091028          14      6437           write
  0.60    0.027740          51       539           brk
  0.04    0.001891          34        56        18 open
  0.03    0.001159          27        43           mmap
  0.02    0.000866          17        50           close
  0.01    0.000650          17        38           fstat
  0.01    0.000492         492         1           execve
  0.01    0.000458          29        16           mprotect
  0.01    0.000334          42         8         8 access
  0.01    0.000323          36         9           munmap
  0.01    0.000311          24        13           read
  0.00    0.000180          45         4         4 connect
  0.00    0.000176          10        17           fchdir
  0.00    0.000150          21         7           openat
  0.00    0.000121          30         4           socket
  0.00    0.000095          19         5           lseek
  0.00    0.000051          17         3         2 ioctl
  0.00    0.000027          27         1           uname
  0.00    0.000014          14         1           arch_prctl
------ ----------- ----------- --------- --------- ----------------
100.00    4.618678                257799        32 total

martin at merkaba:~/.local/share/local-mail/.Lichtvoll.directory/.Linux.directory>
/usr/bin/time find kernel-ml -ls 2>&1 >/dev/null
0.69user 0.35system 0:01.04elapsed 100%CPU (0avgtext+0avgdata
59536maxresident)k
0inputs+0outputs (0major+18011minor)pagefaults 0swaps


After echo 3 > /proc/sys/vm/drop_caches:

martin at merkaba:~/.local/share/local-mail/.Lichtvoll.directory/.Linux.directory>
/usr/bin/time find kernel-ml -ls 2>&1 >/dev/null
3.40user 9.67system 0:21.56elapsed 60%CPU (0avgtext+0avgdata 59532maxresident)k
780736inputs+0outputs (8major+18001minor)pagefaults 0swaps

(still just 20 seconds and well in case of KMail / Akonadi caches are warm,
machine has 8 GB of RAM)

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Kdepim-bugs mailing list