[ Pobierz całość w formacie PDF ]
.65MB/g, 1216 i/g)super-block backups (for fsck -b #) at:32, 5264, 10496, 15728, 20960, 26192, 31424, 36656, 41888,47120, 52352, 57584, 62816, 68048, 73280, 78512, 82976, 88208,93440, 98672, 103904, 109136, 114368, 119600, 124832, 130064, 135296,140528, 145760, 150992, 156224, 161456,The newfs command uses optimized default values to create the file system.Here are thedefault parameters used by the newfs command:The file system block size is 8,192.The file system fragment size (the smallest allocatable unit of disk space) is1,024 bytes.06 2496 Ch04 8/30/00 1:09 PM Page 106106 CHAPTER 4 INTRODUCTION TO FILE SYSTEMSThe percentage of free space is now calculated as follows: ((64 MB/partition size) ×100),rounded down to the nearest integer and limited to between 1 percent and 10 percent,inclusive.The number of inodes or bytes per inode is 2,048.This controls how many inodes arecreated for the file system (one inode for each 2KB of disk space).Understanding Custom File System ParametersBefore you choose to alter the default file system parameters assigned by the newfs com-mand, you need to understand them.This section describes each of these parameters:Logical block sizeFragment sizeMinimum free spaceRotational delay (gap)Optimization typeNumber of inodes and bytes per inodeLogical Block SizeThe logical block size is the size of the blocks that the UNIX kernel uses to read or writefiles.The logical block size is usually different from the physical block size (usually 512bytes), which is the size of the smallest block that the disk controller can read or write.You can specify the logical block size of the file system.After the file system is created,you cannot change this parameter without rebuilding the file system.You can have filesystems with different logical block sizes on the same disk.By default, the logical block size is 8192 bytes (8KB) for UFS file systems.The UFS filesystem supports block sizes of 4096 or 8192 bytes (4 or 8KB, with 8KB being the recom-mended logical block size).To choose the best logical block size for your system, consider both the performancedesired and the available space.For most UFS systems, an 8KB file system provides thebest performance, offering a good balance between disk performance and use of space inprimary memory and on disk.As a general rule, a larger logical block size increases efficiency for file systems in whichmost of the files are very large.Use a smaller logical block size for file systems in whichmost of the files are very small.You can use the quot -c file system command on a filesystem to display a complete report on the distribution of files by block size.06 2496 Ch04 8/30/00 1:09 PM Page 107UNDERSTANDING CUSTOM FILE SYSTEM PARAMETERS 107Fragment SizeAs files are created or expanded, they are allocated disk space in either full logical blocks orportions of logical blocks called fragments.When disk space is needed to hold data for afile, full blocks are allocated first, and then one or more fragments of a block are allocatedfor the remainder.For small files, allocation begins with fragments.The ability to allocate fragments of blocks to files rather than whole blocks saves space byreducing the fragmentation of disk space that results from unused holes in blocks.You define the fragment size when you create a UFS file system.The default fragment sizeis 1KB.Each block can be divided into one, two, four, or eight fragments, resulting in frag-ment sizes from 512 bytes to 8192 bytes (for 4KB file systems only).The lower boundary isactually tied to the disk sector size, typically 512 bytes.NOTE.The upper boundary might equal the full block size, in which case the fragmentis not a fragment at all.This configuration might be optimal for file systems with very largefiles when you are more concerned with speed than with space.When choosing a fragment size, look at the trade-off between time and space: A smallfragment size saves space but requires more time to allocate.As a general rule, a largerfragment size increases efficiency for file systems in which most of the files are large.Use a smaller fragment size for file systems in which most of the files are small.Minimum Free SpaceThe minimum free space is the percentage of the total disk space held in reserve when youcreate the file system.Before Solaris 7, the default reserve was always 10 percent.In Solaris7, the minimum free space is automatically determined.This new method of calculating freespace results in less wasted disk space on large file systems.Free space is important because file access becomes less and less efficient as a file systemgets full.As long as there is an adequate amount of free space, UFS file systems operateefficiently.When a file system becomes full, using up the available user space, only rootcan access the reserved free space
[ Pobierz całość w formacie PDF ]