Bug 466088 - dm-snapshot: very slow write to snapshot origin when copy-on-write occurs
Summary: dm-snapshot: very slow write to snapshot origin when copy-on-write occurs
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel
Version: 5.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Mikuláš Patočka
QA Contact: Boris Ranto
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-10-08 09:02 UTC by Kazuo Ito
Modified: 2011-01-13 20:43 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-01-13 20:43:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:0017 0 normal SHIPPED_LIVE Important: Red Hat Enterprise Linux 5.6 kernel security and bug fix update 2011-01-13 10:37:42 UTC

Description Kazuo Ito 2008-10-08 09:02:27 UTC
Description of problem:

Write to snapshot origin volumes, iff copy-on-write occurs,
are an order of magnitude slower than the other lvm writes.
The slowdown is more pronounced in cases of sequential writes.

A couple of measures to alleviate the problem have been floating
around the net, 1) to make snapshot origin and cow volumes
reside on separate disks, and 2) to patch kcopyd so that
it shouldn't reorder block write requests when process_jobs
fails to complete them because it run short of free pages.

I ran several tests and found that the patch (see attachment)
can make copy-on-write cases twice as fast as the non-patched kernel,
and, as a side note, that allocating more pages to kcopyd clients
does not help much.

Version-Release number of selected component (if applicable):

How reproducible:

Always.

Steps to Reproduce:
1. create a file on an LV, e.g. dd if=/dev/zero of=<path to the file> bs=4096 count=10240
2. create a snapshot of the volume
3. overwrite the file, e.g. dd if=/dev/zero of=<path to the file> \
  bs=4096 count=10240 conv=notrunc, followed by fsync
4. overwrite the file again, followed by fsync
  
Actual results:

3. is x10 -- x20 slower than 4.

Expected results:



Additional info:

Comment 1 Kazuo Ito 2008-10-24 02:56:48 UTC
An upstream patch for the problem has been queued in the 2.6.27-stable tree.
( http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git;a=commit;h=576197a5ec84bde5889d4ac0df69aa427aa61f48 )

Its filename is dm-kcopyd-avoid-queue-shuffle.patch.

Comment 3 Mikuláš Patočka 2010-05-18 21:54:46 UTC
I think this patch could be ported to RHEL 5.6. It is simple and obviously correct.

Comment 4 RHEL Program Management 2010-05-20 12:48:12 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 6 Jarod Wilson 2010-09-21 20:58:53 UTC
in kernel-2.6.18-223.el5
You can download this test kernel (or newer) from http://people.redhat.com/jwilson/el5

Detailed testing feedback is always welcomed.

Comment 10 errata-xmlrpc 2011-01-13 20:43:48 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 therefore 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/RHSA-2011-0017.html


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