Date: Wed, 8 Jan 2020 20:55:10 +0200 From: Konstantin Belousov <kostikbel@gmail.com> To: Conrad Meyer <cem@freebsd.org> Cc: Hans Petter Selasky <hps@selasky.org>, Rick Macklem <rmacklem@uoguelph.ca>, Wojciech Puchar <wojtek@puchar.net>, "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org> Subject: Re: maximum MAXBSIZE Message-ID: <20200108185510.GY23031@kib.kiev.ua> In-Reply-To: <CAG6CVpUrGyov12nQSKhofCPw5fAiXgDGChxf3-aFu1fKpirJTQ@mail.gmail.com> References: <alpine.BSF.2.20.2001072210410.21107@puchar.net> <d79078c4-f1cb-93b9-ee6e-f689936c1e01@selasky.org> <YQBPR0101MB1427EEDE94AA6E34B49C3C09DD3F0@YQBPR0101MB1427.CANPRD01.PROD.OUTLOOK.COM> <20200108105136.0d54ebce@ernst.home> <alpine.BSF.2.20.2001081452360.44533@puchar.net> <20200108141810.GX23031@kib.kiev.ua> <CAG6CVpUrGyov12nQSKhofCPw5fAiXgDGChxf3-aFu1fKpirJTQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jan 08, 2020 at 10:24:51AM -0800, Conrad Meyer wrote: > Bufs are dynamically allocated from uma now, and perhaps a middle ground > BSIZE is worth considering? Would 1MB and 2kB bufs (1kB 32-bit) be awful? Buffers are not dynamically allocated. Uma wraps the static array of preallocated buffers still, it provides e.g. per-cpu caches and faster free. But system still reserves KVA and buf headers array (this part is backed by real memory). 2K per header is too much IMO. And it is almost always wasted, since we never create that large buffers for file system blocks. Except when we try to cluster io requests, and in this case perhaps we should use special buffers from special allocator. > > Cheers, > Conrad > > On Wed, Jan 8, 2020 at 06:18 Konstantin Belousov <kostikbel@gmail.com> > wrote: > > > On Wed, Jan 08, 2020 at 02:52:57PM +0100, Wojciech Puchar wrote: > > > sorry i made a mistake - i change MAXPHYS not MAXBSIZE. > > > > > > 16MB works for now without problems > > MAXPHYS 16MB means that sizeof(struct buf) is around 32K (16K on 32bit). > > > > > > > > On Wed, 8 Jan 2020, Gary Jennejohn wrote: > > > > > > > On Tue, 7 Jan 2020 22:47:54 +0000 > > > > Rick Macklem <rmacklem@uoguelph.ca> wrote: > > > > > > > > > Hans Petter Selasky wrote: > > > > > > On 2020-01-07 22:12, Wojciech Puchar wrote: > > > > > > > default MAXBSIZE is 128kB. badly low for todays magnetic disks. > > > > > > > > > > > > > > i have it set to 2MB on all computers that have magnetic disks. > > Great > > > > > > > improvement with large files. especially when more than one are > > > > > > > read/wrote in parallel. And no problems experienced > > > > > > > > > > > > > > But for optimal performance MAXBSIZE should be transfered in few > > times > > > > > > > longer than average seek time. todays disk do 200-250MB/s so 2MB > > is > > > > > > > transfered below 10ms. > > > > > > > > > > > > > > 8-16MB seems like good choice. is there any reason not to set it > > that high? > > > > > > > > > > > > Old disk may not support it, especially USB 1.0/2.0 disks. > > > > > I also thought it was limited to MAXPHYS, but maybe I'm only > > thinking of the NFS > > > > > specific case? > > > > > > > > > > > > > There's a comment in param.h that it should not exceed MAXPHYS to be > > > > on the safe side. How old that comment is I can't say and that may > > > > not be the case today. > > > > > > > > MAXBSIZE is only 64KiB in my param.h. > > > > > > > > I have to agree with HPS. There are many old bridge-chips still in > > > > use and problems with a large MAXBSIZE might occur. It's certainly > > > > not uncommon to see capacity limitations - I have a docking station > > > > which can't see more than 3TB. > > > > > > > > -- > > > > Gary Jennejohn > > > > > > > > > > > _______________________________________________ > > > freebsd-hackers@freebsd.org mailing list > > > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > > > To unsubscribe, send any mail to " > > freebsd-hackers-unsubscribe@freebsd.org" > > _______________________________________________ > > freebsd-hackers@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200108185510.GY23031>