Hm, does that change anything? The files need to be read at the end (so
they go into the cache) and are delete afterwards (cache gets freed I
guess?).
Here's a before/after memory usage for an updatedb run:
root@atjola:~# free -m
total used free shared buffers cached
Mem: 2011 1995 15 0 269 779
-/+ buffers/cache: 946 1064
Swap: 1945 0 1945
root@atjola:~# updatedb
root@atjola:~# free -m
total used free shared buffers cached
Mem: 2011 1914 96 0 209 746
-/+ buffers/cache: 958 1052
Swap: 1945 0 1944
81MB more unused RAM afterwards.
If anyone can make use of that, here's a snippet from /proc/$PID/smaps
of updatedb's sort process, when it was at about its peak memory usage
(according to the RSS column in top), which was about 50MB.
2b90ab3c1000-2b90ae4c3000 rw-p 2b90ab3c1000 00:00 0
Size: 50184 kB
Rss: 50184 kB
Shared_Clean: 0 kB
Shared_Dirty: 0 kB
Private_Clean: 0 kB
Private_Dirty: 50184 kB
Referenced: 50184 kB
sort (GNU coreutils) 5.97
GNU updatedb version 4.2.31
Just to clarify: I'm not complaining either way, neither about not
merging swap prefetch, nor about someone wanting that to be merge. It
was rather the "discussion" that caught my attention... Just in case ;-)
Björn
-