On Tue, May 27, 2014 at 07:14:49AM +0200, Otto Moerbeek wrote: > On Mon, May 26, 2014 at 11:19:00PM +0200, frantisek holop wrote: > > > hmm, on Mon, May 26, 2014 at 04:46:04PM +0200, Otto Moerbeek said that > > > Yes it does, in most cases. But the most important is to use large > > > block and/or fragments sizes, if that is acceptable for your use (it > > > wastes space if you have a lot of small files). > > > > i meant to ask now for some time, what are (sensible) max > > values? can't find it in newfs(8), disklabel(8). > > > > # size offset fstype [fsize bsize cpg] > > a: 555913152 64 4.2BSD 8192 65536 1 > > > > i dont have an excessively big partition (but big enough > > for a veeery slow fsck with default newfs values) but it > > holds only media files, so i dont think i need lots of inodes. > > so i newfs-ed with -O 2 and big fsize/bsize. but i still have > > too many inodes. maybe 10x less inodes would suffice? > > > > Filesystem Size Used Avail Capacity iused ifree %iused Mounted > > on > > /dev/sd2a 263G 141G 122G 54% 64861 8730273 1% > > /home/f/data > > > > > > would these help in any way for media collections? > > > > -g avgfilesize > > The expected average file size for the file system in > > bytes. > > > > -h avgfpdir > > The expected average number of files per directory on the > > file system. > > > > $ sudo tunefs -N /dev/sd2a > > tunefs: tuning /dev/sd2a > > tunefs: current settings of /dev/sd2a > > maximum contiguous block count 1 > > maximum blocks per file in a cylinder group 8192 > > minimum percentage of free space 0% > > optimization preference: space > > average file size: 16384 > > expected number of files per directory: 64 > > tunefs: no changes made > > > > default average file size is rather conservative. > > and totally untrue for the media collection :) > > > > -f > > -- > > i am sick and tired of being sick and tired. > > block size is between 4096 and 65536, fragment size between 512 and > block size. Both are powers of 2, and block size can be 1, 2, 4, or 8 > times fragments size. For media files -b 65536 -i 65536 is fine.
That -i should be -f > > If you still have too many inodes, I use -i to reduce the numbers of > inodes during newfs, unit is bytes per inode. Newfs reports what it is > doing, so you can see how many inodes you are getting. > > The numbers for -g -and -h matter only at runtime, they do not > influence the fs layout during newfs. > > [otto@lou:16]$ sudo newfs -N -f 65536 -b 65536 /dev/rsd0l > newfs: reduced number of fragments per cylinder group from 163839 to > 163818 to enlarge last cylinder group > /dev/rsd0l: 40959.8MB in 83885696 sectors of 512 bytes > 5 cylinder groups of 10238.62MB, 163818 blocks, 40960 inodes each > super-block backups (for fsck -b #) at: > 128, 20968832, 41937536, 62906240, 83874944, > > [otto@lou:17]$ sudo newfs -N -i 1000000 -f 65536 -b 65536 /dev/rsd0l > newfs: reduced number of fragments per cylinder group from 163839 to > 163833 to enlarge last cylinder group > /dev/rsd0l: 40959.8MB in 83885696 sectors of 512 bytes > 5 cylinder groups of 10239.56MB, 163833 blocks, 11264 inodes each > super-block backups (for fsck -b #) at: > 128, 20970752, 41941376, 62912000, 83882624, > > -Otto