[comp.sys.atari.st.tech] Big logical sectors and their effects

dmb@wam.umd.edu (David M. Baggett) (12/13/90)

I was looking over my ICD host adapter docs last night, and found that
you can set the "logical sector size" as big as 8K.  The implication
was that you could have really huge partitions (e.g,, 512K per
_partition_) this way.  

What effect does changing the logical sector size have on the system?
Does it increase minimal file size?  E.g., if I create a 10 byte file,
will it take up 8K on the disk, since the sector is the smallest
unit of space that can be allocated?

Will a large sector size decrease performance?  Confuse applications
of any kind?  

Dave Baggett
dmb%wam.umd.edu@uunet.uu.net

wallace@oldtmr.enet.dec.com (Ray Wallace) (12/15/90)

In article <1990Dec13.141210.26853@wam.umd.edu>, dmb@wam.umd.edu (David M. Baggett) writes...
>What effect does changing the logical sector size have on the system?
>Does it increase minimal file size?  E.g., if I create a 10 byte file,
>will it take up 8K on the disk, since the sector is the smallest
>unit of space that can be allocated?
The minimum file size would be 16k. The allocation unit is 1 CLUSTER not 1
sector. A cluster is equal to 2 sectors (normaly)

>Confuse applications of any kind?  
Some disk analyzer and defragmentation programs like DLII will not work
properly. I assume Ataris new disk analyzer will work with the larger sectors,
since there latest formater uses them.

---
Ray Wallace		
		(INTERNET,UUCP) wallace@oldtmr.enet.dec.com
		(UUCP)		...!decwrl!oldtmr.enet!wallace
		(INTERNET)	wallace%oldtmr.enet@decwrl.dec.com
---

csbrod@medusainformatik.uni-erlangen.de (Claus Brod ) (12/17/90)

dmb@wam.umd.edu (David M. Baggett) writes:

>What effect does changing the logical sector size have on the system?
>Does it increase minimal file size?  E.g., if I create a 10 byte file,
>will it take up 8K on the disk, since the sector is the smallest
>unit of space that can be allocated?

When boosting the sector size up to 8 KB, the minimal file size is
16 KB when using 2 sectors per cluster (standard case), and a _cluster_
is the smallest unit of space to be allocated.

>Will a large sector size decrease performance?  Confuse applications
>of any kind?  

Large sectors probably won't hurt performance. I haven't done any exact
measurements on that one yet. Many disk editors don't know about big
logical sectors yet but are being adapted. Application software
doesn't need to know about things like this and therefore runs
unaffected.

----------------------------------------------------------------------
Claus Brod, Am Felsenkeller 2,			Things. Take. Time.
D-8772 Marktheidenfeld, West Germany		(Piet Hein)
csbrod@medusa.informatik.uni-erlangen.de
----------------------------------------------------------------------

apratt@atari.UUCP (Allan Pratt) (12/18/90)

csbrod@medusainformatik.uni-erlangen.de (Claus Brod ) writes:
>Large sectors probably won't hurt performance. ...
>Many disk editors don't know about big 
>logical sectors yet but are being adapted. Application software
>doesn't need to know about things like this and therefore runs
>unaffected.

What he said.

There is another side-effect to large sectors, however: your disk cache
must consist of sector buffers which are as big as the largest logical
sector in your system.  Our hard-disk driver and cache program handle
that case perfectly: the cache program (CACHENNN.PRG) interrogates the
driver, asking "what's the largest logical sector size in the system?"
and it sizes cache sectors accordingly.  Other cache programs probably
do not handle this: they probably assume 512 bytes per sector.

As for clusters, clusters are always 2 sectors long.  This is due to a
bug in GEMDOS.  (The bug is interesting: it says, in effect, "if this
isn't the first sector of the cluster, then it's the last."  Hence, two
sectors per cluster.)  It's possible to fix the bug, of course, but a
disk with clusters larger than two sectors could not be used on a
system with older ROMs, and since large logical sectors fix the same
problem in a way that doesn't rely on having new ROMs, we decided to do
it that way.

