Bug 189549

Summary: kernel-devel insanely slow to install when many kernel-devel packages installed
Product: [Fedora] Fedora Reporter: Derek Atkins <warlord>
Component: kernelAssignee: Dave Jones <davej>
Status: CLOSED CANTFIX QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 4CC: pfrields, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-05-29 04:05:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Derek Atkins 2006-04-20 22:12:33 UTC
Description of problem:

I've got a build machine on which I build kernel modules for all the released
kernels.  As a result I have every kernel-devel package installed for all i586,
i686, normal and smp kernels.  All in all I've got about 50 kernel-devel
packages installed.  The problem is that the post-install script takes
increasingly longer to finish on each package I install.

Today when I installed the three 1.2096 kernel-devel (and kernel-smp-devel)
packages, it took almost two hours for the post-install scripts to complete! 
Just the timestamps from the installation show that it took almost an hour to
finish the i586 kernel, and then 34 minutes for the i686 kernel (and
unfortunately there's not a good time measurement for the smp kernel):

[root@vmware-fedora4 SPECS]# cd /usr/src/kernels/
[root@vmware-fedora4 kernels]# ls -lt | head
total 460
drwxr-xr-x  18 root root 4096 Apr 20 14:35 2.6.16-1.2096_FC4-smp-i686
lrwxrwxrwx   1 root root   26 Apr 20 14:34 2.6.16-1.2096_FC4smp-i686 -> 2.6.16-1
.2096_FC4-smp-i686
drwxr-xr-x  18 root root 4096 Apr 20 14:00 2.6.16-1.2096_FC4-i686
drwxr-xr-x  18 root root 4096 Apr 20 12:58 2.6.16-1.2096_FC4-i586
drwxr-xr-x  18 root root 4096 Apr 15 14:08 2.6.16-1.2069_FC4-smp-i686
lrwxrwxrwx   1 root root   26 Apr 15 14:07 2.6.16-1.2069_FC4smp-i686 -> 2.6.16-1
.2069_FC4-smp-i686

The times keep getting longer and longer on every subsequent kernel.  Looking at
the process list, it's clearly the %post script which is running so long.  It's
quite possible that this is due to "hardlink", and I suspect that removing the
hardlink package would speed up installation significantly (by causing the %post
install scriptlet to exit immediately).

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

This has been true in all kernel-devel packages..  It just takes longer and
longer...

How reproducible:

100%.  Just go install a lot of kernel-devel packages:

  for i in kernel*devel*.rpm ; do
    date
    time rpm -ivh --force $i
  done

Each install will take longer and longer.

Steps to Reproduce:
1. See above.
2.
3.
  
Actual results:


Expected results:
It shouldn't take two or three hours to install three kernel-devel packages.

Additional info:

Comment 1 Dave Jones 2006-05-29 04:05:51 UTC
hardlink has to go check every one of those trees, so it's just got an insane
amount of work to do, which increases exponentially with each extra kernel tree
it has to check/link.

There's no real good answer to this problem other than.

a) don't have so many kernel-devel packages installed.
or
b) remove the hardlink package, and sacrifice extra diskspace usage for time.