Tiny Core Linux

Tiny Core Base => Raspberry Pi => Topic started by: hiro on October 29, 2012, 08:45:14 AM

Title: tmpfs oom
Post by: hiro on October 29, 2012, 08:45:14 AM
I'm not sure what the official tc philosophy is about filling the root tmpfs until the oom-killer feels the need to kill my shell, ssh, dhcp and so on, but now on the pi it is obviously not as easily avoidable as on my x86 with gigs of memory.

I can check on x86 how much space my root is taking by running df:
rootfs          905M  235M  670M  26% /

why doesn't this work on picore?

Perhaps can we somehow limit the root tmpfs size instead of killing processes?
If we reserve a certain amount for root we might want to make sure oom-killer doesn't look at that as available space either.

But I really haven't ever touched either the tmpfs or the oom settings. So I come here for recommendation or perhaps a fix.
Title: Re: tmpfs oom
Post by: tinypoodle on October 29, 2012, 09:39:42 AM
Not sure if there would be any difference, but at least on x86 data in tmpfs would automatically be swapped out as needed if enough swap is available.

"du -sx /" should result in same output as "df".
Title: Re: tmpfs oom
Post by: curaga on October 29, 2012, 09:55:52 AM
I assume the Pi kernel is unpatched, ie it doesn't do tmpfs root. Ramfs has no limits, it can fill all your ram, and can't be swapped either.

Add the "noembed" boot code on the Pi to use the old copy-to-tmpfs code, at the cost of boot time.
Title: Re: tmpfs oom
Post by: hiro on October 29, 2012, 11:29:15 AM
ah, have never realized what this patch does. now eventually I have understood how the embed/noembed stuff works.

when I use noembed can the memory used by the initramfs get reused later on?
Title: Re: tmpfs oom
Post by: curaga on October 29, 2012, 11:39:09 AM
Yes, the double RAM use is only for the duration of the copy. Afterwards it uses no more ram than a default boot.