lkml.org 
[lkml]   [1997]   [Jul]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRunning out of memory (sort of)
Date

Hi. The recent discussion on running out of memory reminds me of some of
the problems i've had, so i thought i'd bring 'em up.

Using both 2.0.30 and 2.1.42, after a while of uptime, i'll run low on
physical memory, as reported in /proc/meminfo under MemFree. My system is
generally lightly loaded, but i do have one daemon, which continuously
chooses random sound files and plays them. Under these "low memory"
conditions, the sound playing daemon sometime reports "Out of memory"
errors. My solution under these conditions is to run a program called
"swapout" that comes with the ftape distribution.

According to ftape documentation, ftape needs a buffer of 32K of continuous
physical memory, and:

The physical RAM of
the computer, however, is organized in entities of 4Kb, so called
"pages". This means that it might be very well the case that there
is indeed plenty of free RAM on your computer system, but the RAM
is fragmented in a way that the OS (Linux) is unable to provide
pieces of 32Kb of continuous memory.

To cope with this problem, there exists a small and ugly, but useful,
utility called `swapout', which does nothing but allocate a huge chunk
of memory, dirty all pages (i.e. force the OS to really allocate those
pages) and exit. This forces the Linux kernel to swap out quite a lot
of RAM. As a result, the physical RAM of the computer gets
de-fragmented.

Since swapout seems to also fix my sound problems, i surmise that the sound
module has similar problems.

Is there any way for you kernel hackers to incorporate this functionality
into the kernel? Say, maintain a certain-sized pool of continuous memory
(settable) for requests by modules, or some other idea with similar
consequences? TIA.

--
Mordechai T. Abzug
mabzug1@umbc.edu finger -l mabzug1@umbc7.umbc.edu http://umbc.edu/~mabzug1
>>>>> My employer ain't payin' for my opinions, so they must be *mine*. <<<<<
If God meant us to go around naked, we'd be born that way.

\
 
 \ /
  Last update: 2005-03-22 13:40    [W:0.031 / U:0.556 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site