RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 952422 - sysconf(_SC_NPROCESSORS_ONLN) performance problem
Summary: sysconf(_SC_NPROCESSORS_ONLN) performance problem
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: glibc
Version: 6.5
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Siddhesh Poyarekar
QA Contact: Arjun Shankar
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-04-15 23:19 UTC by Jacob Hunt
Modified: 2018-12-03 18:41 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
This update improves performance of repeated calls of the sysconf function for getting values of _SC_NPROCESSORS_ONLN by caching the value for approximately a second. This could improve performance of some applications that use QReadWriteLocks in the Qt library or any other functionality that involves repeatedly getting the value for _SC_NPROCESSORS_ONLN.
Clone Of:
Environment:
Last Closed: 2013-11-21 10:45:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Candidate fix (3.04 KB, patch)
2013-05-29 06:01 UTC, Siddhesh Poyarekar
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:1605 0 normal SHIPPED_LIVE Moderate: glibc security, bug fix, and enhancement update 2013-11-20 21:54:09 UTC

Description Jacob Hunt 2013-04-15 23:19:45 UTC
Description of problem:

We have an application that has a lot of threads and uses QReadWriteLocks to protect data that the threads are accessing. When our server is heavily loaded, the application spends about 60% of it's time in system time as opposed to user time. Further investigation showed that the QMutex class is calling sysconf(_SC_NPROCESSORS_ONLN) for each thread that tries to get a lock where that lock is already locked. Thus most of that system time is spent in this system call.

Version-Release number of selected component (if applicable):
glibc-2.12-1.107.el6.x86_64


Additional info:
This has been discussed upstream: 
http://sourceware.org/ml/libc-alpha/2011-06/msg00064.html

Comment 11 Siddhesh Poyarekar 2013-05-29 06:01:42 UTC
Created attachment 754181 [details]
Candidate fix

Comment 14 errata-xmlrpc 2013-11-21 10:45:08 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-2013-1605.html


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