after deleting pack file, first boot is fast, subsequent boots are slow

Bug #491956 reported by dav2dev
34
This bug affects 6 people
Affects Status Importance Assigned to Milestone
ureadahead
Invalid
Medium
Unassigned
ureadahead (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

When I delete /var/lib/ureadahead/pack, on next boot linux takes only 13 seconds to complete. Subsequent boots take about 22 seconds, instead.
I currently have Ubuntu 9.10 with 2.6.32-6 kernel from lucid and the ubuntu-boot ppa active. Don't know if karmic kernel behaves differently, if you think that I should give it a try, just let me know.

Here is an excerpt from dmesg on first run without pack file:
[ 3.214676] type=1505 audit(1259853422.818:10): operation="profile_load" pid=406 name=/usr/sbin/cupsd
[ 5.639021] udev: starting version 147
This is from the second run (pack file is in place):
[ 3.151588] type=1505 audit(1259853807.754:10): operation="profile_load" pid=395 name=/usr/sbin/cupsd
[ 20.283146] udev: starting version 147

In the boot line I have:
radeon.modeset=1 (on a ATI X600 graphics board).
irqpoll option, because otherwise I get a kernel error about irq18 just above that udev line, with a message advising the irqpoll option. Without this option the timings are roughly the same, though.

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Please install the bootchart package and supply charts from the "first" and "second" boot. Also attach the output of "ureadahead --dump"

Changed in ureadahead:
status: New → Incomplete
importance: Undecided → Medium
Revision history for this message
dav2dev (dav2dev) wrote :

(I probably should have mentioned that my home is encrypted, and so is the swap partition, from the ubuntu installer option...)

kernel package is now 2.6.32-6-generic also from lucid, and the difference is not as much as with 2.6.32-5-generic package.

Revision history for this message
dav2dev (dav2dev) wrote :
Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

How quickly did you login after the first run?

Revision history for this message
dav2dev (dav2dev) wrote :

Sorry, can't remember...but if I set autologin, the session doesn't start properly, saying something about permissions and nautilus, then the default background appears with no panel and no context menu on mouse right click, and I have to switch to a VT and restart gdm. I should perhaps open a new bug?
Anyway this afternoon I have time to do some trials with linux .31-15, .31-16 (karmic-updates), .32-7 (lucid).

Revision history for this message
dav2dev (dav2dev) wrote :

here are the timings for 31-15, 31-16 and 32-7. I tried to login as fast as i can, about a second from the login screen pop up, apart from some mistake :D

P.s.sorry for my bad english, in Italy the only way to learn english is to learn it on your own...

Revision history for this message
Max Meyer (maxmeyer) wrote :

Hi,

thanks for the good work on ubuntu especially on upstart. I really like that "framework". :)

I'v seen a similar behaviour on my box:

$ lsb_release -rd
Description: Ubuntu 9.10
Release: 9.10

$ apt-cache policy ureadahead
ureadahead:
  Installiert: 0.90.3-2
  Kandidat: 0.90.3-2
  Versions-Tabelle:
 *** 0.90.3-2 0
        500 http://de.archive.ubuntu.com karmic-updates/main Packages
        100 /var/lib/dpkg/status

After doing some further investigations I found that that there's a huge file "in" the pack:

