Couldn't get a free page... problem

Couldn't get a free page... problem

Post by Marius Heule » Mon, 02 Jun 1997 04:00:00



Hello!
The new www server (486, 8MB) with linux 2.0.29 shows this message in the
log files: kernel: Couldn't get a free page.....
I think there should be enough memory overall, because free reports:

             total       used       free     shared    buffers     cached
Mem:          7116       7016        100       4708        124       3056
-/+ buffers:             3836       3280
Swap:        29168       1368      27800

What problems could be caused by this missing of memory?
What can I do to solve this?

Greetings
Marius

--
#############################################################################
#  Marius Heuler   #  LinuX  -  The Choice of the Jilted Generation         #
#     |Rave|       # ------------------------------------------------------ #

# Computer Science #  http://www-info3.informatik.uni-wuerzburg.de/~heuler  #
#   Uni Wuerzburg  #        Don't believe the Hype - Use your Brain!        #
#############################################################################

 
 
 

Couldn't get a free page... problem

Post by Mike Cast » Mon, 02 Jun 1997 04:00:00




Quote:>log files: kernel: Couldn't get a free page.....

Long standing problem with Linux.

Basically it means that the kernel couldn't allocate a consequetive chunk
of memory in a time critical section of code (ie, interrupt handler, or NFS
code).  

You can tweak stuff in /proc/sys/vm/freepages, and cause the kernel to more
aggressively page out user pages so the kernel has more free pages (and
therefore, more of a _chance_ to satisfy the request).  However, that
doesn't solve the problem, merely delay's when you'll see the symptom.

mrc

 
 
 

Couldn't get a free page... problem

Post by ro » Mon, 02 Jun 1997 04:00:00



        another dimension with:
 >Hello!
 >The new www server (486, 8MB) with linux 2.0.29 shows this message in the
 >log files: kernel: Couldn't get a free page.....
 >I think there should be enough memory overall, because free reports:
 >
 >             total       used       free     shared    buffers     cached
 >Mem:          7116       7016        100       4708        124       3056
 >-/+ buffers:             3836       3280
 >Swap:        29168       1368      27800

        Why linux doesn't handle the request, I don't know, but more
        (real) memory will fix the problem. This never has occurred
        on my personal machine (40 MB now, but run w/ as little as
        16 using X) and only happens on a news server that I work on
        when innd has become about as large as the physical memory,
        (once a week, maybe) in which case, restarting innd fixes
        it.

--
Spend a day with NT and
Learn to appreciate VMS
and the raw power of DCL

 
 
 

Couldn't get a free page... problem

Post by Jost Boekemei » Tue, 03 Jun 1997 04:00:00






>>log files: kernel: Couldn't get a free page.....

> Long standing problem with Linux.

> Basically it means that the kernel couldn't allocate a consequetive chunk
> of memory in a time critical section of code (ie, interrupt handler, or NFS
> code).  

The system I am currently using, crashed some days ago. Spitting out
this message "couldn't get a free page" over and over again.
According to top 7 MB main memory where still available. Everything was
still running, except iBCS2 and NFS.

I don't have the time to see what is going on there, but a system crash
like that should not happen.

Quote:> therefore, more of a _chance_ to satisfy the request).  However, that
> doesn't solve the problem, merely delay's when you'll see the symptom.

Delay's in iBCS/NFS code or in the user code?

Jost

 
 
 

Couldn't get a free page... problem

Post by Jost Boekemei » Tue, 03 Jun 1997 04:00:00






>>log files: kernel: Couldn't get a free page.....

> Long standing problem with Linux.

> Basically it means that the kernel couldn't allocate a consequetive chunk
> of memory in a time critical section of code (ie, interrupt handler, or NFS
> code).  

The system I am currently using, crashed some days ago. Spitting out
this message "couldn't get a free page" over and over again.
According to top 7 MB main memory where still available. Everything was
still running, except iBCS2 and NFS.

I don't have the time to see what is going on there, but a system crash
like that should not happen.

Quote:> therefore, more of a _chance_ to satisfy the request).  However, that
> doesn't solve the problem, merely delay's when you'll see the symptom.

Delay's in iBCS/NFS code or in the user code?

Jost

 
 
 

Couldn't get a free page... problem

Post by Peter Dalgaard BS » Wed, 04 Jun 1997 04:00:00





...

> > therefore, more of a _chance_ to satisfy the request).  However, that
> > doesn't solve the problem, merely delay's when you'll see the symptom.

> Delay's in iBCS/NFS code or in the user code?

"Delays" is a verb, there! (Supposed to be...)

If you switch to a console (w/o X) and press shift-ScrLock, you'll get
a dump with the following info in it

Mem-info:
Free pages:        1032kB
 ( 124*4kB 3*8kB 4*16kB 2*32kB 2*64kB 2*128kB = 1032kB)

Linux keeps a list of free pages grouped according to the maximum
contiguous size. I.e. if there is 2 8kB regions that can be fused end
to end to form a 16kB region, Linux will do so.)

When a "Couldn't get a free page..." incident happens, all blocks of
(say) 8kB or more have been used, whereas many smaller blocks are
still around. Fragmentation. Since there's plenty of free pages *in
total* Linux sees no reason to swap things out in order to get more
memory, but the net-driver or whatever sits in a loop waiting for a
large enough block to appear. Deadlock. (And maybe half an hour later,
by some random event, an 8k block appears and everything continues as
if nothing ever happened.)

