Bug 470680

Summary: readahead slows down booting considerably
Product: [Fedora] Fedora Reporter: Torsten Rausche <trausche>
Component: readaheadAssignee: Harald Hoyer <harald>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 10CC: harald, selinux, torsten, walovaton
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: 1.5.0-1.fc10 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-03 00:29:32 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:
Attachments:
Description Flags
bootchart for booting without readahead
none
bootchart for booting with readahead
none
/etc/readahead.d/custom.early
none
/etc/readahead.d/early.sorted none

Description Torsten Rausche 2008-11-08 20:19:04 UTC
Description of problem:
Booting with readahead is slower by 68 % on my fairly standard system with Nvidia nForce4 chipset, Seagate 7.200 rpm PATA harddisk and 2.0 GHz AMD Athlon64 X2 CPU.

Version-Release number of selected component (if applicable):
readahead-1.4.7-1.fc10.x86_64

How reproducible:
Every time

Steps to Reproduce:
Simply boot with and without readahead installed and notice the difference.
  
Actual results:
Booting is slower by 68 % with readahead.

Expected results:
A speedup with readahead or at least no huge slowdown

Additional info:
See the generated bootcharts and files from /etc/readahead.d/

Comment 1 Torsten Rausche 2008-11-08 20:21:50 UTC
Created attachment 322966 [details]
bootchart for booting without readahead

Comment 2 Torsten Rausche 2008-11-08 20:22:30 UTC
Created attachment 322967 [details]
bootchart for booting with readahead

Comment 3 Torsten Rausche 2008-11-08 20:24:29 UTC
Created attachment 322969 [details]
/etc/readahead.d/custom.early

Comment 4 Torsten Rausche 2008-11-08 20:25:26 UTC
Created attachment 322970 [details]
/etc/readahead.d/early.sorted

Comment 5 Harald Hoyer 2008-11-10 12:06:38 UTC
hmm, /etc/readahead.d/custom.early contains /var/lib/rpm/*

could you regenerate the readahead files?

# touch /.readahead-profile
then reboot, wait until the login screen, wait additional 20 seconds
reboot again and measure now

Comment 6 Torsten Rausche 2008-11-10 12:24:03 UTC
(In reply to comment #5)
> # touch /.readahead-profile
> then reboot, wait until the login screen, wait additional 20 seconds
> reboot again and measure now

That is how I tried it multiple times -- with waiting at the login screen to prevent collecting of all the gnome stuff. The result was always the same.

> hmm, /etc/readahead.d/custom.early contains /var/lib/rpm/*

Good catch, and I have got an idea. I have installed akmods from rpmfusion which look for missing kernel-module packages in the boot process. They did not look too suspect in the bootcharts. So I did not bother. I will try without them...

Comment 7 Torsten Rausche 2008-11-10 15:17:41 UTC
Tried again without any 3rd party packages and even switched off smartd. The results were not much different. Then I took another look at /etc/readahead.d/custom.early and found /var/lib/libvirt/images/*

# du -sh /var/lib/rpm/
92M	/var/lib/rpm/

# du -sh /var/lib/libvirt/images/
12G	/var/lib/libvirt/images/

That is where the disk images for libvirt/virt-manager are stored by default. After 'chkconfig libvirtd off' and another run of the readahead collector booting with readahead was only 10 percent slower than booting without readahead.

I can attach the readahead lists and bootcharts for this two new test runs (1. without 3rd party and 2. additionally without libvirtd) if you want.

Somehow readahead seems to think those processes read all that data when they actually don't. With readahead there is also strong disk activity for some time after the login screen appears. I guess it caches my disk images until there is no free RAM left :)

So do some processes access data in a wrong way while booting or does readahead something wrong while analyzing those accesses? My filesystem is mounted with 'relatime'. Does this matter?

Comment 8 Torsten Rausche 2008-11-10 16:03:29 UTC
BTW, what is the difference between /.readahead_collect and /.readahead-profile? I used the former one all the time as it is what the monthly cron job does too.

Comment 9 Bug Zapper 2008-11-26 05:03:52 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 10 Harald Hoyer 2009-08-13 11:48:02 UTC
*** Bug 496912 has been marked as a duplicate of this bug. ***

Comment 11 Harald Hoyer 2009-08-13 11:48:18 UTC
*** Bug 517214 has been marked as a duplicate of this bug. ***

Comment 12 Fedora Update System 2009-08-13 11:50:55 UTC
readahead-1.5.0-1.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/readahead-1.5.0-1.fc11

Comment 13 Fedora Update System 2009-08-13 11:51:00 UTC
readahead-1.5.0-1.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/readahead-1.5.0-1.fc10

Comment 14 Fedora Update System 2009-08-15 08:12:09 UTC
readahead-1.5.0-1.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update readahead'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-8547

Comment 15 Fedora Update System 2009-08-15 08:16:51 UTC
readahead-1.5.0-1.fc10 has been pushed to the Fedora 10 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update readahead'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-8578

Comment 16 Fedora Update System 2009-09-03 00:29:27 UTC
readahead-1.5.0-1.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 17 Fedora Update System 2009-09-16 20:36:22 UTC
readahead-1.5.0-1.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.