On Wednesday 17 November 2010, Mick wrote: > On Wednesday 17 November 2010 20:10:54 Yohan Pereira wrote: > > On Thursday 18 Nov 2010 1:17:09 am Alan McKinnon wrote: > > > Let's compare then. My system is 4 minutes to re-index everything from > > > scratch. How long does your take and how big is your filesystem? > > > > time updatedb > > real 1m35.163s > > user 0m0.815s > > sys 0m2.454s > > > > this was the first time i ran it after installation. i had uinstalled > > slocate prior to this. > > > > PRUNEPATHS="/tmp /var/tmp /root/.ccache /media/stuff/backup/gentoo32" > > > > the last folder is my 32bit chroot. > > and i got arround 225 gb of data. i tried running a few qurries .. seems > > to have indexed everything > > > > also after this i tried deleting /var/lib/mlocate/mlocate.db and then > > running updatedb and it hardly took a second. > > > > time updatedb > > > > real 0m0.367s > > user 0m0.193s > > sys 0m0.167s > > > > weird indeed. > > I can't be doing this right ... > > I removed /var/lib/mlocate/mlocate.db, the ran updatebd: > > # time -p updatedb > real 113.22 > user 0.62 > sys 8.00 > > Then removed it again and run it again: > > # time updatedb > > real 0m1.063s > user 0m0.162s > sys 0m0.896s > > Why is the second time so much faster? The size of the derived db was the > same on both occasions.
first run: updatedb -v 6,76s user 39,99s system 7% cpu 10:35,80 total yeah, see, the 'total' thing is the meaningfull one. But lets have a look what was indexed: df -h Dateisystem Size Used Avail Use% EingehÃĪngt auf rootfs 57G 34G 23G 60% / devtmpfs 3,9G 344K 3,9G 1% /dev rc-svcdir 1,0M 120K 904K 12% /lib64/rc/init.d shm 4,0G 232K 4,0G 1% /dev/shm tmpfs 8,0G 12K 8,0G 1% /var/tmp/portage tmpfs 1,0G 5,4M 1019M 1% /tmp /dev/md3 765G 606G 160G 80% /mnt/data /dev/md5 753G 558G 195G 75% /mnt/4chan beware: /mnt/4chan should be named '/mnt/first_line_of_defense' because it is the first backup stage. Named for historical reasons (aka I am too lazy to rename. To index an fs you don't have to go all over it. You just have the fs to dump all the file names on you. And that can be very fast.