disktab for VPC Disk





I'm trying to optimize the disk access of NEXTSTEP on Virtual PC 5.0.4.
Could anyone tell me the best value of, e.g., #tracks/cylinder, #cylinders/group,
revolutions/minute, sector-size? Are these values insignificant in VPC?
Maximum size of NeXT file system is 2GB.
The followings are man pages of newfs, disktab, tunefs in NEXTSTEP:


% man - newfs

NEWFS(8)            UNIX Programmer's Manual             NEWFS(8)

NAME
     newfs - construct a new file system

SYNOPSIS
     /usr/etc/newfs [ -N ] [ -v ] [ -n ] [ mkfs-options ]
     character-device [ disk-type ]

DESCRIPTION
     Newfs is a ``friendly'' front-end to the mkfs(8) program.
     Newfs will look up the type of disk a file system is being
     created on by using the information contained in the disk
     label of the character-device. If the disk-type argument is
     specified the information in the disk description file
     /etc/disktab is used.  This disk information is used to cal-
     culate the appropriate parameters to use in calling mkfs,
     then build the file system by forking mkfs and, if the file
     system is a root partition, install the necessary bootstrap
     programs in the initial 8 sectors of the device.  The -n
     option prevents the bootstrap programs from being installed.
     The -N option causes the file system parameters to be
     printed out without actually creating the file system.

     If the -v option is supplied, newfs will print out its
     actions, including the parameters passed to mkfs.

     Options which may be used to override default parameters
     passed to mkfs are:

     -s size   The size of the file system in sectors.

     -b block-size
               The block size of the file system in bytes.

     -f frag-size
               The fragment size of the file system in bytes.

     -t #tracks/cylinder

     -c #cylinders/group
               The number of cylinders per cylinder group in a
               file system.  The default value used is 16.

     -m free space %
               The percentage of space reserved from normal
               users; the minimum free space threshold.  The
               default value used is 10%.

     -o optimization preference (``space'' or ``time'')
               The file system can either be instructed to try to
               minimize the time spent allocating blocks, or to
               try to minimize the space fragmentation on the
               disk.  If the value of minfree (see above) is less
               than 10%, the default is to optimize for space; if
               the value of minfree greater than or equal to 10%,
               the default is to optimize for time.

     -r revolutions/minute
               The speed of the disk in revolutions per minute
               (normally 3600).

     -S sector-size
               The size of a sector in bytes.

     -i number of bytes per inode
               This specifies the density of inodes in the file
               system.  The default is to create an inode for
               each 2048 bytes of data space.  If fewer inodes
               are desired, a larger number should be used; to
               create more inodes a smaller number should be
               given.

FILES
     /etc/disktab   for disk geometry and file system partition
     information
     /usr/etc/mkfs  to actually build the file system
     /usr/standalone/boot     for boot strapping programs

