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 1413834 - __dbi_htconfig macro is not available in RHEL7
Summary: __dbi_htconfig macro is not available in RHEL7
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: anaconda
Version: 7.3
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Anaconda Maintenance Team
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On:
Blocks: 1420851
TreeView+ depends on / blocked
 
Reported: 2017-01-17 05:39 UTC by Masahiro Matsuya
Modified: 2020-06-11 13:12 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-06-19 17:03:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
proposed patch (revised) (805 bytes, patch)
2017-01-19 02:06 UTC, Masahiro Matsuya
no flags Details | Diff

Description Masahiro Matsuya 2017-01-17 05:39:06 UTC
Description of problem:
__dbi_htconfig macro is specified in arguments of anaconda-yum command.

13:20:52,910 INFO program: Running... /usr/libexec/anaconda/anaconda-yum --config /tmp/anaconda-yum.conf --tsfile /mnt/sysimage/anaconda-yum.yumtx --rpmlog /tmp/rpm-script.log --installroot /mnt/sysimage --release 7.3 --arch x86_64 --macro __dbi_htconfig hash nofsync %{__dbi_other} %{__dbi_perms} --macro __file_context_path /etc/selinux/targeted/contexts/files/file_contexts

But, it doesn't have any effect in RHEL7, since it's not used anywhere.
After searching it in internet, some environment has /usr/lib/rpm/macros with the __dbi_htconfig macro. But, RHEL7 doesn't have it.

_dbi_config should be used directly.

  NOTE: it's not __dbi_config. the heading underscore (_) is just one.
        __dbi_htconfig has the two underscore, though.

I have a customer with a performance issue of installation with md raid.
It took 1 hour and 10 minutes to complete the installation.
It finished in 20 minutes without md raid.

I figured out that it took much time for anaconda-yum. and I found fdatasync() system call was the most time consuming system call in it. Also, it seems that 
fdatasync() was called for rpmdb in collected strace data. But, when 'nofsync' is configured with rpmdb configuration in rpm macros, it should not happen.

In /usr/lib/macros:
#==============================================================================
# ---- Database configuration macros.
#       Macros used to configure Berkley db parameters.
...
#   nofsync             Disable fsync(2) call performed after db3 writes?
#

# Misc BDB tuning options

%__dbi_other                    mp_mmapsize=128Mb mp_size=1Mb

%_dbi_config                    %{?__dbi_other}


nofsync is not used by default. 


Version-Release number of selected component (if applicable):
Red Hat Enterprise Linux 7

How reproducible:
Always

Steps to Reproduce:
1. install rhel7.3
2. check if many fdatasync() is called with strace on background shell while anaconda-yum is running for package installation.


Actual results:
fdatasync() is called many times.

Expected results:
fdatasync() is called a few. In my case, it's just once after changing into __dbi_htconfig into _dbi_config.

Comment 1 Masahiro Matsuya 2017-01-17 05:44:44 UTC
Created attachment 1241542 [details]
proposed patch

removed %{__dbi_perms} as well, because it's not defined in any rpm macros of RHEL7.

Comment 2 Masahiro Matsuya 2017-01-19 02:06:34 UTC
Created attachment 1242321 [details]
proposed patch (revised)

hash db option is not available as well.
I saw the following error in packaging.log during installation.

  08:12:50,746 DEBUG packaging: error: unrecognized db option: "hash" ignored.


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