All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ole Kliemann <ole@plastictree.net>
To: selinux@tycho.nsa.gov
Subject: Re: SELinux performance depending on type count
Date: Wed, 8 Aug 2012 22:44:01 +0200	[thread overview]
Message-ID: <20120808204401.GA5403@telvanni> (raw)
In-Reply-To: <20120807130244.GE2085@telvanni>

[-- Attachment #1: Type: text/plain, Size: 1725 bytes --]

I haven't tested any runtime performance just compile-time and 
policy size.

All this is done on my old Dell D410 with a 1.73GHz Pentium M.

On Tue, Aug 07, 2012 at 03:02:44PM +0200, Ole Kliemann wrote:
> But if there was a performance problem with a lot of types, at 
> what number n would it start to hit hard? And how does it 
> increase (linear, quadratic...)?

n=10000, i.e. 20000 types, 10000 attributes and a handful of 
allows per type and attribute in one module.

compilation is okay, but inserting the said module with 
semodule... well at 18min CPU-time I killed the process... who 
knows what size this policy would have had...


n=5000, i.e. 10000 types, 5000 attributes and a handful of 
allows per type and attribute in one module.

inserting the module in about 5m30s walltime. policy is 13M of 
size.


n=1000, i.e. 2000 types, 1000 attributes and a handful of 
allows per type and attribute in one module.

inserting the module in about 9s walltime. policy is 2.5M of 
size.


Apparently the runtime of inserting the module is fataly steep in 
n. Rough estimation would be at least n^2, could be higher 
depending on how long n=10000 would have actually taken.

> And would it be better performance-wise to run a MCS-policy with 
> say categories c0.cn than to have types c0_t, ... cn_t?

n=10000, i.e. 10000 categories, one sensitivity and a handful of 
mlsconstraints

inserting the module in about 8s walltime. policy is 284K of 
size.


Of course this is a very rough and inprecise testing. But I guess 
one can say that the policy infrastructure get's into trouble 
with high type count whereas a high category count seems to be 
handled flawlessly.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  parent reply	other threads:[~2012-08-08 20:44 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-07 13:02 SELinux performance depending on type count Ole Kliemann
2012-08-07 14:12 ` David Quigley
2012-08-07 17:07 ` William Roberts
2012-08-07 17:36   ` Daniel J Walsh
2012-08-08 20:44 ` Ole Kliemann [this message]
2012-08-09 10:45   ` Adam Tkac
2012-08-09 11:56     ` Ole Kliemann
2012-08-10 12:11 ` Ole Kliemann
2012-08-10 13:00   ` Stephen Smalley
2012-08-10 14:36     ` Ole Kliemann
2012-08-10 15:05       ` Stephen Smalley
2012-08-10 15:43         ` Ole Kliemann
2012-08-10 15:44         ` Ole Kliemann
2012-08-10 16:08           ` Stephen Smalley
2012-08-10 16:18             ` Stephen Smalley
2012-08-10 17:00               ` Ole Kliemann
2012-08-10 18:08                 ` Stephen Smalley
2012-08-10 18:46                   ` Ole Kliemann
2012-08-10 18:55                     ` Stephen Smalley
2012-08-10 19:11                       ` Ole Kliemann
2012-08-10 19:19                         ` Stephen Smalley
2012-08-10 19:26                           ` Ole Kliemann
2012-08-10 19:50                             ` Stephen Smalley
2012-08-10 21:38 ` Ole Kliemann
2012-08-13 12:35   ` Stephen Smalley
2012-08-27 15:28     ` Ole Kliemann
2012-08-27 16:24       ` Stephen Smalley

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=20120808204401.GA5403@telvanni \
    --to=ole@plastictree.net \
    --cc=selinux@tycho.nsa.gov \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.