Bug 185422 - Zone balancing issue when low on highmem
Summary: Zone balancing issue when low on highmem
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: kernel
Version: 3.0
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Larry Woodman
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks: 170417
TreeView+ depends on / blocked
 
Reported: 2006-03-14 17:19 UTC by Bastien Nocera
Modified: 2018-10-19 20:44 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-10-19 18:46:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
test.c (612 bytes, patch)
2006-03-14 17:19 UTC, Bastien Nocera
no flags Details | Diff
test-results.tgz (1.78 KB, application/octet-stream)
2006-03-14 17:22 UTC, Bastien Nocera
no flags Details
Patch that stops the swapping when the systeh should reclaim pagecache memory (1.58 KB, patch)
2006-03-28 18:42 UTC, Larry Woodman
no flags Details | Diff

Description Bastien Nocera 2006-03-14 17:19:59 UTC
kernel-2.4.21-37.0.1.EL

On an x86 machine with 1GB of memory (or with a 1GB of simulated memory, using
the mem= kernel option), filling the pagecache and after that using a memory
intensive application will evict running processes to the swap, instead of
pruning the pagecache.

1. Create a 1.5GB file
2. run "cat bigfile > /dev/null"
3. run the attached test case
4. check the amount of swapped data:
- with mem=890M (no HighMem zone), there's nothing in the swap
- with mem=1G (129 megs in HighMem), there's about 2.6 megs of data in the swap

Full test results also attached.

Comment 1 Bastien Nocera 2006-03-14 17:19:59 UTC
Created attachment 126111 [details]
test.c

Comment 2 Bastien Nocera 2006-03-14 17:22:33 UTC
Created attachment 126112 [details]
test-results.tgz

Comment 4 Ernie Petrides 2006-03-16 21:22:59 UTC
To jfautley, the latest RHEL3 is U7 (released yesterday),
kernel version 2.4.21-40.EL.  We are now doing development
for U8, which is where any potential hot fix would be based.

But there is no "previously-mentioned patch" in this bug report.

Comment 5 Jon Fautley 2006-03-17 09:49:48 UTC
Sorry - my bad. I sent this to both bugzillas from issue-tracker. There is a
patch for RHEL4 in Bug 185092.
[See: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=185092#c2]

Comment 8 Bastien Nocera 2006-03-23 14:51:20 UTC
The other bugzilla has nothing to do with this issue, so there wouldn't be much
point in backporting it. Those issues shouldn't even be linked, and aren't anymore.

Comment 10 Larry Woodman 2006-03-28 18:42:29 UTC
Created attachment 126919 [details]
Patch that stops the swapping when the systeh should reclaim pagecache memory


OK, the problem with the system is that the Highmem zone is only 1/8 of the
system RAM where the Normal zone is the remaining 7/8.	This combined with the
fact that file system read and write operations deactivate pagecache pages
after they are done with them results in the system swapping rather than
reclaiming pagecache memory eventhough the total pagecache size is greater than
/proc/sys/vm/pagecache.maxpercnet.  After the creation of the large file the
small Higmem zone is totally filled with pagecache pages although most of them
are on the inactive_dirty list.  When the test.c program is run the system
quickly reclaims the pagecache pages from the Highmem zone and replaces them
with anonymous memory pages from the memory region that test.c allocated.  Once
this occurs and the system runs out of memory it swaps out the Highmem because
that zone is totally consumed with anonymous pages even though the Normal zon
is not.

To fix this, I added another test in launder_page() to reactivate anonymous
pages if the total system pagecache size is less than pagecache.maxpercent. 
This fixes the problem described here but we still need to do significant
performance testing before we can commit to addig this patch ro RHEL3-U8.

Larry Woodman

Comment 11 RHEL Program Management 2007-10-19 18:46:18 UTC
This bug is filed against RHEL 3, which is in maintenance phase.
During the maintenance phase, only security errata and select mission
critical bug fixes will be released for enterprise products. Since
this bug does not meet that criteria, it is now being closed.
 
For more information of the RHEL errata support policy, please visit:
http://www.redhat.com/security/updates/errata/
 
If you feel this bug is indeed mission critical, please contact your
support representative. You may be asked to provide detailed
information on how this bug is affecting you.


Note You need to log in before you can comment on or make changes to this bug.