Re: [PATCH] Make use of stat.ctime configurable

3 messages, 3 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] Make use of stat.ctime configurable

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:45:04

Linus Torvalds [off-list ref] writes:
On Mon, 28 Jul 2008, David Brown wrote:
quoted
On Mon, Jul 28, 2008 at 08:31:28AM +0200, Alex Riesen wrote:
quoted
because there are situations where it produces too much false
positives. Like when file system crawlers keep changing it when
scanning and using the ctime for marking scanned files.
That's interesting, since most backup software uses the ctime to determine
file changes.
It really is just Beagle that is (was? I can dream) a piece of 
unbelievable crap.

Anybody who uses extended attributes as part of a indexing scheme is just 
insane. Modifying the file you are indexing is not just fundamentally 
wrong to begin with, but it will then also be incredibly inefficient to 
read those entries one at a time.
It's a typo and you are saying it _is_ fundamentally wrong, aren't you?

If you are prepared to pick up new files, you need to crawl everywhere
anyway, so if the xattr is used to leave a mark "The last time I looked at
this file was this" in the file itself, it does not sound too bad to me.
It would be irritating that it touches ctime, though, but I do not use it
so it is not my problem ;-)

http://beagle-project.org/FAQ "Do I really need extended attributes?"
talks about BEAGLE_DISABLE_XATTR environment variable and interestingly
it says disabling use of xattr would slow you down.

Re: [PATCH] Make use of stat.ctime configurable

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2016-06-15 22:45:04


On Mon, 28 Jul 2008, Junio C Hamano wrote:
quoted
Anybody who uses extended attributes as part of a indexing scheme is just 
insane. Modifying the file you are indexing is not just fundamentally 
wrong to begin with, but it will then also be incredibly inefficient to 
read those entries one at a time.
It's a typo and you are saying it _is_ fundamentally wrong, aren't you?
Not a typo, and I'm sayin that "it's not _just_ fundamentally wrong"

So yes, it's fundamentally wrong, but it's worse than that. It's 
fundamentally wrong _and_ it's inefficient as hell.
If you are prepared to pick up new files, you need to crawl everywhere
anyway, so if the xattr is used to leave a mark "The last time I looked at
this file was this" in the file itself, it does not sound too bad to me.
It's absolutely horrible. 

It means that you have another extra indirection and accompanying disk 
seek to check the thing. It's a total performance nightmare. Trust me, 
anybody who uses extended attributes like this simply does not know what 
he is doing.
It would be irritating that it touches ctime, though, but I do not use it
http://beagle-project.org/FAQ "Do I really need extended attributes?"
talks about BEAGLE_DISABLE_XATTR environment variable and interestingly
it says disabling use of xattr would slow you down.
They don't have a clue. They say that, but it's simply not true. 

Of course, the fact that they think it is probably implies that they did 
something EVEN MORE STUPID for the non-xattr case. That wouldn't surprise 
me at all. If I had to guess, I'd guess that they used an SQL database and 
query language, and did all their tests with hot caches too.

The kernel does caching really well, and the kernel is fast as hell, so 
_of_course_ when you benchmark, using kernel data structures looks good, 
especially if you benchmark against code that isn't well written for the 
particular usage case.

			Linus

Re: [PATCH] Make use of stat.ctime configurable

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:45:04

Hi,

On Mon, 28 Jul 2008, Linus Torvalds wrote:
On Mon, 28 Jul 2008, Junio C Hamano wrote:
quoted
quoted
Anybody who uses extended attributes as part of a indexing scheme is 
just insane. Modifying the file you are indexing is not just 
fundamentally wrong to begin with, but it will then also be 
incredibly inefficient to read those entries one at a time.
It's a typo and you are saying it _is_ fundamentally wrong, aren't 
you?
Not a typo, and I'm sayin that "it's not _just_ fundamentally wrong"

So yes, it's fundamentally wrong, but it's worse than that. It's 
fundamentally wrong _and_ it's inefficient as hell.
I haven't looked at Beagle's source code either, but as a _user_ I can say 
that it really became horribly, horribly slow after half a year of normal 
usage.

And yes, uninstalling Beagle, backing up the files, reformatting and 
putting the files back (to really get rid of the extended attributes 
already in the file system) helped.

So the first thing I did, back when I still used openSUSE, was to 
uninstall Beagle after the system install.

Ciao,
Dscho
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help