On Fri, Jun 01, 2012 at 02:49:04PM +1200, Olly Betts wrote: > For the script as shipped, the memory usage peaked at 228M and it took > about 35 seconds. > > Patched, the memory usage peaked at 152M and it took 1m15 (just over > twice as long). > > If I patch it to set the threshold to 100, then it's 145M and takes > much longer (8m22, but I didn't have the patience to retry it). So > it doesn't seem useful to go much lower than 1000, as you save little > memory, but take much longer.
The patch below has 100, not 1000. Can you please confirm which is the
appropriate tradeoff value?
> I think it would be good to do something about this for wheezy. My
> suggestion would be to apply the patch, but probably tweaked to not reduce
> the threshold if the system has "lots" of memory. And if there's less
> than a certain amount (256MB perhaps) then disable apt-xapian-index.
Ok. What I noticed lots of people are scared of is a-x-i running for a
long time ("it's using 100% of my CPU!!1!"), which hints at reducing the
threshold only when really needed, that is, I'd guess, when a-x-i would
hit swap badly. Say, with machines below 2G of RAM? 1G? It really
depends on what else is being done on the machine. Should we assume it
has firefox open as a reasonable use case?
Disabling is a good idea, but I'd only disable the automatic runs by
default: if someone invokes u-a-x-i by hand, it should run. OTOH someone
may want to still have the automatic runs, so it might be more of a
debconf question whose default value changes according to the amount of
RAM.
There could even be the argument that people setting up small systems
already have some tweak to do (like disabling automatic recommends) and
we might be even better served by having a wiki page about debian on
small systems and adding information about NOT installing
apt-xapian-index there, at all. After all, it's only Recommended in
Debian.
> I'm happy to experiment with tuning the threshold more if you want to go
> this route. 1000 seems in the right area, but I didn't try anything
> closer than 100 or 10000 (the default).
>
> Thoughts?
What's a good way to check for available memory in shell?
free -k | awk '/^Mem/{ print $2 }' ?
The best plan to me would sound like:
1. add a config file for a-x-i;
2. have the cron job check the config file as well;
3. use debconf to allow people to configure u-a-x-i for low-memory
systems;
4. have debconf check the amount of ram and set the default
accordingly.
It's not a 10 minutes coding effort, though.
Ciao,
Enrico
--
GPG key: 4096R/E7AD5568 2009-05-08 Enrico Zini <[email protected]>
signature.asc
Description: Digital signature

