From owner-freebsd-hackers@freebsd.org Thu Jan 9 16:15:00 2020 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DBBA01F289F for ; Thu, 9 Jan 2020 16:15:00 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x836.google.com (mail-qt1-x836.google.com [IPv6:2607:f8b0:4864:20::836]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47trmg6rS0z4LZ9 for ; Thu, 9 Jan 2020 16:14:59 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x836.google.com with SMTP id w47so6305656qtk.4 for ; Thu, 09 Jan 2020 08:14:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/IFPTKpj+WjoK2nSdBNQjW23xX7YXseWJbB0BiWs6mY=; b=SIwtCccsrk1CrHw68f1sib2LqHAkxfNWGp0DXpEDXwzRCxVBKZR9jd81aXuQd5cXCy hpkS9IR4/3cFJdz1ldv7xroH/sga4eEpuxQH9eqVuvAPpVAG0ZjkXCzfejjT7r1iidLZ le+Fki0vLIPuCBecsMPtrAAdm50QT9WGxh8b4AYgsWT2Bee6aGr426VOF8SbeYrBh2Gp w9Yoax8rpb+aeRqvcAS/78Z5dpBDTzyUs37Binm5LdInCbIqoWvophqPq17/9m20iYnD Rcsr3kiCZxpP2APQfTsuphKJuQApIn5e8N+CFL0l6iwvX1uN3mvSFhkBjsvMKAosFXNm e7hA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/IFPTKpj+WjoK2nSdBNQjW23xX7YXseWJbB0BiWs6mY=; b=hh6tRub+Z+qmZlRg9pn/gP+kxdrVcK2A8Tti7Sj4LJPWLtQoOOaWQiwWOWUjuvFr5N VTWjP01JkMinEoBf+tTs67/1IKH8YGi5lYUKdwx1EW5AJdGqjZCM8JmR2ocA1MIbDZvA C955mcFXRITJ1t86poLJwJn573R1bySi3RO3e5BOJPwBc75/EkmJvahCcWNH2U8Lqpo7 Q0XEXIQTWfH8Hf3sBcnT70crgTmlzrk2MAvzxhymxekEwW2NK0caUYOJzebZ//NZ9n3J 2hVnSLY5w8jiSY26sCY6jILiYK6ThGvCaR/C1rxjPjXoz3ja2+dEpg3AWwoqwtgZuDA6 KR9g== X-Gm-Message-State: APjAAAW4b3KfdqyKhEkkFaubrGWIlfdYNLu8xcIdrnboOQ2GLsiO0SCn ae/Otflvgwy/DXcM+ttEE4N6KrQhLec8NaAepygzUA== X-Google-Smtp-Source: APXvYqwrjPGVU9QS4dpTcmSfvWqppNtWg8Z+j7LJk1cvmlPfyPWPQlWxSTUHozkdehrsn1QERwQoPDYne0EVVDky8O8= X-Received: by 2002:aed:3b79:: with SMTP id q54mr8769887qte.187.1578586498791; Thu, 09 Jan 2020 08:14:58 -0800 (PST) MIME-Version: 1.0 References: <20200108105136.0d54ebce@ernst.home> <20200108141810.GX23031@kib.kiev.ua> <20200109164519.33fc7478@ernst.home> In-Reply-To: <20200109164519.33fc7478@ernst.home> From: Warner Losh Date: Thu, 9 Jan 2020 09:14:47 -0700 Message-ID: Subject: Re: maximum MAXBSIZE To: Gary Jennejohn Cc: Wojciech Puchar , Hans Petter Selasky , Rick Macklem , Conrad Meyer , "freebsd-hackers@freebsd.org" , Konstantin Belousov X-Rspamd-Queue-Id: 47trmg6rS0z4LZ9 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=SIwtCccs; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::836) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-4.64 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[6.3.8.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; RCPT_COUNT_SEVEN(0.00)[7]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; FREEMAIL_TO(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-2.64)[ip: (-9.16), ipnet: 2607:f8b0::/32(-2.12), asn: 15169(-1.85), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jan 2020 16:15:00 -0000 On Thu, Jan 9, 2020 at 8:45 AM Gary Jennejohn wrote: > On Thu, 9 Jan 2020 15:21:25 +0100 (CET) > Wojciech Puchar wrote: > > > why FreeBSD default is so completely wrong for modern hardware? > > > > i think 4MB is OK for HDDs, more may be optimal for RAID5 arrays. > > > > POLA (principle of least amazement). I certainly don't need a MAXPHYS set > to 4MB on my desktop machine. Not everyone using FreeBSD is running > servers with large amounts of memory and disk storage. > > It's a trivial change if it's beneficial in a certain use scenario. The > decision should be left up to the user. > And if you change MAXPHYS, you'll also want to bump the insanely small runningbuf limits. And there may be a few other parameters I've not reported that we set that are critical too :) Warner > > > > On Thu, 9 Jan 2020, Warner Losh wrote: > > > > > Netflix runs our entire network at MAXPHYS=8MB since we're doing huge > reads off HDD. > > > Warner > > > > > > > > > On Thu, Jan 9, 2020 at 2:58 AM Wojciech Puchar > wrote: > > > 2MB MAXPHYS was what i have set for over 3 years without > problems. > > > > > > On Wed, 8 Jan 2020, 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? > > > > > > > > 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 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" > > > > > > > > > > > > > > > _______________________________________________ > > > 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" > > > -- > Gary Jennejohn >