From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,5ea95efcabd4151b X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2004-03-22 10:15:40 PST Path: archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!crtntx1-snh1.gtei.net!news.gtei.net!newsfeed1.easynews.com!newsfeed3.easynews.com!easynews.com!easynews!border1.nntp.sjc.giganews.com!nntp.giganews.com!sjc70.webusenet.com!news.usenetserver.com!newsfeed.frii.net!newsfeed.frii.net!news.compaq.com!news.cpqcorp.net!53ab2750!not-for-mail From: Bob Harris Newsgroups: comp.unix.tru64 Subject: Re: Performance problem (I/O) References: User-Agent: MT-NewsWatcher/3.3b1 (PPC Mac OS X) Message-ID: Date: Mon, 22 Mar 2004 18:25:05 GMT NNTP-Posting-Host: 16.140.32.194 X-Complaints-To: abuse@HP.com X-Trace: news.cpqcorp.net 1079979905 16.140.32.194 (Mon, 22 Mar 2004 10:25:05 PST) NNTP-Posting-Date: Mon, 22 Mar 2004 10:25:05 PST Organization: Hewlett-Packard Company Xref: archiver1.google.com comp.unix.tru64:11318 In article , peter@abbnm.com (Peter da Silva) wrote: > In article , > Bob Harris wrote: > > I'm not sure I understand the question. I think, based on what you have > > extracted above, you are wondering if AdvFS defers the 8K allocation > > until after the frag has been created, and just what I/O really occurs. > > Is this correct? > > Yes, and thanks for the detailed and interesting explanation. I think I > followed it all, though of course I might be completely misinterpreting > something so if I go ahead and turn off fragging and it makes things > worse I won't blame you. :) The most important thing to know about turning off small file frag'ing is that it can consume a lot more disk space. If you have the disk space, then it doesn't matter. Also remember that turning off small file frag'ing only affects new files or existing files that are extended. All other small files with frag will keep their frags. Attached is a script that may give you an estimate of how much extra space will be needed if all the small files on the file system were created without frags. It is brand new code, so there could be bugs in it. Bob Harris #!/bin/ksh # # estimate_extra_storage_needed_if_no_small_file_frags.ksh /mount_point # find $1 -xdev -type f -ls 2>/dev/null |\ awk ' BEGIN { ONE_K = 1024 SEVEN_K = (ONE_K * 7) EIGHT_K = (ONE_K * 8) FRAG_PERCENT = 5 SIZE_LIMIT = ((EIGHT_K - 1) * 100) / FRAG_PERCENT } $7 !~ /[0-9]+/ { size = $6 } $7 ~ /[0-9]+/ { size = $7 } { fragsize = size % EIGHT_K if (fragsize == 0 || fragsize > SEVEN_K || size >= SIZE_LIMIT) { next # not a canidate } frag_storage = int((fragsize + (ONE_K-1)) / ONE_K) increased_storage = 8 - frag_storage total_storage_increase += increased_storage } END { print "Disabling small file fragging will need approx" if ( total_storage_increase < (10*1024) ) { print total_storage_increase, "Kilobytes more storage" } else if ( total_storage_increase < (10*1024*1024) ) { total_storage_increase /= 1024 print total_storage_increase, "Megabytes more storage" } else { total_storage_increase /= (1024*1024) print total_storage_increase, "Gigabytes more storage" } } ' exit