Date: Mon, 9 May 2005 21:11:16 +1000 (EST) From: Bruce Evans <bde@zeta.org.au> To: Scott Long <scottl@samsco.org> Cc: Eric Anderson <anderson@centtech.com> Subject: Re: Very low disk performance on 5.x Message-ID: <20050509203849.J20942@delplex.bde.org> In-Reply-To: <427E0E87.1040701@samsco.org> References: <19879.1115061648@critter.freebsd.dk><20050502214208.M87351@fledge.watson.org> <01ad01c54fef$a56e6260$b3db87d4@multiplay.co.uk> <427E0E87.1040701@samsco.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 8 May 2005, Scott Long wrote: > Changing MAXPHYS is very dangerous, unfortunately. The root of the > problem is that kernel virtual memory (KVA) gets assigned to each I/O > buffer as it passes through the kernel. If we allow too much I/O through > at once then we have the very real possibility of exhausting the kernel > address space and causing a deadlock and/or panic. That is why MAXPHYS > is set so low. Your DD test is unlikely to trigger a problem, but try > doing a bunch of DD's is parallel and you likely will. > > The solution is to re-engineer the way that I/O buffers pass through > the kernel and only assign KVA when needed (for doing software parity > calculations, for example). That way we could make MAXPHYS be any > arbitrarily large number and not worry about exhausting KVA. I believe > that there is some work in progress in this area, but it's a large > project since nearly every single storage driver would need to be > changed. Another possibility is to recognise that amd64 doesn't have > the same KVA restrictions as i386 and thus can be treated differently. > However, doing the KVA work is still attractive since it'll yeild some > performance benefits too. How would it yield anything except complexity and negative performance benefits on machines that don't need it? The most efficient way to map kva for disk buffers is to do it only once at boot time using a simple sparse mapping technique as in 4.4BSD-Lite1. Simple sparse mapping needs lots of kva, and i386's don't have enough for machines with more than about 16MB of RAM, but machines with a 64-bit address space can have 2^32 times as much kva as i386's. Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050509203849.J20942>