classic mode slow, taking up one full core with apparmor logging

Dan Kegel dank at kegel.com
Fri Jan 6 18:14:18 UTC 2017


Just to illustrate, here's the output of top:

PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+
COMMAND
  489 root      20   0   13320   3876   1940 R  99.7  0.4  17:36.31
systemd-journal
 3779 obdank    20   0   75428  62776   9652 R  93.4  6.7   0:05.93
cc1plus
 3734 obdank    20   0  138540 132004  12216 R  79.7 14.0   0:39.54
cc1plus
 3707 obdank    20   0  202312 197908  12216 R  64.3 21.0   1:15.61
cc1plus
 3785 obdank    20   0   61032  46176   9716 R  59.3  4.9   0:03.80
cc1plus

I wantsss all the cores for cc1plussss, I does, I does.

On Fri, Jan 6, 2017 at 10:10 AM, Dan Kegel <dank at kegel.com> wrote:
> When building a c++ app on a raspberry pi 3 in classic mode,
> I noticed two things that hurt performance substantially.
>
> 1) the obvious: if you crank config.txt's gpu_mem up above the
> default, life is bad :-)  Don't do that on build machines.
>
> 2) the not so obvious: apparmor is keeping systemctl's journal process
> at 100% on one core logging crud like
>
> Jan 06 18:03:37 rbb-ubu1604pi3-1 audit[3249]: AVC apparmor="ALLOWED"
> operation="open"
> profile="snap.classic.classic//null-/usr/bin/systemd-run//null-/usr/sbin/chroot//null-/var/snap/classic/common/classic/bin/dash//null-/var/snap/classic/common/classic/usr/bin/script//null-/var/snap/classic/common/classic/bin/bash//null-/var/snap/classic/common/classic/usr/bin/sudo//null-/var/snap/classic/common/classic/bin/bash//null-/var/snap/classic/common/classic/home/obdank/src/ob-repobot/bau//null-/var/snap/classic/common/classic/home/obdank/src/ob-repobot/yovo/buildshim//null-/var/snap/classic/common/classic/home/obdank/src/ob-repobot/yovo/cmake.d/buildshim-ubu//null-/var/snap/classic/common/classic/usr/bin/dpkg-buildpackage//null-/var/snap/classic/common/classic/home/obdank/src/yovo/debian/rules//null-/var/snap/classic/common/classic/usr/bin/dh//null-/var/snap/classic/common/classic/home/obdank/src/yovo/debian/rules//null-/var/snap/classic/common/classic/usr/bin/dh_auto_build//null-/var/snap/classic/common/classic/usr/bin/make//null-/var/snap/classic/common/classic/usr/bin/make//null-/var/snap/classic/common/classic/usr/bin/make//null-/var/snap/classic/common/classic/bin/dash//null-/var/snap/classic/common/classic/usr/bin/g++-5//null-/var/snap/classic/common/classic/usr/lib/gcc/arm-linux-gnueabihf/5/cc1plus"
> name="/var/snap/classic/common/classic/usr/include/c++/5/cstring"
> pid=3249 comm="cc1plus" requested_mask="r" denied_mask="r" fsuid=1000
> ouid=0
> Jan 06 18:03:37 rbb-ubu1604pi3-1 audit[3254]: AVC apparmor="ALLOWED"
> operation="mknod"
> profile="snap.classic.classic//null-/usr/bin/systemd-run//null-/usr/sbin/chroot//null-/var/snap/classic/common/classic/bin/dash//null-/var/snap/classic/common/classic/usr/bin/script//null-/var/snap/classic/common/classic/bin/bash//null-/var/snap/classic/common/classic/usr/bin/sudo//null-/var/snap/classic/common/classic/bin/bash//null-/var/snap/classic/common/classic/home/obdank/src/ob-repobot/bau//null-/var/snap/classic/common/classic/home/obdank/src/ob-repobot/yovo/buildshim//null-/var/snap/classic/common/classic/home/obdank/src/ob-repobot/yovo/cmake.d/buildshim-ubu//null-/var/snap/classic/common/classic/usr/bin/dpkg-buildpackage//null-/var/snap/classic/common/classic/home/obdank/src/yovo/debian/rules//null-/var/snap/classic/common/classic/usr/bin/dh//null-/var/snap/classic/common/classic/home/obdank/src/yovo/debian/rules//null-/var/snap/classic/common/classic/usr/bin/dh_auto_build//null-/var/snap/classic/common/classic/usr/bin/make//null-/var/snap/classic/common/classic/usr/bin/make//null-/var/snap/classic/common/classic/usr/bin/make//null-/var/snap/classic/common/classic/bin/dash//null-/var/snap/classic/common/classic/usr/bin/g++-5"
> name="/var/snap/classic/common/classic/tmp/ccpOmyw6.s" pid=3254
> comm="c++" requested_mask="c" denied_mask="c" fsuid=1000 ouid=1000
>
> Is there an option for reducing apparmor verbosity on ALLOWED operations?
> (speaking strictly as a foreigner in the land of apparmor and snappy)
>
> Thanks!




More information about the Snapcraft mailing list