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.
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.
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:
|All times are GMT -5. The time now is 12:04 PM.|