Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Mar 2001 23:42:36 +0000 (GMT)
From:      Terry Lambert <tlambert@primenet.com>
To:        roam@orbitel.bg (Peter Pentchev)
Cc:        tlambert@primenet.com (Terry Lambert), freebsd-arch@FreeBSD.ORG
Subject:   Re: [PATCH] add a SITE MD5 command to ftpd
Message-ID:  <200103142342.QAA09233@usr08.primenet.com>
In-Reply-To: <20010314084651.A23104@ringworld.oblivion.bg> from "Peter Pentchev" at Mar 14, 2001 08:46:51 AM

next in thread | previous in thread | raw e-mail | index | archive | help
[ ... avoid downloading wrong file when name has not changed ... ]

I think it would be better to put metadata in the archive, at
the front, and just downloa tthat, and abort the transfer if
it's the wrong one.

I now understand that this is intended to handle that very
special case, and only that case, even though people will
probably depend on it for "security" anyway, if it's there.


> However, if this were to be implemented, on however few of the sites,
> then it *could* provide a great opportunity even for the maintainers
> themselves - it is very easy to imagine a remote FTP MD5 checksum
> tool, that is run by each port maintainer on a regular basis for each
> of his ports, so things do not get to the point that annoyed users
> blame the maintainers, the Ports Collection and the FreeBSD project
> for the deeds of dumb authors.

I'm of the opinion that if you were a site, and you supported
a large number of connections, it would not be in your best
interests to implement this feature: it has dubious value at
best, and it costs you resources to do the calculation.

Put another way, for 5,000 clients, I'd rather have each one
run the checksum locally, rather than me having to run it 5,000
times, only to have it accepted and downloaded anyway.

I think this would end up making my FTP server CPU bound instead
of I/O bound.  It's already memory bound, so it would steal some
memory from me, which I could otherwise use to support additional
client machines.

Also, since FTP transfers are linear without reuse, reading once
for the sum and again for the transfer is going to thrash my
buffer cache, costing me even more CPU and latency to thrash
them back in.

If you had to have this, it would be much better, since  large
FTP servers are generally write-mostly, to build the MD5 into
the FS metadata, and calculate it each time a file is closed
after having been modified/created.  This would let the ftpd do
a low cost fcntl()/stat() operation to get the information,
instead of making it run an expensive calculation.

I think it's like GNUtella: if a few people have it, it's good;
if everone has it, it falls apart under load.


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200103142342.QAA09233>