Article View: comp.lang.misc
Article #2218Re: Sorting
From: Stanley T.H. Chow
Date: Mon, 19 Nov 1990 18:27
Date: Mon, 19 Nov 1990 18:27
78 lines
3734 bytes
3734 bytes
In article <11628@alice.att.com> dmr@alice.att.com (Dennis Ritchie) writes:
>This group has turned into a sewer, as bad as talk.origins
>(even the people I might politically agree with are acting dumb).
>
>But I do have a serious question. I've got a boxcar with 10,000 8-mm tapes,
>each containing 10,000,000 100-byte binary records
>without any substructure. I need to get these records sorted.
>Can someone quote me a cost and expected delivery time?
Ordinarily, I avoid topics like this. Seeing that it is Dennis Ritchie, just
my be I can get rich on this after all, so here is my proposal. :-)
Assumptions: Input - you hand me a boxcar of tapes, (figuratively speaking)
Output - I throw you 10,000 tapes back; in sequence, one tape
at a time (hope you have a good catching glove).
(Each output tape has 10,000,000 records exactly).
Sort Key - is the entire 100-byte record, duplicates are
allowed.
Observations:
1) Key space is 2 ** 800 (roughly 6 * 10 **240)
2) total "file" size = 10,000 * 10,000,000 * 100 bytes
= 10 ** 13 bytes.
3) Companies like SyncSort Inc. (and others) make their money
soving problems like this.
I will give you two quotes:
1) Minimum turn-around time.
I will need a bunch of tape drives along with a bunch of disk drives
connected by a network. Stuf an input tape into each tape drive, read
the records and throw each record into a disk. Unload the input tapes,
load blank output tapes, and copy 10,000,000 records onto each tapes.
Elapse time: approximately two times R/W time of a single tape.
Cost: option a: you provide the hardware
I charge 1% of the hardware cost for processing.
option b: I provide the hardware
Sorry, I want to get paid in my life time, so I can't
wait for the delivery of all that hardware.
2) Minimum hardware cost.
I will buy a really cheap CPU (Commodore 64 comes to mind), hook up a
single tape drive.
[I will skip the gory details of how. If you really want to know how,
look up any sort program on the mainframes - SyncSort is a good example.
They will tell you how to do it will three drives, cutting down to a
single drive is simple, but tedious]
Elapse time: approximately the expected life time of the universe.
Cost: option a: Total payment up front - $10K (negotiable)
option b: pay as you go: nothing down,
$10 a month for the duration. (negotiatable).
>
>This is just the start of a burgeoning business; next week
>I expect a full trainload of 100 such boxcars.
>What will this cost and how long will it take your company
>to handle it?
By a remarkable coincidence (and extreme lazyness), my quotes for this problem
are exactly the same as the previous smaller problem. This conclusively
demonstrates the advantage of dealing with a service-oriented compnay like
us - "The same price for all your problems".
Stanley Chow BitNet: schow@BNR.CA
BNR UUCP: ..!uunet!bnrgate!bcarh185!schow
(613) 763-2831 ..!psuvax1!BNR.CA.bitnet!schow
Me? Represent other people? Don't make them laugh so hard.
Technical Details
Message-ID:
<3717@bnr-rsc.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!cunews!bnrgate!bigsur!bnr-rsc!bcarh185!schowReferences:
<11628@alice.att.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!cunews!bnrgate!bigsur!bnr-rsc!bcarh185!schow From: schow@bcarh185.bnr.ca (Stanley T.H. Chow) Newsgroups: comp.lang.misc Subject: Re: Sorting Message-ID: <3717@bnr-rsc.UUCP> Date: 19 Nov 90 18:27:38 GMT References: <11628@alice.att.com> Sender: news@bnr-rsc.UUCP Reply-To: bcarh185!schow@bnr-rsc.UUCP (Stanley T.H. Chow) Organization: BNR Ottawa, Canada Lines: 78