 |
The Question is:
How do you determine the 'optimal' cluster size for a large disk volume with a
large number of small files to go on it?
For example, I have a 44,000,000 block disk (default cluster size of 43), and
I'm going to put on it approx 100,000 files of user data. Are there any i/o
performance considerations, or anything else, that should worry about if I
select a cluster size of
3 (assuming the majority of the 100,000 files will never be greater than 3
blocks)?
Finally, while researching this question on the Compaq website (and not finding
the answers I was looking for), I came across the following article which
implies (to me) that a smaller cluster size was introduced with ODS-5, but I
have an ODS-2 volume (un
der VMS 7.2/7.2-2) with a lower cluster size (than the default). Is this
article in error?
The link is:
http://www.compaq.com/support/asktima/operating_systems/CHAMP_SRC990406003493.ht
ml
The Answer is :
Optimal for what?
If there were such a thing as "Optimal" in isolation, there would be no
switches or parameters as they wouldn't be necessary. You can only
optimize for a specific operation or set of constraints.
When choosing a cluster factor, you might want to optimize for minimal
wastage of disk space. The ultimate optimal cluster size is then smaller
than the smallest file. If you knew in advance the sizes of all files,
you could go one better and choose the best fit common divisor for file
sizes, thus minimizing unused space.
In terms of I/O, cluster size can have an effect on allocation (large
cluster size reduces the amount of work) and on fragmentation, since
a file smaller than the cluster size cannot, by definition, be fragmented.
So, roughly speaking, larger cluster sizes, more work for the file system,
but more wasted space.
If you know the approximate size of files in advance, the wizard would
suggest you choose a cluster size that just above the mode of the
distribution of file sizes. In your case if the majority of files will be
under 3 blocks, then choose 3 blocks. A larger cluster factor is unlikely
to improve I/O performance, but will waste disk space. Although the DISK
may become fragmented into 3 block chunks, for your use that won't matter
as FILES won't be fragmented.
Small cluster factors were introduced with OpenVMS V7.2, which also
introduced ODS-5. ODS-2 disks will, by default choose the historical
default for compatibility with pre V7.2 systems, but you can choose a
smaller cluster factor by an explicit INITIALIZE/CLUSTER=x. See
HELP INIT/CLUSTER on any V7.2 or higher system.
 |
|
|
 |
|