LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices

Reply
 
LinkBack Search this Thread
Old 09-07-2012, 11:20 AM   #1
nethomas1968
LQ Newbie
 
Registered: Nov 2011
Posts: 6

Rep: Reputation: Disabled
OOM Killer in embedded system


Apologies if this is not the right forum for this question.

I have an embedded Linux system. There is no Hard disk drive - so there is no swap space.

I know the 128MB isn't really enough for the task, but most stuff works - most of the time.

But, I do get an OOM_Killer killed task every so often, which is somewhat useless in an embedded system!, the unit needs a reboot to recover.

But, I notice that the proc/meminfo shows that there is still 20MB of 'Inactive' memory when the OOM_Killer kicks in.
Why can't the system use some of that 20MB?

I suspect that I am about 12MB short of a stable system.


Comments/suggestions welcome.

Regards

Nick
 
Old 09-08-2012, 11:28 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 1,160

Rep: Reputation: 258Reputation: 258Reputation: 258
Inactive memory should be available for use. Not sure what the threshold is for the Dreaded OOM, though. Maybe there is a tunable parameter some place.

One thing you could try is setting up a compressed ramdisk as swap space. Allocate 15M for it and it should give you an effective 30M of fairly fast swap.
 
Old 10-16-2012, 08:49 PM   #3
engr04
LQ Newbie
 
Registered: Mar 2012
Posts: 21

Rep: Reputation: Disabled
My understanding is the kernel will cache as much as it can, essentially using up all of your memory. When you have a task that suddenly requires memory, the kernel needs to free up the cached memory. If it can't free the memory fast enough, you will get an OOM error.

You can set a minimum free memory that the kernel will not use as cache. This value can be modified through the following sysfs file: /proc/sys/vm/min_free_kbytes.

I think increasing this number will help.

Read current value:
Quote:
cat /proc/sys/vm/min_free_kbytes
Write a new value (4MB)
Quote:
echo 4096 > /proc/sys/vm/min_free_kbytes
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
OOM killer even though there is memory available Bilb Linux - General 4 12-07-2011 03:03 AM
Kernel oom autopsy - trying to understand the oom-killer log entries kamermans Linux - Kernel 2 01-11-2011 12:52 PM
Oom killer? fortez Linux - Server 6 07-08-2010 03:37 AM
Out of memory (oom) killer causes system crash? BusyBeeBop Linux - Software 6 06-02-2008 01:42 AM
OOM-Killer woes Slim Backwater Slackware 2 07-25-2006 03:00 AM


All times are GMT -5. The time now is 07:27 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration