Carlos E. R. wrote:
-----BEGIN PGP SIGNED MESSAGE-----
On Tuesday, 2013-06-18 at 16:17 -0700, Linda Walsh wrote:
Carlos E. R. wrote:
> Telcontar:~ # locate testing_manpage.log
> Telcontar:~ #
> cer@Telcontar:~> locate testing_manpage.log
can not locate a file that belongs to another user, but root
Are you using mlocate?
Yes, of course. mlocate-0.26-14.1.x86_64
So is it that you cannot read
testing_manpage.log, or is it that you
can't read the directory where it is at?
I can not browse the directory.
cer@Telcontar:~> l /home/cer2/Documents/testing_manpage.log
ls: cannot access /home/cer2/Documents/testing_manpage.log: Permission
Telcontar:/home/cer # l /home/cer2/Documents/testing_manpage.log
- -rw-r--r-- 1 cer2 users 14410 Feb 9 2008
I.e. could you do an 'ls' or a
'find' and find that file? (but not
be able to read it), or is it not findable?
Nope, I can not use a find. mlocate is behaving like find would behave.
How's the speed compared to locate (not
that locate is fast, mind
you, but slower would be bad). I'd thought about multithreading locate
bring up the speed a bit.
Locate is instant. I can not compare both mlocate and locate because
both have the same binary name, can not install both simultanously.
Multithreading is useless if you have to seek a 30MB data file for a
name. And the seek is not cached:
You see a 30MB file, I see
30 units of a 1MB stripe size. Spindle-numbers are to disks
as cores are to cpu's.
If you have a 1MB stripe size, 5 spindles, now you can divide that
up into 5 threads of 6MB searching each. You won't get a 5x speed up,
but you'll likely get at least 2-3x. Besides, I doubt disk I/O is the limiting
factor. Looking at your timings -- it's all spent in user space and is fairly
constant for 3 runs -- indicating your datafile is likely already cached But
at .7s, it's likely not worth it. Vs.:
time locate testing_manpage.log
11.00usr 0.06sys (99.72% cpu)
11.00sec 10.97usr 0.03sys (100.00% cpu)
locate /|wc -l
How many files are in your locate DB?
That might give a better indication of speed...
If you have 5-10M files, and are taking .7s to search through
them all... that's pretty impressive, vs.
vs. 500-800K files? Might be similar perf...?
To unsubscribe, e-mail: opensuse-factory+unsubscribe(a)opensuse.org
To contact the owner, e-mail: opensuse-factory+owner(a)opensuse.org