Article View: news.software.nntp
Article #62494Re: xBin (Power-Post 2003 - requesting input from authorities..)
From: Kjetil Torgrim Homme
Date: Sun, 29 Dec 2002 02:33
Date: Sun, 29 Dec 2002 02:33
85 lines
4030 bytes
4030 bytes
[Curt Welch]:
>
> This makes the last file slightly larger than all the rest of the
> small files in the set, and in the worse case, makes it up to a
> full block size larger (i.e. almost the same size as the first
> parts in the set).
yes. actually, it can be larger than _all_ the other parts in the
set, but this only happens to multiparts with less than 8 parts. (see
code below.)
> However, there is another issue here. Smaller files generally
> tend to move throught Usenet faster. By making the first files
> the largest, and the last ones a block smaller, and the very last
> one the smallest of all - up to almost 2 blocks smaller, then the
> files posted later will tend to "catch up" with the larger posts
> as the set moves through usenet, helping to close the window of
> time from the arrivial of the first article in a multipart set to
> the time when all parts are available on a server.
this is a good thing, right? the effect should be small unless the
article sizes straddle a feed divider, though.
> Speed of articles moving though usenet is part of the argument for
> trying to equalize the part sizes, so maybe in fact, for this
> problem, having the last post up to 2 blocks smaller is actually
> not a bad thing?
agreed. but it's bad if it's the only part being fed to the server in
question. I think the race effect is so slight, it's better to keep
the parts as similar as possible.
here's my suggestion. this will make all parts the same size within a
block.
#! /usr/bin/perl -w
$block_size = 500*45;
$part_size = 8 * $block_size;
$file_size = shift;
while (1) {
$no_parts = int(($file_size-1)/$part_size) + 1;
$too_much = $no_parts*$part_size - $file_size;
if ($too_much >= $block_size * $no_parts) {
$part_size -= $block_size;
} else {
last;
}
}
@parts = ($part_size) x $no_parts;
$index = $#parts;
$parts[$index--] -= $too_much % $block_size;
$too_much -= $too_much % $block_size;
while ($too_much) {
$parts[$index--] -= $block_size;
$too_much -= $block_size;
}
print join ("\n", @parts), "\n";
## ends
$ ./partsplit 181001
90000
91001
$ ./partsplit 1801001
180000
180000
180000
157500
157500
157500
157500
157500
157500
157500
158501
--
Kjetil T. | read and make up your own mind
| http://www.cactus48.com/truth.html
Technical Details
Message-ID:
<1r4r8xk0yy.fsf@thrir.ifi.uio.no>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed1.bredband.com!bredband!uio.no!nntp.uio.no!ifi.uio.no!not-for-mailReferences:
<cdda0v4h6t52ov7abf1j0qkpo843itf4se@4ax.com> <cfka0vsbjdlbdmtv2gg8qnehok033qh5f1@4ax.com> <20021223041127.986$6M_-_@newsreader.com> <1rfzsoaacf.fsf@vingodur.ifi.uio.no> <20021223150103.132$Bb@newsreader.com> <1rd6ns9y06.fsf@tolf.ifi.uio.no> <20021223181329.108$LI@newsreader.com> <1rfzsjz87r.fsf@sjau.ifi.uio.no> <20021227144125.156$Nm@newsreader.com> <1rsmwjxgk5.fsf@sjau.ifi.uio.no> <20021228023313.941$tN@newsreader.com> <1rbs36gwag.fsf@tva.ifi.uio.no> <20021228131035.658$Ud@newsreader.com>Show Full Headers
Complete Article Headers
Message-ID: <1r4r8xk0yy.fsf@thrir.ifi.uio.no> Subject: Re: xBin (Power-Post 2003 - requesting input from authorities..) Date: Sun, 29 Dec 2002 02:33:57 +0000 From: Kjetil Torgrim Homme <kjetilho@haey.ifi.uio.no> References: <cdda0v4h6t52ov7abf1j0qkpo843itf4se@4ax.com> <cfka0vsbjdlbdmtv2gg8qnehok033qh5f1@4ax.com> <20021223041127.986$6M_-_@newsreader.com> <1rfzsoaacf.fsf@vingodur.ifi.uio.no> <20021223150103.132$Bb@newsreader.com> <1rd6ns9y06.fsf@tolf.ifi.uio.no> <20021223181329.108$LI@newsreader.com> <1rfzsjz87r.fsf@sjau.ifi.uio.no> <20021227144125.156$Nm@newsreader.com> <1rsmwjxgk5.fsf@sjau.ifi.uio.no> <20021228023313.941$tN@newsreader.com> <1rbs36gwag.fsf@tva.ifi.uio.no> <20021228131035.658$Ud@newsreader.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed1.bredband.com!bredband!uio.no!nntp.uio.no!ifi.uio.no!not-for-mail Newsgroups: news.software.nntp Organization: Dept. of Informatics, Univ. of Oslo, Norway Lines: 84 NNTP-Posting-Host: thrir.ifi.uio.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: maud.ifi.uio.no 1041129238 16627 129.240.65.203 (29 Dec 2002 02:33:58 GMT) X-Complaints-To: abuse@ifi.uio.no NNTP-Posting-Date: 29 Dec 2002 02:33:58 GMT User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7