Bug 421451

Summary: kernel dm-snapshot: excessive memory usage
Product: Red Hat Enterprise Linux 5 Reporter: Milan Broz <mbroz>
Component: kernelAssignee: Milan Broz <mbroz>
Status: CLOSED ERRATA QA Contact: Martin Jenner <mjenner>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.1CC: agk, pvrabec, rkenna, tao, zkabelac
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2008-0314 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-05-21 15:03:43 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 Milan Broz 2007-12-12 13:55:25 UTC
+++ This bug was initially created as a clone of Bug #383031 +++

Description of problem:

Using the device mapper snapshot of an origin device to simulate a CoW devices
causes progressive memory exhaustion as the device is written to.
...

This bugzilla covers backporting of a simple implementation of consecutive
exceptions for in-memory storage structure.
Using consecutive counter has huge memory saving impact in some snapshot
configuration (and doesn't increase memory use otherwise).

See
http://www2.kernel.org/pub/linux/kernel/people/agk/patches/2.6/editing/dm-snapshot-combine-consecutive-exceptions-in-memory.patch

Comment 1 RHEL Program Management 2007-12-12 14:05:46 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 4 Don Zickus 2007-12-21 20:18:42 UTC
in 2.6.18-62.el5
You can download this test kernel from http://people.redhat.com/dzickus/el5

Comment 6 Mike Gahagan 2008-01-29 23:10:25 UTC
Confirmed the -75 kernel is using less memory with the provided testcase. 

[root@test177 snapshot_verify]# cat snapslab-2.6.18-75.el5
dm-snapshot-in      1533   3128    112   34    1
dm-snapshot-ex      6982   9856     32  112    1

[root@test177 snapshot_verify]# cat snapslab-2.6.18-53.1.4.el5
dm-snapshot-in      1317   2380    112   34    1
dm-snapshot-ex     24724  27888     32  112   1

Other than the increase memory usage, both kernels seemed to hold up well. I was
never able to reproduce any corrupted snapshots or other errors.

I am pretty close to having the reproducer ready to go in RHTS.


Comment 7 Bryn M. Reeves 2008-02-08 09:32:11 UTC
*** Bug 383031 has been marked as a duplicate of this bug. ***

Comment 10 errata-xmlrpc 2008-05-21 15:03:43 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2008-0314.html