From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <72f57bf60029eba0ac90b0d179e174a9@terzarima.net> To: 9fans@cse.psu.edu Subject: Re: [9fans] kfs performance From: Charles Forsyth In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Wed, 3 Mar 2004 08:52:46 +0000 Topicbox-Message-UUID: 0eebf51c-eacd-11e9-9e20-41e7f4b1d025 be sure that rwm is on too as well as dma. >>freebsd is a bit more clever with its disk. i'm surprised it's only >>a factor of three. fossil isn't any better in this regard, although >>it does buffer more. i'm not sure about current BSD or Linux come to that but in the past i found that performance differences were often affected by the following as well: - not actually writing to the storage until much later - using most of memory as a big cache the former isn't so good if you suddenly halt the machine (soft updates or no) and the latter isn't so good if you need the memory for something else. i suspect BSD does both. of course, NOT doing them is unhelpful if you're trying to write quickly. furthermore, if you stop the machine suddenly, clearly unwritten material won't be there regardless whether you buffer a lot or a little (unless it has got heaps of NVRAM). on PCs, i'd add `using the hardware effectively', which plan 9 makes optional, presumably because rwm and dma might be touchy on some chipsets(?). don't know. cache only helps reads? not entirely: it means it can buffer that much more before actually writing. kfs is more diligent than the /sys/src/fs about forcing writes through to disc. that includes indirect blocks, i think, so all in all it will be doing much more writing than either fs or BSD. as rsc suggests that will also be in relatively small amounts, although i'm not sure there's much difference with BSD there. you could try switching that off to see what difference it makes. to speed things up generally, you might also try increasing the kfs cache if you've got lots of physical memory. it uses 10% by default. the -B option controls it. bigger blocks help too.