As you might have noticed, my numbers are probably bigger than yours.
That's because I do an

echo '128 192 256' > /proc/sys/vm/freepages

in my startup files. (Default is '40 60 80'). This tells Linux to
start swapping if there's less than 1024K (256 * 4K) memory left, and
do it increasingly aggressively as the free amount drops below 768K
and 512K watermarks. More free memory is likely to be more difficult
to get completely fragmented, but it *can* still happen. That's what
Mike meant with "delays the symptom".

--
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N  
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918

 
 
 

Couldn't get a free page... problem

Post by Wolfram Gloge » Wed, 04 Jun 1997 04:00:00



Quote:> Mem-info:
> Free pages:        1032kB
>  ( 124*4kB 3*8kB 4*16kB 2*32kB 2*64kB 2*128kB = 1032kB)

> Linux keeps a list of free pages grouped according to the maximum
> contiguous size. I.e. if there is 2 8kB regions that can be fused end
> to end to form a 16kB region, Linux will do so.)

It is important to note that the way the pages are currently organized
in Linux, it is not certain that adjacent regions can be fused. A
given region can only be fused with its `buddy'.  This could be
changed.

Quote:> When a "Couldn't get a free page..." incident happens, all blocks of
> (say) 8kB or more have been used, whereas many smaller blocks are
> still around. Fragmentation. Since there's plenty of free pages *in
> total* Linux sees no reason to swap things out in order to get more
> memory, but the net-driver or whatever sits in a loop waiting for a
> large enough block to appear. Deadlock.

Exactly.  What puzzles me is that people have reported the problem on
machines with much memory and without any networking.  What
non-network parts of the kernel need more than one contiguous page in
an interrupt ?

Regards,
Wolfram.

 
 
 

Couldn't get a free page... problem

Post by Timothy Watso » Wed, 04 Jun 1997 04:00:00



> Exactly.  What puzzles me is that people have reported the problem on
> machines with much memory and without any networking.  What
> non-network parts of the kernel need more than one contiguous page in
> an interrupt ?

The tape driver, for one (I just peek at the kernel list from time-to-time)

--
________________________________________________________________________
T    i    m    o    t    h    y              W    a    t    s    o    n

  __/| Something there is that doesn't love a wall, that wants it down

 
 
 

Couldn't get a free page... problem

Post by Ulrich Eckhard » Thu, 05 Jun 1997 04:00:00



> Exactly.  What puzzles me is that people have reported the problem on
> machines with much memory and without any networking.  What
> non-network parts of the kernel need more than one contiguous page in
> an interrupt ?

> Regards,
> Wolfram.

Hi,

i got this problem, when i tried to format a large partition (3 GB),
but i have networking running. I have tried it serveral times
with a kernel 2.0.30 without success, then using 2.0.27 it worked,
and on an other test with 2.0.30 it worked also (all tests are running
on the same machine P166, adaptec 2940, 32 MB ram).

I have testet it also with a running X, which causes a complete hang
of the machine.

Uli
--

http://people.frankfurt.netsurf.de/uli
Truly great madness can not be achieved without significant
intelligence. (Henrik Tikkanen)

 
 
 

Couldn't get a free page... problem

Post by Wolfram Gloge » Fri, 06 Jun 1997 04:00:00



> i got this problem, when i tried to format a large partition (3 GB),
> but i have networking running. I have tried it serveral times
> with a kernel 2.0.30 without success, then using 2.0.27 it worked,

Could you try 2.0.30 with the patch from:

 ftp://ftp.kernel.org/pub/linux/kernel/davem/pre-patch-2.0.31-2.gz

(don't be intimidated by the size of that patch, the changes to the
buffering code are very minor).

Regards,
Wolfram.

 
 
 

1. Solution requested for a 'Couldn't get a free page.....' problem

Hi everyone,

We are developping an MPEG2 video over ATM client/server application on Linux
and we seem to have a problem sometimes. Our application uses the following
cutting edge features available with Linux, version 2.0.14:

        - Efficient Network 155Mb/s ATM adapters, drivers and software from
          Werner Almesberger at LRC, version 0.21;
        - The kernel level Pthreads from Xavier Leroy, version 0.14;
        - The Real Time Clock extension features to regulate the Constant Bit
          Rate MPEG2 video transmission from the server by Paul Gortmaker;

to name a few.

Once in a while, we get the 'Couldn't get a free page.....' message poping up
stopping a thread from our client application and then terminating the server
process. I would appreciate if someone could give us pointers to where we should
look in order for us to ideally get rid of the problem. It would seem that it
is network related because we saw this message appear in another network situation
unrelated to our application. It would be nice to know if and how we can increase
the number of pages available to the kernel assuming this is a likely solution.

Thanks for your time and attention.

Gilles

2. System 38 for UNIX

3. getting "Couldn't get a free page" during install

4. libXmu.so.6

5. How boot up the Solaris 2.5.1 System through other alternatives ?

6. Couldn't get a free page... problem (causes filesystem problems)

7. Multi OSs with FreeBSD

8. Please Help: "Couldn't Get a Free Page" Problem!!!

9. Problem with the message "Couldn't get a free page ....."

10. v1.1.74 -- Kernel: Couldn't get a free page.....

11. Couldn't get a free page... ?

12. kernel: Couldn't get a free page.....