Bug 185422 - Zone balancing issue when low on highmem
Zone balancing issue when low on highmem
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: kernel (Show other bugs)
3.0
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Larry Woodman
Brian Brock
:
Depends On:
Blocks: 170417
  Show dependency treegraph
 
Reported: 2006-03-14 12:19 EST by Bastien Nocera
Modified: 2010-10-22 00:38 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-10-19 14:46:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Bastien Nocera 2006-03-14 12:19:59 EST
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 12:19:59 EST
Created attachment 126111 [details]
test.c
Comment 2 Bastien Nocera 2006-03-14 12:22:33 EST
Created attachment 126112 [details]
test-results.tgz
Comment 4 Ernie Petrides 2006-03-16 16:22:59 EST
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 04:49:48 EST
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 09:51:20 EST
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 13:42:29 EST
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 Product and Program Management 2007-10-19 14:46:18 EDT
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.