Bug 725580 - Improve sysfs performance when many block devices are created
Summary: Improve sysfs performance when many block devices are created
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel
Version: 6.1
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: 6.2
Assignee: Mikuláš Patočka
QA Contact: Petr Beňas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-25 21:49 UTC by Mikuláš Patočka
Modified: 2015-01-04 23:01 UTC (History)
11 users (show)

Fixed In Version: kernel-2.6.32-188.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-06 13:54:28 UTC
Target Upstream Version:
mpatocka: needinfo+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:1530 0 normal SHIPPED_LIVE Moderate: Red Hat Enterprise Linux 6 kernel security, bug fix and enhancement update 2011-12-06 01:45:35 UTC

Description Mikuláš Patočka 2011-07-25 21:49:42 UTC
Sysfs contains algorithms that perform quadratically with respect to the number of entries in a directory. As a result, sysfs slows down operation when working with many (thousands ~ ten thousands) block devices.

Comment 2 RHEL Program Management 2011-07-25 22:20:15 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 Mikuláš Patočka 2011-07-29 13:36:08 UTC
We need good performance when working with many (thousands) block devices.

These tests were done:

1. create 10000 block devices
time for i in `seq 0 9999`; do echo $i; dmsetup create test$i --notable; done
2. list the devices
time ls -la /sys/block
3. flush cache and list the devices
echo 3 >/proc/sys/vm/drop_caches; time ls -la /sys/block
4. remove the devices
time dmsetup remove_all

Time before the patches (on current RHEL-6 kernel):
141s, 2.1s, 2.4s, 63s
Time after the patches
25s, 0.5s, 0.8s, 8.8s

The effect of individual patches on upstream kernel 3.0-rc7 can be seen here:
http://www.redhat.com/archives/dm-devel/2011-July/msg00073.html

Comment 10 Kyle McMartin 2011-08-15 12:50:14 UTC
Patch(es) available on kernel-2.6.32-188.el6

Comment 15 Petr Beňas 2011-08-22 07:37:15 UTC
Reproduced in 2.6.32-187.el6.x86_64 and verified in 2.6.32-188.el6.x86_64.

Comment 16 errata-xmlrpc 2011-12-06 13:54:28 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2011-1530.html


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