Soft Updates in Solaris UFS?
I just noticed a behaviour in Solaris 9 (kernel patch 112233-11) that I recognize from when FreeBSD adopted Kirk McKusick’s Soft Updates technology: The info “df” reports lags behind what’s actually going down on the filesystem. I just rm -rf’ed a big directory with about 40GB of data across about 20K files. Right after the rm finished, df reported that I still only had 300MB free. I waited a second, did a df again: same result. I did a ls to make sure the directory was in fact gone, and it was. A 3rd df now shows 11GB free. Over the next 8 or 10 seconds df caught up and reported the “proper” 42GB free. I don’t remember UFS in Solaris 2.6 and 7 behaving like this. I don’t mind it, but for some reason I thought I remembered being very annoyed that Sun declined on merging softupdates into their UFS a bunch of years ago. Perhaps it did finally make it’s way in afterall!
Update: It occured to me that this could also be related to the fact that I have logging enabled on this filesystem. At any rate, some googling didn’t turn up any info on whether or not softupdates is or isn’t in Solaris 9 UFS. On a related note, it doesn’t appear that ZFS is in the 08/04 Solaris Express update due tomorrow. I’m looking forward to an improved filesystem that comes stock in Solaris. Sun’s reliance on the rediculously expensive Veritas FS has to be remedied (even more so if they’re going after the Linux x86 market).
Update 2: Well, my second hunch proved to be closer to the truth:What it comes down to is that when ufs logging is turned on, the process of cleaning out the inode is placed into the transaction queue to be handled by a dedicated kernel thread and the unlink() system call immediately returns. This definitive answer comes via Alan Hargreaves’ follow-up post to my trackback. The full detail version of what’s going on is in SunSolve as SRDB 77645, which Alan wrote. Pretty nifty that two completely different techniques (logging vs. soft dependencies ala the *BSDs) leads to the same observed behaviour, and similar increased efficiencies.









3 Comments
Jump to comment form | comments rss [?]