From owner-freebsd-arm@freebsd.org Thu Jun 9 15:13:43 2016 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9260BAEF580 for ; Thu, 9 Jun 2016 15:13:43 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x22c.google.com (mail-io0-x22c.google.com [IPv6:2607:f8b0:4001:c06::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5BC3C13B6 for ; Thu, 9 Jun 2016 15:13:43 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x22c.google.com with SMTP id n127so40585128iof.3 for ; Thu, 09 Jun 2016 08:13:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=DDlW4T0q7F0kKUilaZOlOJ8tNrk2f0Sxt8tkffGfrZ8=; b=0MkG+u55HkaILaev+kJHIeV61HimMlxo89JOSTU9rUVoGpsNPu9776CSz/3Ix0DYFP 03Ws9p/iPr9okQhfs3yA5tnTIm+i9UM7UqIuUI5RoAppg6tVZTukKsUvKrpgCX+r13tF tBbZUbdR6l0Tan0x398POLalKm+hC0bRU1DTRvv6sBulpr7dmPWx8KxZw0Tn26Ta1dnG Uwc2VryyH1WVFPi1b4bDZesvayluY9PYm/rVOZET59I81SLN4gMaNwMBS3gE6BaM8hWH 1jpMwd2+5idXubkfOphvvSC+66siDuBzniFLc98pMOVeYX7hRUaimalJMJh1dKRjAyz0 yO5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=DDlW4T0q7F0kKUilaZOlOJ8tNrk2f0Sxt8tkffGfrZ8=; b=XWLJqjFEr3HqdbnsgbKjMdacc/PEbu7LfGwzLrGAaUR8DfTilH7Hp6G+JdIa0FcJ3/ oWKLXSx4Zd/ekZ2eGmmvFmldKEXtagCBK1nI/biu+gBOTXKmfTzK8r5k7U3JwIztbKYb y7XCZxmUdjsSP5ewB+Ll5a6cTdB2LJPWvnD0KHgwurJW16wOi4lpuv771uEpAOkT4nmS vqIh+P7rOvalFRgd3OiFIHgF1w+2UIsTNFCRsIFkxYKEnO2ZdB0gM266mPRiflUXOhEG VBxBe3smWmewFsnfzyTfDvNQiF2E6lgBGWFpz2dRpaKDXumtwOPKg/JqDEbjf13Eme5p HzdQ== X-Gm-Message-State: ALyK8tJB8m/9sV+RrpfG+2rUIC3/BaWcmbMAb2sKtnXukv546v/4/JCw27QIT0E/Jwyzlg== X-Received: by 10.107.131.212 with SMTP id n81mr2954267ioi.126.1465485222728; Thu, 09 Jun 2016 08:13:42 -0700 (PDT) Received: from [10.65.212.14] ([137.122.64.8]) by smtp.gmail.com with ESMTPSA id b135sm11572220itb.7.2016.06.09.08.13.41 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Jun 2016 08:13:41 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: RPi2 i/o blocking and SD card performance From: Warner Losh In-Reply-To: <1465483247.1188.60.camel@freebsd.org> Date: Thu, 9 Jun 2016 11:13:40 -0400 Cc: Gergely Imreh , FreeBSD ARM Content-Transfer-Encoding: quoted-printable Message-Id: <6DCCB49C-164D-4829-9578-1B49EA81CF01@bsdimp.com> References: <6406AECE-0153-494F-88EE-E58C8357FC1B@bsdimp.com> <1465483247.1188.60.camel@freebsd.org> To: Ian Lepore X-Mailer: Apple Mail (2.3124) X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jun 2016 15:13:43 -0000 > On Jun 9, 2016, at 10:40 AM, Ian Lepore wrote: >=20 > On Thu, 2016-06-09 at 09:55 -0400, Warner Losh wrote: >>> On Jun 9, 2016, at 5:37 AM, Gergely Imreh wrote: >>>=20 >>> Hi, >>>=20 >>> I've been testing FreeBSD 11.0-CURRENT on a RaspberryPi2. I'm = relatively >>> new to FreeBSD, and wondering if there's any advice for improving = the >>> performance a bit. >>>=20 >>> First, it looks like there's a lot of i/o blocking behaviour going = on. For >>> example running MediaWiki on the board, if I compile any ports, the = site >>> itself is pretty much unusable (the PHP scripts time out even with = 180s >>> timeouts). The strangest thing is that the CPU usage is not at 100% = all the >>> way, can be that all 4 cores are ~99% idle, and still everything = goes very >>> slow. Once the ports compilation or any other i/o-related task is = finished, >>> it's snappy again. >>>=20 >>> Any idea why it could be to have such big latency/lag even though = the CPU >>> is idle? Is there anything I could test? >>=20 >> What=C2=B4s the HZ for the system? The sd/mmc system has a lot of = context switches >> may be one reason for this. >=20 > What does HZ have to do with it? That's a serious question I've been > asking for about 3 years now, and have not gotten an answer (any = answer > from anyone): "What influence does HZ have on modern freebsd?" = (Modern > meaning roughly "with eventtimers implemented and the ULE scheduler.") >=20 > The little bit of testing I've tried to do hasn't shown any difference > at all that I can detect between HZ=3D100 and HZ=3D5000, or any values > in-between. That=E2=80=99s a good data point. Once upon a time there were places in = the SD stack where there were 1 tick sleeps that would show a big difference in the = latency=20 because of them. If you aren=E2=80=99t seeing any difference, those must = be officially dead. Warner