WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: tmpfs oom  (Read 8459 times)

Offline hiro

  • Hero Member
  • *****
  • Posts: 1217
tmpfs oom
« 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.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: tmpfs oom
« Reply #1 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".
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: tmpfs oom
« Reply #2 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.
« Last Edit: October 29, 2012, 09:57:46 AM by curaga »
The only barriers that can stop you are the ones you create yourself.

Offline hiro

  • Hero Member
  • *****
  • Posts: 1217
Re: tmpfs oom
« Reply #3 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?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: tmpfs oom
« Reply #4 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.
The only barriers that can stop you are the ones you create yourself.