Bug 613823

Summary: package update of policy consumes all ram.
Product: [Fedora] Fedora Reporter: Dave Jones <davej>
Component: selinux-policy-targetedAssignee: Daniel Walsh <dwalsh>
Status: CLOSED NOTABUG QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: pfrields
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-07-13 13:08:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dave Jones 2010-07-12 21:34:26 UTC
every time I yum update my firewall, it ends up oom'ing when it gets to updating selinux-policy-targeted.   That machine runs from flash, so there's no swap space. Is there anything that can be done to reduce selinux's memory usage, or am I going to have to add a disk/more ram to that machine ?

It has 512MB right now, which is on the lower end of what Fedora supports, but this is the only thing that ever seems to use all the memory. Routing packets isn't particularly memory intensive, so it seems a waste to have to upgrade the hardware.

Comment 1 Daniel Walsh 2010-07-13 13:08:20 UTC
You can customize the bzip block size and "small" flag via /etc/selinux/semanage.conf. After applying you can add entries like these to your /etc/selinux/semanage.conf to trade off memory vs disk space (block size) and to trade off memory vs runtime (small):

bzip-blocksize=4
bzip-small=1

You can also disable bzip compression altogether for your module store
via:
bzip-blocksize=0