Article View: news.software.nntp
Article #65031Re: xBin library version 0.1
From: Curt Welch
Date: Sat, 26 Apr 2003 19:08
Date: Sat, 26 Apr 2003 19:08
94 lines
6373 bytes
6373 bytes
Ok, so I'm a little slow replying to this message.... pmrobinson@gmx.net (Peter Robinson) wrote: > Curt Welch <curt@kcwc.com> wrote: > > > the current posting conventions creates segements which are a > > multiple of 45 bytes (the number of bytes encoded in each uuencoded > > line). To be compatible with this limitation, we (I mostly) argued that > > it would be best to pick a block size for xBin which was a multiple of > > 45. The current front-runner for this is 22500 byte blocks. (500 > > uuencoded lines). > > Where did the 500 come from? Somewhat random really. But it puts the hash block into a size range which seems "good" for Usenet and allows people who post in uuencode format to maintain an old standard of posting in multiples of 1000 lines. > > I've also had second thoughts about using a non power-of-two block size > > for other future reasons and thought that maybe a 32K block size would > > be better. > > I haven't been following all the discussion, but could you compromise > with something like 512*45 bytes (22.5KB)? Yeah, that's always an option. Anything is an option. > Perhaps having a block size > that's 'not quite' a power of two is no better, though. Yeah, I think that was the thought processes. Once you decide to go with something that isn't a power of two, then there's not a lot of point with going with something like 512*45. If for example you were trying to fit the data into larger blocks like 4K or 16K, then these 512*45 blocks would not be much of an improvement over 500*45. The issue is that the performace of the code that scans a file and calculates the hash is really not changed enough to measure with power-of-two aligned blocks or otherwise. The larger the block, the smaller the size of the hash tree, and the less work envolved with calculating the hash values in the hash tree, but the block alignment issues are normally mostly invisible. Typical code these days is already using buffered disk IO which is forced to copy the data blocks already, so if you read into a buffer of size 20500 (45*500 500 uulines) or 23040 (22.5K - 512 uulines) you can't even measure the performance difference. And, in most cases, all the code is disk I/O bound so minor changes in the amount of CPU work is meaningless. The reason for trying to stay with a power of two is at first just one of esthetics. Down the road, you just expect that things will change and we will drop uuencoding completely yet for 50 years after that, we are still using this hash block size of 22500 bytes and nobody remembers why. So estheticly, it just feels wrong to go with a 22500 block size even if you can't justify it for a performace reason. But, what I later realized is that xBin is likely to transform our view of what Usenet is doing in terms of binary file transport. Instead of the article transport system it is today, we will start to look at the binary side of usenet as a binary distribution system which moves and stores hash-block sized chunks of data. Whatever we end up using as the hash block size will become the basic chunk of data which the servers can transport and store. This could easily move us to a more P2P like file-chunk sharing system where we will might end up totaly restructuring how the news servers store the binary data. If they start to act as file systems which store hash-block sized chunks of data, there are advantages to be gained (less space lost or better efficiency) if the hash blocks align with the disk block size or filesystem block sizes. This makes me want to go with a power of two sized hash block. But, will the potential uuencode problems mean that people wanting to use uuencode for posting will end up refusing to embrace xBin? If so, xBin might end up dieing before it every gets off the ground, so worring about the potential future would be a waste of time. uuencode should in theory work with any size data in each article because you should be able to just make the last line of uudata in each file shorter. It would be good to test many of the multipart uudecode tools/newsreaders on usenet to see how many of them do work with short lines and see if any do seem to have problems with them. Maybe in practice, none that we can find have a probem with short uuencoded lines in which case, the risk of using a hash block which was not a multiple of 45 bytes is less of an issue. And now we have the issue of looking at other tree hash standards like Tiger Tree as used by some of the P2P systems. It uses a 1024 block hash which is nicely power-of-two based, but it's smaller than we might otherwise want so it creates larger hash trees. But maybe they are not "too large" and helping to create a net-wide standard for file-ids for all types file-sharing systems would be a good thing for all. -- Curt Welch http://CurtWelch.Com/ curt@kcwc.com Webmaster for http://NewsReader.Com/
Technical Details
Message-ID:
<20030426150829.677$HB@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!headwall.stanford.edu!newshub.sdsu.edu!news-xfer.cox.net!feed1.newsreader.com!newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mailReferences:
<pan.2003.04.08.05.21.36.142899@canada.com> <l_Cka.19193$iy5.537691@twister2.libero.it> <pan.2003.04.08.17.40.39.978437@canada.com> <pan.2003.04.08.18.19.33.288947@canada.com> <20030409191413.445$rS@newsreader.com> <pan.2003.04.10.18.15.24.309042@canada.com> <20030410174600.804$YN@newsreader.com> <1ft9yrj.1vkfz9o86ej0cN%pmrobinson@mail.com>Show Full Headers
Complete Article Headers
Message-ID: <20030426150829.677$HB@newsreader.com>
Subject: Re: xBin library version 0.1
Date: Sat, 26 Apr 2003 19:08:29 +0000
From: curt@kcwc.com (Curt Welch)
References: <pan.2003.04.08.05.21.36.142899@canada.com> <l_Cka.19193$iy5.537691@twister2.libero.it> <pan.2003.04.08.17.40.39.978437@canada.com> <pan.2003.04.08.18.19.33.288947@canada.com> <20030409191413.445$rS@newsreader.com> <pan.2003.04.10.18.15.24.309042@canada.com> <20030410174600.804$YN@newsreader.com> <1ft9yrj.1vkfz9o86ej0cN%pmrobinson@mail.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!headwall.stanford.edu!newshub.sdsu.edu!news-xfer.cox.net!feed1.newsreader.com!newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mail
Organization: NewsReader.Com
Newsgroups: news.software.nntp
X-Trace: NewsReader.Com tQb+Cnzhak2m+Ol1=FkCpLVi,+0-UNanFh+kvLiFW8KG3-2hY
X-Face: "p}G*1KH{+F7EYGKLb>ogDguabZ+%,?^epeFB!nzu`)`$=QcvL1KF6<0GH!Tbc!Sqo[|tV5
%IW48mQf3K=Ci&gZ7]]aazx@]Y-nq!r5{yH/#,?@lDdUDvOfByB2hVW0.@OM%{l/{cT'{w
X-Url: http://CurtWelch.Com/
User-Agent: NewsReader.Com
Lines: 93