SEE ALSO
     disktab(5), fs(5), disk(8), diskpart(8), fsck(8), format(8),
     mkfs(8), tunefs(8)

     M. McKusick, W. Joy, S. Leffler, R. Fabry, ``A Fast File
     System for UNIX'', ACM Transactions on Computer Systems 2,
     3.  pp 181-197, August 1984.  (reprinted in the System
     Manager's Manual, SMM:14)


% man - disktab

DISKTAB(5)          UNIX Programmer's Manual           DISKTAB(5)

NAME
     disktab - disk description file

SYNOPSIS
     #include <sys/disktab.h>

DESCRIPTION
     Disktab is a simple data base which describes disk
     geometries and disk partition characteristics.  The format
     is patterned after the termcap(5) terminal data base.
     Entries in disktab consist of a number of `:' separated
     fields.  The first entry for each disk gives the names which
     are known for the disk, separated by `|' characters.  The
     last name given should be a long name fully identifying the
     disk.

     The disk(8) program writes this information to the label
     area of a disk when it is initialized.  The getdiskbyname(3)
     and getdiskbydev(3) routines may be used to read this infor-
     mation from the data base or disk label respectively.

     The following list indicates the normal values stored for
     each disk entry.

Name Type Description
ty str Type of disk (e.g. removable_rw_optical)
ns num Number of sectors per track
nt num Number of tracks per cylinder
nc num Total number of cylinders on the disk
pa-h num Base sector number of partition [a-h]
sa-h num Size of partition [a-h] (sectors)
ba-h num Block size for partition [a-h] (bytes)
fa-h num Fragment size for partition [a-h] (bytes)
ca-h num Partition "cylinders-per-group" for newfs
da-h num Partition density ("bytes-per-inode") for newfs
ra-h num Partition "minfree" for newfs
oa-h str Partition optimization ("space" or "time") for newfs
ia-h bool Run newfs(8) on partition during initialization with disk(8)
ma-h str Partition mount point name
aa-h num Partition auto-mount on insert
ta-h str Partition file system type ("4.3BSD", "sound" etc.)
rm num Rotational speed in rpm (3600 default)
ss num Sector size in bytes
fp num Number of sectors in "front porch" of disk
bp num Number of sectors in "back porch" of disk
ng num Number of alternate groups on the disk
gs num Number of sectors per alternate group
ga num Number of alternate sectors per alternate group
ao num Sector offset of alternates in alternate group
os str Name of file to boot from
z0-1 num Locations (block number) of first level boot code
hn str Hostname
ro char Read only root partition (e.g. 'a')
rw char Read/write partition (e.g. 'b')


FILES
     /etc/disktab

SEE ALSO
     disk(8), newfs(8), getdiskbyname(3), getdiskbydev(3)

% man - tunefs

TUNEFS(8)           UNIX Programmer's Manual            TUNEFS(8)

NAME
     tunefs - tune up an existing file system

SYNOPSIS
     /usr/etc/tunefs tuneup-options special|filesys

DESCRIPTION
     Tunefs is designed to change the dynamic parameters of a
     file system which affect the layout policies.  The parame-
     ters which are to be changed are indicated by the flags
     given below:

     -a maxcontig
          This specifies the maximum number of contiguous blocks
          that will be laid out before forcing a rotational delay
          (see -d below).  The default value is one, since most
          device drivers require an interrupt per disk transfer.
          Device drivers that can chain several buffers together
          in a single transfer should set this to the maximum
          chain length.

     -d rotdelay
          This specifies the expected time (in milliseconds) to
          service a transfer completion interrupt and initiate a
          new transfer on the same disk.  It is used to decide
          how much rotational spacing to place between successive
          blocks in a file.

     -e maxbpg
          This indicates the maximum number of blocks any single
          file can allocate out of a cylinder group before it is
          forced to begin allocating blocks from another cylinder
          group.  Typically this value is set to about one quar-
          ter of the total blocks in a cylinder group.  The
          intent is to prevent any single file from using up all
          the blocks in a single cylinder group, thus degrading
          access times for all files subsequently allocated in
          that cylinder group.  The effect of this limit is to
          cause big files to do long seeks more frequently than
          if they were allowed to allocate all the blocks in a
          cylinder group before seeking elsewhere.  For file sys-
          tems with exclusively large files, this parameter
          should be set higher.

     -m minfree
          This value specifies the percentage of space held back
          from normal users; the minimum free space threshold.
          The default value used is 10%.  This value can be set
          to zero, however up to a factor of three in throughput
          will be lost over the performance obtained at a 10%
          threshold.  Note that if the value is raised above the
          current usage level, users will be unable to allocate
          files until enough files have been deleted to get under
          the higher threshold.

     -o optimization preference
          The file system can either try to minimize the time
          spent allocating blocks, or it can attempt minimize the
          space fragmentation on the disk.  If the value of
          minfree (see above) is less than 10%, then the file
          system should optimize for space to avoid running out
          of full sized blocks.  For values of minfree greater
          than or equal to 10%, fragmentation is unlikely to be
          problematical, and the file system can be optimized for
          time.

SEE ALSO
     fs(5), newfs(8), mkfs(8)

     M. McKusick, W. Joy, S. Leffler, R. Fabry, ``A Fast File
     System for UNIX'', ACM Transactions on Computer Systems 2,
     3.  pp 181-197, August 1984.  (reprinted in the System
     Manager's Manual, SMM:14)

BUGS
     This program should work on mounted and active file systems.
     Because the super-block is not kept in the buffer cache, the
     changes will only take effect if the program is run on
     dismounted file systems.  To change the root file system,
     the system must be rebooted after the file system is tuned.

     You can tune a file system, but you can't tune a fish.

%
.



Relevant Pages

  • Re: When does `write return?
    ... the write could return as soon as the data get to a memory buffer. ... > But the hardware controller for the disk drives allowed you to read any ... > per cylinder and 20 sectors per track. ... > the whole cylinder and do an automatic seek with no intervention from the OS ...
    (comp.os.linux.misc)
  • Re: Disk geometry from /sys
    ... Many compact flash cards will report 16 heads, and 16 or 32 sectors ... Simplest way to find out what geometry a disk pretents to have is to ask ... Why do you want to know what cylinder size the hard disk pretents to ...
    (Linux-Kernel)
  • Re: partition naming - newbie
    ... hardware address that is assigned to each disk, tape, or CD-ROM. ... Using the prtconf command ... In addition to managing these directories, the devfsadm command also ... Berkeley fast file system. ...
    (comp.unix.solaris)
  • Re: Windows bug?
    ... >> "The file system structure on the disk is corrupt and unusable. ... >> Windows has made corrections to the file system. ... >> 9070410 allocation units available on disk. ...
    (microsoft.public.windows.file_system)
  • SUMMARY N2: RE: Veritas Volume Manager and Solaris 8 disk space problem
    ... DESC: Commercial File System ... Disk layout version 4 won't support filesistem sizes bigger than 1Tb. ... VERITAS File System disk layout version 6 supports the creation of file ... Sector Count Sector ...
    (SunManagers)