Bug 751189 - /run/initramfs sits around after booting taking up ram.
Summary: /run/initramfs sits around after booting taking up ram.
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: dracut
Version: 16
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Harald Hoyer
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 785538 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-03 19:26 UTC by Dave Jones
Modified: 2015-01-04 22:31 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-01-23 11:31:40 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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


Note You need to log in before you can comment on or make changes to this bug.