$ sudo ureadahead --dump pack --sort=size |less
pack: created Di, 26 Jan 2010 15:09:15 +0000 for hdd 8:3
55 inode groups, 3045 files, 5932 blocks (18014398480327632 kB)
/path/to/file.luks (12288000 kB), 22 blocks (18014398480122728 kB)
  [@@##########@##@##########################################################]
  [######################....................................................]
  [..........................................................................]
  [...................................@######################################]
  [######################################################....................]
  [..........................................................................]
  [..........................................................................]

...

I'm not quite sure, if this file causes the long boot time. Maybe someone can explain the meaning of the sizes?

The file I mentioned above is a dm-crypt-luks container loaded by pam_mount on login with a size of 12 GB.

cat .config/pam_mount/pam_mount.conf.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE pam_mount SYSTEM "pam_mount.conf.xml.dtd">
<pam_mount>
  <!-- Volume definitions -->
    <volume user="xy" options="nodev,nosuid" path="/path/to/file/file.luks" mountpoint="~/mnt/data" cipher="aes-cbc-essiv:sha256" />
...
</pam_mount>

As a workaround I disabled ureadahead by moving the /etc/init/ureadahead*-Files to /var/tmp/. It works fine for me because ubuntu is running like a bat out of hell on my laptop :).

As a suggestions it would be nice to implement three things:
- a possibility to exclude files from preloading by path(, filename, regex, file size, ...)
- a possibility to deactivate ureadahead with a configuration option in /etc/defaults
- a documentation for the dump pack-file format

Have a nice day,

best regards,
Dennis

Revision history for this message
Max Meyer (maxmeyer) wrote :
Revision history for this message
Max Meyer (maxmeyer) wrote :
Revision history for this message
Lars Ola Liavåg (l-liavag) wrote :

This sounds so much like my system. I'm running a 32-bit Karmic on a Pentium D-based desktop but have the same on an older P4 system. The longer boot times have been there since sreadahead was replaced by ureadahead shortly after karmic was released. Removing the pack file to force a reprofile has repeatedly proved that without ureadahead, the boot is 5-10 seconds faster. Ironic, somehow since ureadahead was supposed to make boot faster. I'll be subscribing to this bug as of now.

Revision history for this message
Max Meyer (maxmeyer) wrote :

Hello Mr. Remnant,

do you need any further information to confirm that "bug" or change it into an feature request?

Best regards,

Dennis Günnewig

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote : Re: [Bug 491956] Re: after deleting pack file, first boot is fast, subsequent boots are slow

On Wed, 2010-01-27 at 11:02 +0000, dguennewig wrote:

> After doing some further investigations I found that that there's a huge
> file "in" the pack:
>
> $ sudo ureadahead --dump pack --sort=size |less
> pack: created Di, 26 Jan 2010 15:09:15 +0000 for hdd 8:3
> 55 inode groups, 3045 files, 5932 blocks (18014398480327632 kB)
> /path/to/file.luks (12288000 kB), 22 blocks (18014398480122728 kB)
> [@@##########@##@##########################################################]
> [######################....................................................]
> [..........................................................................]
> [...................................@######################################]
> [######################################################....................]
> [..........................................................................]
> [..........................................................................]
>
This would certainly cause a problem, and sounds similar to 518204 -
though is about luks files instead.

Since you're not the original reporter, I don't want to "steal" this bug
for that. But we can use 518204 to include luks too.

Scott
--
Scott James Remnant
<email address hidden>

Changed in ureadahead (Ubuntu):
status: New → Incomplete
importance: Undecided → Medium
Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

dav2dev: please attach the output of "ureadahead --dump" to this bug

Revision history for this message
Max Meyer (maxmeyer) wrote :

Sounds good, should I add the information I added here to bug 518204?

Dennis

Revision history for this message
dav2dev (dav2dev) wrote :

Sorry Scott, i don't have that laptop anymore...maybe i can ask the owner to give it to me so i can do some testing, but i don't know when....

Revision history for this message
Perran Trevan (perrantrevan) wrote :

I have a similar problem since upgrading various packages today (inc. plymouth and mountall), so maybe ureadahead is not to blame?

Boot times: -
Without ureadahead = 30.69 s
With ureadahead profiling = 32.36 s
With ureadahead = 32.70

To be fair, ureadahead seems to make my desktop (KDE 4.4.2) load much faster but thats not shown in bootchart.

In the attached bootcharts, ureadahead is doing stuff for 20 seconds before mountall starts.

The better bootcharts I have had were under 20 s in total, with ureadahead doing stuff for just 12 s.

Revision history for this message
Perran Trevan (perrantrevan) wrote :

Next bootchart

Revision history for this message
Perran Trevan (perrantrevan) wrote :

Last one

Revision history for this message
Perran Trevan (perrantrevan) wrote :

And ureadahead dump (I'm not sure I've got all of it however)

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Moved to Ubuntu bug tracker

Changed in ureadahead:
status: Incomplete → Invalid
Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

dguennewig, I can confirm that your problem is covered by bug #518204 - we shouldn't include large files like LUKS

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Perran: your ureadahead dump is very truncated - could you try this:

  sudo ureadahead --dump > dump.txt

that should give a full dump - if you could file a new bug using "ubuntu-bug ureadahead" I'd appreciate that - since that will give me the key details of your system

Thanks

Changed in ureadahead (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Marking as Invalid since the original reporter no longer has the hardware.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.