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:
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.
I think this patch could be ported to RHEL 5.6. It is simple and obviously correct.
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.
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.
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