From: Gordan B. <go...@bo...> - 2009-03-30 12:13:59
|
On Mon, 30 Mar 2009 08:48:54 +0100, Marc Grimme <gr...@at...> wrote: >> > * Implemented filters to globally remove files from initrd (Gordan's >> > idea) >> >> Is this due to (or coupled with) the approach of dumping all of the >> required files from the rpm database in one pass, rather than querying >> each packake in a separate rpm call? > It were my action points taken from the discussion. One was the single pass > rpm and the other was having global filters. > I tried to implement it with single pass rpm but didn't succeed with > gaining > any performance from it. So I revoked the changed for the single pass rpm > (they were too ugly) and stayed with the "additional" global filters. So we > now have rpm filters that are given per rpm and filters applied globally > (like *.pyc). Can you send me the single-pass implementation you tried? In my preliminary tests the single pass was MASSIVELY faster. Here are my figures: # rpm -qa > packages.list Current equivalent: # time for package in `cat packages.list`; do rpm -q --list $package >> files.list; done real 1m4.470s user 0m13.644s sys 0m4.498s Single pass: # time rpm -q --list `cat packages.list` > files.list real 0m2.501s user 0m1.853s sys 0m0.582s Theoretical best case: # time rpm -qa --list > files.list real 0m2.220s user 0m1.588s sys 0m0.568s The above list included about 700 packages. While this is way more than the initrd will ever contain, it does illustrate that there are potential savings to be made here. Whatever other bottlenecks may affect this, at least rpm time will still get cut by about 25-fold according to these figures. Gordan |