[DONE] Question about urpmi startup times

This forum is dedicated to testing early releases and cauldron : Howtos, tips, tricks and user global feedback and thoughts...

Helpful tip :
For bugs tracking we use : https://bugs.mageia.org = The Mageia Bug Tracker
In this bug tracker you'll find already reported bugs and you'll be able to report those you have found....

[DONE] Question about urpmi startup times

Postby ITA84 » May 15th, '18, 20:39

I've been meaning to ask about this for a while: when using any urpmi command (or drakrpm) for the first time after a reboot, I always experience a long startup time (about 2 or 3 minutes) with intense HDD usage, whereas any subsequent urpmi command before the next reboot is fast (a few seconds even for an auto-select). Is this normal? I've always assumed it is, but had some doubts.
I've tried running a command with some rebug flags (urpmi --verbose --debug --debug-librpm --auto-update), and the part of the output where it's taking the longest is
Code: Select all
getting exclusive lock on rpm
opening rpmdb (root=, write=)
D: opening  db environment /var/lib/rpm cdb:0x401
D: opening  db index       /var/lib/rpm/Packages 0x400 mode=0x0
D: locked   db index       /var/lib/rpm/Packages
D:  read h#   51690 Header sanity check: OK
...
D: closed   db index       /var/lib/rpm/Packages
D: closed   db environment /var/lib/rpm
scheduled sets of transactions:
I pacchetti sono aggiornati
unlocking urpmi database
unlocking rpm database
EXITING (pid=2052)

where '...' is the read h# line repeated hundreds of times with different numbers.
Thanks in advance
Last edited by ITA84 on May 17th, '18, 07:41, edited 1 time in total.
ITA84
 
Posts: 199
Joined: Mar 5th, '13, 18:15

Re: Question about urpmi startup times

Postby doktor5000 » May 16th, '18, 18:32

Well, it needs to reads the database of installed packages (/var/lib/rpm/Packages) so depending on the number of installed packages that may take a while.

But 2 or 3 minutes does not sound like a reasonable time, and I've also never noticed it taking longer on the first run, but that might be natural behaviour as it needs to read the file, afterwards that data will be cached so it won't take that long.
Although if those 2 or 3 minutes also include the time waiting to update your repos against the mirror servers, or for drakrpm the time it takes to sort the packages into categories (you can rule out that part by only using urpmi) then that might be normal depending on what mirrors you use, how many repos, your internet connection, latencies and mirror load at that time.

Although you could still try to run rpm --rebuilddb and measure again against a "clean" rpm db.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17630
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Question about urpmi startup times

Postby ITA84 » May 16th, '18, 21:41

I've checked again: an 'urpmi --auto-select' takes about 1 minute and a half (when there's just one new package) the first time. Then I've run rpm --rebuilddb as you suggested (ran it twice in a row, because the first time it said 'errore: could not delete old database at /var/lib/rpmold.3461', but there was no such file or directory there) and rebooted: this time the same command took 15 seconds!
I wonder if there was something wrong with my DB, although I'm pretty sure I'd tried try rebuilddb in the past and nothing changed. I'll keep watching my update times.
Thanks for your help!
ITA84
 
Posts: 199
Joined: Mar 5th, '13, 18:15

Re: Question about urpmi startup times

Postby doktor5000 » May 16th, '18, 23:28

Please mark the thread accordingly by editing the topic of the first post and prefix it by [DONE], thanks
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17630
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany


Return to Testing : Alpha, Beta, RC and Cauldron

Who is online

Users browsing this forum: No registered users and 1 guest

cron