[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: bind runs apt-cache during shutdown????



On Sat, Oct 23, 2010 at 07:32:55PM -0600, Bob Proulx wrote:
> P.S. On my 2004 1.8GHz Pentium M laptop:
> 
>   $ time lsb_release -is
>   Debian
> 
>   real    0m0.135s
>   user    0m0.116s
>   sys     0m0.016s

[~]# time lsb_release -is
Debian

real	0m9.525s
user	0m6.216s
sys	0m0.652s
[~]# time lsb_release -is
Debian

real	0m0.260s
user	0m0.112s
sys	0m0.052s
[~]# echo 3 >/proc/sys/vm/drop_caches
[~]# time lsb_release -is
Debian

real	0m2.814s
user	0m0.132s
sys	0m0.140s
[~]# apt-get update
...
[~]# echo 3 >/proc/sys/vm/drop_caches
[~]# time lsb_release -is
Debian

real	0m13.134s
user	0m6.376s
sys	0m1.024s


It's both about filesystem cache and about apt's internal caches.  If you
run apt-cache as non-root, the latter won't get updated so the long delay
will happen every single time.

In other words, it's not something you want to call when not needed.

-- 
1KB		// Microsoft corollary to Hanlon's razor:
		//	Never attribute to stupidity what can be
		//	adequately explained by malice.


Reply to: