On 2014-10-31 14:26, wolfi323 wrote:
> I measured it now, and it seems I was wrong. (I didn’t remember it
> taking that long :P)
LOL.
> The original:
> real 2m41.646s
> The modified version:
> real 1m2.438s
Takes half the time.
> (both times run after a reboot, logging into KDE and waiting until
> everything has settled down)
There is an echo something to somewhere in proc that erases the cache,
you do not need to reboot. I don’t remember it offhand, but it was
posted in that mail list thread.
>
> So the modified version is actually more than twice at fast, but it’s
> still not something I would like to run on every boot.
Understandable. It speeds of to 4 or 6 seconds here, total time. Maybe
you don’t have that much RAM?
> Personally for me I don’t see a point anyway. I just run it manually
> from time to time, especially after upgrades (for standard updates it
> shouldn’t really be critical anyway, depending on your repos of course).
I have it email me the changes, as a nagging reminder 
>>> Might depend on the filesystem in use though (reiserfs here) and the
>>> hardware.
>>
>> Ah, reiserfs? Dunno, perhaps it does.
>>
>> Ah, I forgot: if you test the modification after having run the
>> unmodified script, there is no difference because it is already cached.
>> You have to empty the cache first.
>>
> If you run it a second time, the script actually does nothing (it only
> shows the contents of /var/adm/rpmconfigcheck). It checks whether the
> RPM database has changed since the last run (the second “if” in the
> script snippet you posted).
Ah, true. In my tests I also erased the var file above 
> And the speed-up also depends on how big your RPM database is and how
> fragmented the files are, I’d say.
A bit. On small and not fragmented databases it runs faster without
doing anything.
File fragmentation doesn’t affect much, though. The issue is that the
database read is not linear, as it traverses field by field of the
database. It is the database engine that is not optimized for “heavy”
usage. It was designed when memory was scarce, I’d guess, so they did
not consider to cache it in ram first.
Traversing the systemd log in disk has the same issue. Or very similar.
–
Cheers / Saludos,
Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)