============================================
Opinions expressed above do not necessarily	-- Allan Pratt, Atari Corp.
reflect those of Atari Corp. or anyone else.	  ...ames!atari!apratt

csbrod@medusainformatik.uni-erlangen.de (Claus Brod ) (12/20/90)

apratt@atari.UUCP (Allan Pratt) writes:

>csbrod@medusainformatik.uni-erlangen.de (Claus Brod ) writes:
>bug in GEMDOS.  (The bug is interesting: it says, in effect, "if this
>isn't the first sector of the cluster, then it's the last."  Hence, two
>sectors per cluster.)  It's possible to fix the bug, of course, but a

Does this imply that 1 sector per cluster is perfectly legal with all
TOS versions?



----------------------------------------------------------------------
Claus Brod, Am Felsenkeller 2,			Things. Take. Time.
D-8772 Marktheidenfeld, West Germany		(Piet Hein)
csbrod@medusa.informatik.uni-erlangen.de
----------------------------------------------------------------------
>============================================

apratt@atari.UUCP (Allan Pratt) (12/20/90)

>apratt@atari.UUCP (Allan Pratt) writes:
>>(The bug is interesting: it says, in effect, "if this
>>isn't the first sector of the cluster, then it's the last."  Hence, two
>>sectors per cluster.)

and csbrod@medusainformatik.uni-erlangen.de (Claus Brod ) writes:
>Does this imply that 1 sector per cluster is perfectly legal with all
>TOS versions?

Don't press your luck. :-)  It's not guaranteed, it hasn't been tested,
and it's not to be relied on.  No, it's not legal.

============================================
Opinions expressed above do not necessarily	-- Allan Pratt, Atari Corp.
reflect those of Atari Corp. or anyone else.	  ...ames!atari!apratt

csbrod@medusainformatik.uni-erlangen.de (Claus Brod ) (12/22/90)

apratt@atari.UUCP (Allan Pratt) writes:

>and csbrod@medusainformatik.uni-erlangen.de (Claus Brod ) writes:
>>Does this imply that 1 sector per cluster is perfectly legal with all
>>TOS versions?

>Don't press your luck. :-)  It's not guaranteed, it hasn't been tested,
>and it's not to be relied on.  No, it's not legal.

Pity. Would be nice for data exchange on 1.44 MB disks with ATs.
For some reason, 1.44 MB disks have 1 sector/cluster on PCs.

----------------------------------------------------------------------
Claus Brod, Am Felsenkeller 2,			Things. Take. Time.
D-8772 Marktheidenfeld, West Germany		(Piet Hein)
csbrod@medusa.informatik.uni-erlangen.de
----------------------------------------------------------------------

fischer-michael@cs.yale.edu (Michael Fischer) (12/22/90)

In article <3409@medusainformatik.uni-erlangen.de> csbrod@medusainformatik.uni-erlangen.de (Claus Brod ) writes:
>apratt@atari.UUCP (Allan Pratt) writes:
>
>>and csbrod@medusainformatik.uni-erlangen.de (Claus Brod ) writes:
>>>Does this imply that 1 sector per cluster is perfectly legal with all
>>>TOS versions?
>
>>Don't press your luck. :-)  It's not guaranteed, it hasn't been tested,
>>and it's not to be relied on.  No, it's not legal.
>
>Pity. Would be nice for data exchange on 1.44 MB disks with ATs.
>For some reason, 1.44 MB disks have 1 sector/cluster on PCs.

I use 1 sector/cluster in my ramdisk and it has given me no problems
whatsoever under TOS 1.4.  Allan's message was the first I knew that
it wasn't "legal".

-- 
==================================================
| Michael Fischer <fischer-michael@cs.yale.edu>  |
==================================================