Bug 751189

Summary: /run/initramfs sits around after booting taking up ram.
Product: [Fedora] Fedora Reporter: Dave Jones <davej>
Component: dracutAssignee: Harald Hoyer <harald>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: dracut-maint, dvlasenk, harald, jonathan, pfrields, zkabelac
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-01-23 11:31:40 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 2011-11-03 19:26:16 UTC
As noted in bug 750357, /run/initramfs is still populated after booting, using up a lot of memory.

Perhaps a systemd startup service that prunes it after handing over to the real init is needed ?

Comment 1 Kay Sievers 2011-11-03 19:33:33 UTC
On shutdown, we go back to the initramfs now.

It is needed to properly disassemble raid devices or log out of network
servers that provide filesystems.

Dracut should probably delete itself, like it did in earlier releases, when
there was nothing to assemble during bootup.

Comment 2 Dave Jones 2011-11-03 19:47:15 UTC
even when there is something to assemble, there's a ton of crap left there taking up ram that isn't going to get used.

not only dracut, but the bulk of it is stuff like plymouth themes, keymaps, and kernel modules.

just keep around the bare minimum that's needed to do what you need.

Comment 3 Harald Hoyer 2011-11-04 14:51:12 UTC
yes, you are right... and for those who don't want it right now:

# echo "unset prefix" >> /etc/dracut.conf.d/99-my.conf

Comment 4 Denys Vlasenko 2012-01-22 00:01:53 UTC
(In reply to comment #2)
> even when there is something to assemble, there's a ton of crap left there
> taking up ram that isn't going to get used.
> 
> not only dracut, but the bulk of it is stuff like plymouth themes, keymaps, and
> kernel modules.

It's huge.

# du -s -k /run/initramfs
42076   /run/initramfs

Forty two megs on my machine.

Comment 5 Harald Hoyer 2012-01-23 11:31:40 UTC
dracut-014-61.git20120123.fc17

Comment 6 Harald Hoyer 2012-02-08 17:02:10 UTC
*** Bug 785538 has been marked as a duplicate of this bug. ***

Comment 7 Harald Hoyer 2012-02-08 17:03:06 UTC
$ du -ch /run/initramfs
12M	/run/initramfs

for a hostonly dracut image.

Comment 8 Zdenek Kabelac 2012-02-08 17:10:52 UTC
I still somehow don't get it  -

My machine could run for a week with just suspending - I'm not using swap.
And now I don't get the point of blocking 12MB of memory just because maybe I want to reboot once in a week?

Why is problem to decompress image to ramdisk BEFORE doing a reboot - and then run needed binaries from there -  yeah it may delay reboot for 0.1 second....

Comment 9 Harald Hoyer 2012-02-08 17:54:05 UTC
(In reply to comment #8)
> I still somehow don't get it  -
> 
> My machine could run for a week with just suspending - I'm not using swap.
> And now I don't get the point of blocking 12MB of memory just because maybe I
> want to reboot once in a week?
> 
> Why is problem to decompress image to ramdisk BEFORE doing a reboot - and then
> run needed binaries from there -  yeah it may delay reboot for 0.1 second....

Actually, the idea of compressing, saving and restoring has also come to my mind. Have to think about it a little bit more.

Comment 10 Harald Hoyer 2012-02-10 09:02:41 UTC
$ du -ch /run/initramfs/
8.0K	/run/initramfs/
8.0K	total

fixed with dracut-015-8.git20120210.fc17