Bug 99475

Summary: (VM)Cannot allocate memory when pagecache avialable
Product: [Retired] Red Hat Linux Reporter: Hrunting Johnson <hrunting>
Component: kernelAssignee: Arjan van de Ven <arjanv>
Status: CLOSED WONTFIX QA Contact: Brian Brock <bbrock>
Severity: high Docs Contact:
Priority: medium    
Version: 9CC: riel
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
URL: http://mail.nl.linux.org/linux-mm/2003-03/msg00069.html
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-09-30 15:41:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Hrunting Johnson 2003-07-21 00:27:24 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4b)
Gecko/20030516 Mozilla Firebird/0.6

Description of problem:
This system has 2GB of RAM with no swap enabled.  Swap is disabled because the
kernel constantly wants to swap, whether or not it really needs to, and we
literally can't afford the extra unnecessary disk writes (you've got other bugs
about the poor swapping behavior).

After a while, processes (including kernel ops) will die with "Cannot allocate
memory" warnings and the system will lock up in a kswapd frenzy (it appears),
despite over 50% of the physical memory being available in file cache.

See this post:
http://mail.nl.linux.org/linux-mm/2003-03/msg00069.html

Obviously since the rmap patches have been applied, the fix isn't applicable,
but the test killmm.c script shows the behavior.  In a test with 3 512MB files
(he uses 9), the program had a problem allocating memory after the first file is
read in.  Some /proc/meminfo listings from the run:

[root@r01 root]# cat /proc/meminfo 
        total:    used:    free:  shared: buffers:  cached:
Mem:  2113482752 2056462336 57020416        0  1773568 884293632
Swap:        0        0        0
MemTotal:      2063948 kB
MemFree:         55684 kB
MemShared:           0 kB
Buffers:          1732 kB
Cached:         863568 kB
SwapCached:          0 kB
Active:        1655832 kB
ActiveAnon:     971712 kB
ActiveCache:    684120 kB
Inact_dirty:     87428 kB
Inact_laundry:   59008 kB
Inact_clean:     35364 kB
Inact_target:   367524 kB
HighTotal:     1179124 kB
HighFree:         1024 kB
LowTotal:       884824 kB
LowFree:         54660 kB
SwapTotal:           0 kB
SwapFree:            0 kB
[root@r01 root]# cat /proc/meminfo 
        total:    used:    free:  shared: buffers:  cached:
Mem:  2113482752 2086453248 27029504        0  1773568 884293632
Swap:        0        0        0
MemTotal:      2063948 kB
MemFree:         26396 kB
MemShared:           0 kB
Buffers:          1732 kB
Cached:         863568 kB
SwapCached:          0 kB
Active:        1685088 kB
ActiveAnon:    1000968 kB
ActiveCache:    684120 kB
Inact_dirty:     87428 kB
Inact_laundry:   59008 kB
Inact_clean:     35364 kB
Inact_target:   373376 kB
HighTotal:     1179124 kB
HighFree:         1024 kB
LowTotal:       884824 kB
LowFree:         25372 kB
SwapTotal:           0 kB
SwapFree:            0 kB
[root@r01 root]# cat /proc/meminfo 
        total:    used:    free:  shared: buffers:  cached:
Mem:  2113482752 2101526528 11956224        0  1773568 881119232
Swap:        0        0        0
MemTotal:      2063948 kB
MemFree:         11676 kB
MemShared:           0 kB
Buffers:          1732 kB
Cached:         860468 kB
SwapCached:          0 kB
Active:        1702628 kB
ActiveAnon:    1018508 kB
ActiveCache:    684120 kB
Inact_dirty:     87428 kB
Inact_laundry:   59008 kB
Inact_clean:     32264 kB
Inact_target:   376264 kB
HighTotal:     1179124 kB
HighFree:         1024 kB
LowTotal:       884824 kB
LowFree:         10652 kB
SwapTotal:           0 kB
SwapFree:            0 kB
[root@r01 root]# cat /proc/meminfo 
        total:    used:    free:  shared: buffers:  cached:
Mem:  2113482752 1356812288 756670464        0  1773568 881119232
Swap:        0        0        0
MemTotal:      2063948 kB
MemFree:        738936 kB
MemShared:           0 kB
Buffers:          1732 kB
Cached:         860468 kB
SwapCached:          0 kB
Active:         971676 kB
ActiveAnon:     287556 kB
ActiveCache:    684120 kB
Inact_dirty:     87428 kB
Inact_laundry:   59008 kB
Inact_clean:     32264 kB
Inact_target:   230076 kB
HighTotal:     1179124 kB
HighFree:       574588 kB
LowTotal:       884824 kB
LowFree:        164348 kB
SwapTotal:           0 kB
SwapFree:            0 kB

Version-Release number of selected component (if applicable):
kernel-smp-2.4.20-18.9

How reproducible:
Always

Steps to Reproduce:
1. load system with no swap
2. follow http://mail.nl.linux.org/linux-mm/2003-03/msg00069.html
3.
    

Actual Results:  killmm dies failing to allocate memory

Expected Results:  killmm allocates memory successfully

Additional info:

http://mail.nl.linux.org/linux-mm/2003-03/msg00069.html

Comment 1 Bugzilla owner 2004-09-30 15:41:19 UTC
Thanks for the bug report. However, Red Hat no longer maintains this version of
the product. Please upgrade to the latest version and open a new bug if the problem
persists.

The Fedora Legacy project (http://fedoralegacy.org/) maintains some older releases, 
and if you believe this bug is interesting to them, please report the problem in
the bug tracker at: http://bugzilla.fedora.us/