All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Lawrence <slawrence@tresys.com>
To: Dominick Grift <dominick.grift@gmail.com>,
	Stephen Smalley <sds@tycho.nsa.gov>
Cc: SELinux List <selinux@tycho.nsa.gov>
Subject: Re: [RFC] Source Policy, CIL, and High Level Languages
Date: Tue, 15 Jul 2014 16:11:19 -0400	[thread overview]
Message-ID: <53C58AE7.7070404@tresys.com> (raw)
In-Reply-To: <53BFFC89.3060408@tresys.com>

On 07/11/2014 11:02 AM, Steve Lawrence wrote:
> On 07/10/2014 09:45 AM, Dominick Grift wrote:
>> On Thu, 2014-07-10 at 09:38 -0400, Stephen Smalley wrote:
>>> On 07/10/2014 09:26 AM, Dominick Grift wrote:
>>>> On Thu, 2014-07-10 at 09:12 -0400, Stephen Smalley wrote:
>>>>> On 07/10/2014 09:09 AM, Dominick Grift wrote:
>>>>>> On Thu, 2014-07-10 at 14:52 +0200, Dominick Grift wrote:
>>>>>>> On Thu, 2014-07-10 at 08:35 -0400, Stephen Smalley wrote:
>>>>>>>
>>>>>>> <snip>
>>>>>>>
>>>>>>>> Thanks for testing it.  How did it look from a performance POV, wrt
>>>>>>>> memory use and runtime?
>>>>>>>>
>>>>>>>
>>>>>>> I have not (yet) really focused on that but i suppose there was no real
>>>>>>> noticeable slow down or speed up.
>>>>>>>
>>>>>>> Any tips on how i could provide useful benchmarks?
>>>>>>>
>>>>>>> I suppose i could enable the neverallow check
>>>>>>> in /etc/selinux/semanage.conf and i would bet it is now much faster than
>>>>>>> it used to be (in fact ill try that)
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> I suspect i was lying.
>>>>>>
>>>>>> I am installing a guest with similar specs now and same software except
>>>>>> the cil mods and then do some comparison.
>>>>>>
>>>>>> i suppose stuff like time semodule -B
>>>>>> and looking at top
>>>>>>
>>>>>> I did do a semodule -B with checking for neverallow rules but that found
>>>>>> a violation really fast (thanks fedora). So although i cant really say
>>>>>> how much faster that is , it is pretty safe to assume its much faster
>>>>>> now
>>>>>
>>>>> /usr/bin/time setsebool -P httpd_can_network_connect=1
>>>>> valgrind --tool=massif setsebool -P httpd_can_network_connect=1
>>>>> ms_print massif.out.<pid>
>>>>>
>>>>>
>>>>>
>>>>
>>>> Will do that next.
>>>>
>>>> I did a time semodule -B on similar configs (2 cores/2GB ram):
>>>>
>>>> Result: cil seems faster but seems to take more memory:
>>>>
>>>> CIL: real 0m13.XXXs (23% mem (of 2 GB)
>>>> REGULAR: real 0m21.XXXs (15% mem (of 2 GB)
>>>
>>> So, that's a concern, as we already have various bug reports on semodule
>>> and setsebool being killed by the OOM killer, e.g.
>>> https://bugzilla.redhat.com/show_bug.cgi?id=1098446
>>>
>>>
>> valgrind output:
>>
>> http://paste.fedoraproject.org/116966/4999755/
>>
> 
> We just pushed a commit to CIL that greatly reduces peak memory usage.
> Some quick testing brings the peak memory usage of compiling Fedora's
> policy from around 460MB down to around 260MB. So I think its now about
> on par with current userspace. We're also working on some other changes,
> but those require a bit more work and so might take a little longer. But
> I don't think those changes will get memory usage down significantly
> more (maybe down another 10-20MB), so I doubt this will do a whole lot
> in solving the OOM killer issue.
> 

We recently pushed the second group of changes to reduce peak memory
usage, and reduced it much more than we thought it would, reducing about
50MB. It now takes about 210MB to build current fedora policy, which is
quite a bit less than the 15% of 2GB (~300MB) that Dominick saw.

  reply	other threads:[~2014-07-15 20:11 UTC|newest]

Thread overview: 85+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-09 19:21 [RFC] Source Policy, CIL, and High Level Languages Steve Lawrence
2014-07-10  6:51 ` Dominick Grift
2014-07-10 12:19   ` Steve Lawrence
2014-07-10 12:35   ` Stephen Smalley
2014-07-10 12:52     ` Dominick Grift
2014-07-10 13:09       ` Dominick Grift
2014-07-10 13:12         ` Stephen Smalley
2014-07-10 13:26           ` Dominick Grift
2014-07-10 13:38             ` Stephen Smalley
2014-07-10 13:45               ` Dominick Grift
2014-07-11 15:02                 ` Steve Lawrence
2014-07-15 20:11                   ` Steve Lawrence [this message]
2014-07-10 15:02             ` Stephen Smalley
2014-07-11 17:20   ` Steve Lawrence
2014-07-14 16:48     ` Stephen Smalley
2014-07-14 16:53       ` Stephen Smalley
2014-07-14 17:08         ` Stephen Smalley
2014-07-14 17:12           ` Steve Lawrence
2014-07-14 17:49             ` Stephen Smalley
2014-07-15 19:56               ` Steve Lawrence
2014-07-16 14:16                 ` Stephen Smalley
2014-07-16 14:21                   ` Stephen Smalley
2014-07-16 14:26                     ` Stephen Smalley
2014-07-16 14:33                       ` Stephen Smalley
2014-07-16 15:11                         ` Steve Lawrence
2014-07-16 15:53                           ` Dominick Grift
2014-07-16 15:58                             ` Dominick Grift
2014-07-16 19:00                             ` Stephen Smalley
2014-07-17 13:49                               ` Steve Lawrence
2014-07-17 14:02                                 ` Stephen Smalley
2014-07-17 18:02                                 ` Stephen Smalley
2014-07-17 18:58                                   ` Steve Lawrence
2014-07-17 19:10                                     ` Stephen Smalley
2014-07-17 19:48                                       ` Stephen Smalley
2014-07-17 20:04                                         ` Steve Lawrence
2014-07-17 20:37                                           ` Stephen Smalley
2014-07-17 20:50                                             ` Daniel J Walsh
2014-07-17 20:52                                             ` Daniel J Walsh
2014-07-23 19:24                                               ` Stephen Smalley
2014-07-24 12:48                                                 ` Daniel J Walsh
2014-07-18 12:59                                             ` Steve Lawrence
2014-07-18 14:30                                               ` Stephen Smalley
2014-07-18 15:57                                                 ` Steve Lawrence
2014-07-22 15:05                                               ` James Carter
2014-07-18 14:13                                             ` Christopher J. PeBenito
2014-07-17 19:51                                       ` Steve Lawrence
2014-07-22 14:47                                     ` James Carter
2014-07-16 15:43                 ` Steve Lawrence
2014-07-14 17:33           ` Dominick Grift
2014-07-18 16:00   ` Steve Lawrence
2014-07-18 18:10     ` Stephen Smalley
2014-07-21 14:34       ` Steve Lawrence
2014-07-21 14:51         ` Stephen Smalley
2014-07-21 17:50           ` Steve Lawrence
2014-08-01 14:51             ` Steve Lawrence
2014-08-01 17:46               ` Stephen Smalley
2014-08-04 14:07                 ` Steve Lawrence
2014-08-18 22:37                 ` Steve Lawrence
2014-07-10 13:52 ` Stephen Smalley
2014-07-10 14:06   ` Dominick Grift
2014-07-10 14:09   ` Steve Lawrence
2014-07-10 14:58     ` James Carter
2014-07-10 13:59 ` Stephen Smalley
2014-07-10 14:53   ` Steve Lawrence
2014-07-10 14:11 ` Stephen Smalley
2014-07-10 14:13   ` Stephen Smalley
2014-07-10 14:17   ` Steve Lawrence
2014-07-10 14:20     ` Stephen Smalley
2014-07-10 14:23   ` Dominick Grift
2014-07-10 14:25     ` Stephen Smalley
2014-07-10 14:34       ` Stephen Smalley
2014-07-10 14:50         ` Dominick Grift
2014-07-10 14:43       ` Dominick Grift
2014-07-10 14:30 ` Stephen Smalley
2014-07-10 14:50   ` Stephen Smalley
2014-07-10 15:05     ` Steve Lawrence
2014-07-10 15:08       ` Stephen Smalley
2014-07-10 16:04   ` Steve Lawrence
  -- strict thread matches above, loose matches on Subject: below --
2014-04-29 14:59 Steve Lawrence
2014-05-01 12:38 ` Dominick Grift
2014-05-01 12:57   ` Steve Lawrence
2014-05-01 13:24     ` Dominick Grift
2014-05-01 13:27       ` Dominick Grift
2014-05-01 13:31         ` Dominick Grift
2014-05-01 14:01           ` Steve Lawrence

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=53C58AE7.7070404@tresys.com \
    --to=slawrence@tresys.com \
    --cc=dominick.grift@gmail.com \
    --cc=sds@tycho.nsa.gov \
    --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.