Package: locate
Version: 4.4.2-1+b1
Severity: normal
Tags: upstream patch

Hi,

I am running locate/updatedb on my fileserver which contains a large amount
of files (several milion). When running updatedb in such an enviroment, its
subprocess sort will create a large amount (1.5GB in my case) of temporary
data in /var/tmp. If /var/tmp is on a rather small partition, this will
cause the partition to be completely filled up.

The solution is to tell sort to use gzip on its temporary data, which results
in a decrease of temp data size by a factor of 10. The performance impact
on updatedb is negligible (less than 1%).

                        Attila Kinali

-- System Information:
Debian Release: 6.0.3
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.39.2 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash

Versions of packages locate depends on:
ii  findutils                     4.4.2-1+b1 utilities for finding files--find,
ii  libc6                         2.11.2-10  Embedded GNU C Library: Shared lib

locate recommends no packages.

locate suggests no packages.

-- no debconf information
--- updatedb.findutils.orig     2010-10-26 19:53:42.000000000 +0200
+++ updatedb.findutils  2012-01-06 11:40:19.000000000 +0100
@@ -275,7 +275,7 @@
     exit $?
   fi
 fi
-} | $sort -f | $frcode $frcode_options > $LOCATE_DB.n
+} | $sort --compress-program=gzip -f | $frcode $frcode_options > $LOCATE_DB.n
 then
     : OK so far
     true
@@ -344,7 +344,7 @@
     exit $?
   fi
 fi
-} | tr / '\001' | $sort -f | tr '\001' / > $filelist
+} | tr / '\001' | $sort --compress-program=gzip -f | tr '\001' / > $filelist
 
 # Compute the (at most 128) most common bigrams in the file list.
 $bigram $bigram_opts < $filelist | sort | uniq -c | sort -nr |

Reply via email to