From:	SMTP%"RELAY-INFO-VAX@CRVAX.SRI.COM" 28-APR-1994 15:18:13.56
To:	EVERHART
CC:	
Subj:	Re: RE: Global MAIL compress for all users?

From: vandenheuvel@eps.enet.dec.com (Hein RMS van den Heuvel)
X-Newsgroups: comp.os.vms
Subject: Re: RE: Global MAIL compress for all users?
Date: 18 APR 94 17:46:10
Organization: Digital Equipment Corporation
Lines: 96
Message-Id: <2ouvt5$5eh@jac.zko.dec.com>
Nntp-Posting-Host: AMUZED
To: Info-VAX@CRVAX.SRI.COM
X-Gateway-Source-Info: USENET


In article <2oul4n$ii8@sndsu1.sinet.slb.com>, brydon@dsnvx1.tulsa.dowell.slb.com (Harvey Brydon (918)250-4312) writes...
>In article <2osa2s$mkt@sndsu1.sinet.slb.com>,
>brydon@dsnvx1.tulsa.dowell.slb.com (Harvey Brydon (918)250-4312) writes:
>> ... Have a look at SYS$EXAMPLES:MAILCOMPRESS.COM...

        That's a good starting point for a mail file maintenance tool.
    If someone is going to build on it, then I suggest to consider   
    the following changes:

    - Further enhance protection against incoming mail for the current
      user during the convert consider...
    	$rename mail.mai.* -> .old 
        $convert .old -> .new
        $rename .new -> .mai
    	$IF F$PARSE ("mail.mai",, "VERSION").GT.1 THEN -
    		$CONVERT/MERG mail.mai;-1 mail.mai;0

    - Don't use the silly default file extension that comes with mail.
      Do something reasonable based on the actual = expected file size.
      Unfortunatly this will need multiple FDL's.
      I suspect that for most system a set of 3 - 5 different FDL's 
      will be adequate. For example:
    		Small users:  ALQ = 90, DEQ = 30, BKS = 6
    		Modest:       ALQ = 600, DEQ = 60, BKS = 6
    		Medium:       ALQ = 2400, DEQ = 600, BKS = 12
    		Big time:     ALQ = 6000, DEQ = 3000, BKS = 12? 24?
      The procedure should select the FDL with an ALQ of = actual ALQ.
      While you are at it, it appears that a single bucketsize of 6 (or
      5, but 6 `feels' better for a 3 block disk clustersize) performs
      slightly better. And if you have the memory, why not throw some
      global buffers at the files: 10, 20,... enough to keep a couple
      of 'folders' that is alternate key buckets in memory.

      It could mean using an FDL file like so:

IDENT	" Hein "

FILE
        FILE_MONITORING         yes
	GLOBAL_BUFFER_COUNT     20
	ORGANIZATION            indexed
	PROTECTION              (system:RW, owner:RW, group:, world:)
RECORD
	FORMAT                  variable
	SIZE                    2048
AREA 0
	ALLOCATION              3600
	BEST_TRY_CONTIGUOUS     yes
	BUCKET_SIZE             12
	EXTENSION               1200

AREA 1
	ALLOCATION              60
	BEST_TRY_CONTIGUOUS     yes
	BUCKET_SIZE             12
	EXTENSION               60

AREA 2
	ALLOCATION              120
	BEST_TRY_CONTIGUOUS     yes
	BUCKET_SIZE             12
	EXTENSION               60

KEY 0
	DATA_RECORD_COMPRESSION yes
	DATA_AREA               0
	DATA_FILL               100
	INDEX_AREA              1
	INDEX_FILL              100
	LEVEL1_INDEX_AREA       1
	PROLOG                  3
	SEG0_LENGTH             8
	SEG0_POSITION           0
	TYPE                    bin8

KEY 1
	CHANGES                 yes
	DATA_KEY_COMPRESSION    yes
	DATA_AREA               2
	DATA_FILL               50
	DUPLICATES              yes
	INDEX_AREA              2
	INDEX_COMPRESSION       no
	INDEX_FILL              80
	LEVEL1_INDEX_AREA       2
	NULL_KEY                yes
	NULL_VALUE              0
	SEG0_LENGTH             39
	SEG0_POSITION           9
	TYPE                    string

Hope this helps,               +--------------------------------------+
                               | All opinions expressed are mine, and |
Hein van den Heuvel            | may not reflect those of my employer |
vandenheuvel@eps.enet.dec.com  +--------------------------------------+