From:	SMTP%"RELAY-INFO-VAX@CRVAX.SRI.COM" 11-APR-1994 08:59:30.08
To:	EVERHART
CC:	
Subj:	C-Kermit (was: SZ shell)

From: fdc@fdc.cc.columbia.edu (Frank da Cruz)
X-Newsgroups: comp.os.vms
Subject: C-Kermit (was: SZ shell)
Date: 10 Apr 1994 15:21:44 GMT
Organization: Columbia University
Lines: 124
Distribution: World
Message-Id: <2o95i8$8bd@apakabar.cc.columbia.edu>
Nntp-Posting-Host: previous.cc.columbia.edu
To: Info-VAX@CRVAX.SRI.COM
X-Gateway-Source-Info: USENET

In article <Co12sw.3sy@acsu.buffalo.edu> kalisiak@cs.buffalo.edu (Chris  
Kalisiak) writes:
> What parameters should be used with a high-speed modem? The configuration
> is C-Kermit 5A(189), 14.4kb modem, 19.2kb serial port on a DECserver
> 200/MC. What combination of 'set buff', 'set win', etc. will make C-Kermit
> as fast (or faster than) zmodem?
> 
I thought I just posted this yesterday.  Maybe it didn't make it.  Apologies
if it comes through twice, but at the rate this question gets asked, maybe
it should posted every day?

In article <s5$Oj86y-nB0055yn@faraday.clas.virginia.edu>
gap5u@faraday.clas.virginia.edu (Gregory Perron) writes:
> 
> I'm downloading from a vax 4000-90 thru a terminal server of some sort
> to my PC.  14.4's at both ends: I have a cardinal internal; they have
> us robotics.  I get messages of 14.4, lapm, v.42bis, etc.  But,
> downloads have been hideous.
> 
> I've given up on sz, because of too many aborted transfers.  I
> *think* the problem is w/ the vax, but I'm not sure.  [I get flawless
> 1600-1650 cps dl's on zipped files from a local bbs] Yes, I tried all
> the -ebrw permutations I could think of.
> 
> On to kermit: I use procomm plus/dos 2.01 on my PC.  On the vax,
> ckermit pops up and says:
> Ckermit 5a(188) 23 NOV 92, OpenVMS Vax.
>
You'll get better results with C-Kermit 5A(189) or later, which has two
new features described below.  C-Kermit 5A(189) is available via
anonymous ftp to kermit.columbia.edu, directory kermit/b, get the file
ckvaaa.hlp, read it, take it from there.

> My ckermit.ini file has:
> set send pack 1000
>
This command is not needed; see the documentation.

> set receive pack 1000
> set buff 20000 20000
> set file type bin
> set windows 10
> set block 3
> 
> Symptoms: max dl cps has been around 1100 for a zipped/jpg/gif file.
> And that's unusual: 950-1050 is more normal. It's almost like I'm
> only at 9600, modem report aside.
> 
I can't speak for Procomm, but I ran some tests using MS-DOS Kermit 3.13
(the current version) on a 486/66 over a V.32bis/V.42/V.42bis dialup
connection to a Cisco terminal server, and from there to a VAXstation
3100 running VMS 5.x and C-Kermit 5A. The calling modem is a Telebit
T3000, the answering modem is a USR Courier.

MS-DOS Kermit 3.13 is available via anonymous ftp to kermit.columbia.edu,
directory kermit/bin, binary mode, file msvibm.zip.

In these tests, I downloaded a 330K ZIP file (MSVIBM.ZIP -- the MS-DOS
Kermit 3.13 distribution).  My serial interface speed was 57600 bps, and
I used RTS/CTS flow control between my PC and the modem, and RTS/CTS was
also active between the answering modem and the terminal server.

In the first test (10 window slots x 1000-byte packets, same settings as
yours), I achieved an effective throughput of 1091 cps, like you got.

Since the connection between the terminal server and VMS is via TCP/IP
TELNET, and we know that TCP and IP will handle the flow control between
the VAX and the terminal server, I told C-Kermit to SET FLOW NONE (its
default setting is XON/XOFF) and ran the test again: 1136 cps.

Now that we've got the basics taken care of, we can work on tuning.
Next I tell C-Kermit to:

  SET CONTROL UNPREFIX ALL
  SET CONTROL PREFIX 1 129 255

(version 5A(189) or later is required for this; see the CKCKER.UPD file
for explanation) -- This removes control-character prefixing overhead
for all but 3 characters (4 really: NUL, Ctrl-A, Ctrl-A plus parity, and
the TELNET IAC character).  Now I get 1549 cps.  Note: control-character
unprefixing is of benefit primarily for precompressed files, secondarily
for uncompressed binaries, and has very little effect at all on text
files.

Well, the PC I was using is one of the new "high-speed, low-cost"
models, and so lacks a buffered UART.  All of the above transfers
suffered various amounts of retransmissions due to UART buffer overruns.
Switching to a much slower PC (a PS/2-70, 15MHz I think) that has a
16550A buffered UART, same transfer, same parameters, the throughput
goes up to 1601 cps.

Now, since I don't have to worry about buffer overruns any more, I
increase Kermit's packet length to 5000 (SET RECEIVE PACKET-LENGTH
5000).  Throughput: 1608 cps.

And now, since this is a precompressed file, I note that neither
Kermit's run-length compression, nor the modem's V.42bis compression
will do any good -- and some would say that they slow things down
a lot.  Let's see.  I turn both off:

  Kermit: SET REPEAT COUNTS OFF (C-Kermit 5A(189) or later required).
  Modem:  ATS190=0 (Telebit T3000)

and download the file again.  Result: 1616 cps.  Not a big difference.

Lessons (which apply mainly to this particular type of connection):

 1. Buffered UARTs are better than nonbuffered UARTs.
 2. Be sure to get the flow control at both ends.
 3. Use long packets (1K - 5K, whatever works) and sliding windows
    (4 or more).
 4. Once you've got all that working optimally, you can squeeze out
    another 20-30% efficiency with control-character unprefixing.
 5. After that, don't bother too much with fine tuning, particularly
    with disabling modem or software compression - it makes very little
    difference.

Please, before we have another flurry of postings from people asking
for the "optimal" list of control characters to be unprefixed, THERE IS
NONE.  Every connection is different, with its own unique characteristics.
Read the documentation.  Ditto for all the other variables we have looked
at here: window size, packet length, flow control, etc.

- Frank