mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Anton Blanchard <anton@samba.org>
To: linux-kernel@vger.kernel.org
Cc: chrisw@osdl.org, sds@epoch.ncsc.mil, jmorris@redhat.com
Subject: SELINUX performance issues
Date: Sun, 8 Aug 2004 10:23:55 +1000	[thread overview]
Message-ID: <20040808002355.GA24690@krispykreme> (raw)


Hi,

During SLES9 testing we noticed SELINUX caused rather large performance
regressions in network benchmarks. To retest this, I fired up
2.6.8-rc3-BK on a small POWER5 box (3 CPUs).

I enabled a bunch of stuff in my .config:

CONFIG_SECURITY=y
CONFIG_SECURITY_NETWORK=y
CONFIG_SECURITY_CAPABILITIES=y
CONFIG_SECURITY_ROOTPLUG=y
CONFIG_SECURITY_SELINUX=y
CONFIG_SECURITY_SELINUX_BOOTPARAM=y
CONFIG_SECURITY_SELINUX_DISABLE=y
CONFIG_SECURITY_SELINUX_DEVELOP=y
CONFIG_SECURITY_SELINUX_MLS=y

I then ran a number of copies of socklib to localhost. Socklib is a tool
from tridge which just pumps bytes down a TCP stream. Very simple stuff.
I found just over a 15% regression between enabling and disabling
selinux (using the same kernel, just specifying the selinux=off boot
option).

Oprofile shows where the problems are:

%       function
3.0880  avc_has_perm_noaudit
1.7677  selinux_socket_sock_rcv_skb
0.8400  avc_has_perm
0.5687  security_node_sid
0.5324  security_port_sid
0.5164  sel_netif_lookup
0.5141  avc_lookup
0.5003  sel_netif_put
0.3001  sel_netif_find
0.2899  selinux_file_permission

The biggest problem is the global lock:

avc_has_perm_noaudit:
        spin_lock_irqsave(&avc_lock, flags);

Any chance we can get rid of it? Maybe with RCU?

Anton

             reply	other threads:[~2004-08-08  0:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-08  0:23 Anton Blanchard [this message]
2004-08-08  2:57 ` James Morris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040808002355.GA24690@krispykreme \
    --to=anton@samba.org \
    --cc=chrisw@osdl.org \
    --cc=jmorris@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sds@epoch.ncsc.mil \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®