From owner-freebsd-arch@freebsd.org Sun Nov 6 10:23:30 2016 Return-Path: Delivered-To: freebsd-arch@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 7ACA4C33D93 for ; Sun, 6 Nov 2016 10:23:30 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: from mail-wm0-x22b.google.com (mail-wm0-x22b.google.com [IPv6:2a00:1450:400c:c09::22b]) (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 0F21F944; Sun, 6 Nov 2016 10:23:30 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: by mail-wm0-x22b.google.com with SMTP id u144so21082871wmu.1; Sun, 06 Nov 2016 02:23:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=vkW4hpMko7RJ7AbqUs+GnRY5i+8zlp59/AVStpWte60=; b=FwVGWs57SWoJJu+52paLg2jfQGCcv2RWiaq+KkNkzCKEv4L84qfs5K3qzI6hPJWby+ pcbaNA0p2+oK8AHJNqIEVyZvxZcSYmfHfo1lftmGY3UT4z3FcW88SuOUrLOKRFOfMOkQ fUWMyUtarWXNtu1tk+48ZoVXYivm6Q5orPULBjVFuXISZGV5jqxvHv5yJ1G0iyoU2xOT 7+6DfDqV5MtllnYTxdiNngcRtv95zBgp/4377Bp7RT9F7xsVuvfgx2t0/fChfWfFT96M iWX6PeDKo3yXm1upE+3LZnHPC0oHR29dJ6PE3pM8gC2bhlqVf/vaziyDmaZyAZKvACM6 EegQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=vkW4hpMko7RJ7AbqUs+GnRY5i+8zlp59/AVStpWte60=; b=enQOUeyzGTyubxGlKGLEzyuf2aCMKY5tNx5e6yp152Rri+6ljkOM2znFQCcEbQ5Dli VCRzt4ch2sZ1rn/LAA835Zyb4fAhEtpBfVPm0LkE5gbkHNEv8SMa+PHn5X2Rm3aXiW2H 8Fzord/sMG7M04msjx/diTPJl5cA/ReKuoQb4Hfgeve0QPNXAvZTGUMEmXurLib5Ukbo YR0YoJz0anV8p30e3d9JymzhNFUrep8PoQYICs2nvodvKSRpQVmJHUpedk0YdiSIq8ZP sDvZT/hHkY7ekSYzqxLm1XsoUug+QN9ZNOSlj8hY5YM/OfunyaTLwnlQqgVZmGRdgsJO EPfw== X-Gm-Message-State: ABUngvdVegTsow6iLqvydvASBIKx7U6RipSnO7GDkpRGObrFbSUviRSiM+SFMSGQ+/oK0Q== X-Received: by 10.28.18.5 with SMTP id 5mr2044850wms.35.1478427808233; Sun, 06 Nov 2016 02:23:28 -0800 (PST) Received: from ernst.home (p578E2B18.dip0.t-ipconnect.de. [87.142.43.24]) by smtp.gmail.com with ESMTPSA id s133sm6848337wmd.19.2016.11.06.02.23.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 06 Nov 2016 02:23:27 -0800 (PST) Date: Sun, 6 Nov 2016 11:23:26 +0100 From: Gary Jennejohn To: Mark Johnston Cc: freebsd-arch@freebsd.org Subject: Re: PQ_LAUNDRY Message-ID: <20161106112326.47238905@ernst.home> In-Reply-To: <20161106091230.4e365b55@ernst.home> References: <20161103182916.GA31178@wkstn-mjohnston.west.isilon.com> <20161105103128.78197d36@ernst.home> <20161105174148.GA75901@raichu> <20161106091230.4e365b55@ernst.home> Reply-To: gljennjohn@gmail.com X-Mailer: Claws Mail 3.14.0 (GTK+ 2.24.29; amd64-portbld-freebsd12.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Nov 2016 10:23:30 -0000 On Sun, 6 Nov 2016 09:12:30 +0100 Gary Jennejohn wrote: > On Sat, 5 Nov 2016 10:41:48 -0700 > Mark Johnston wrote: > > > On Sat, Nov 05, 2016 at 10:31:28AM +0100, Gary Jennejohn wrote: > > > On Thu, 3 Nov 2016 11:29:16 -0700 > > > Mark Johnston wrote: > > > > Some more details and the diff for PQ_LAUNDRY can be viewed here: > > > > https://reviews.freebsd.org/D8302 > > > > > > > > We would like to commit it next week. Any additional comments, review, > > > > or testing would be welcome. > > > > > > > > > > In my use case, which is moving multi-gigabyte video files from > > > one file system to another, this seems to swap more than the > > > previous code did. Moving such large files with the previous > > > code seemed to recycle Inact more quickly and IIRC only a few 10s > > > of MB were swapped out. In my test this morning 125MB were > > > swapped out and Inact was not recycled as quickly. The overall > > > size of the files moved was about the same in the two tests. > > > > Are you computing the amount swapped out as the amount of memory swapped > > out minus the amount of swapins? Or is 125MB the amount of swap used > > after the test? Output from "sysctl vm.stats" taken before and after any > > test on both HEAD on PQ_LAUNDRY would be most useful. > > > > 125MB was the swap value showed by top after the files had all been > mv'd. But fairly soon after completion a few MB were swapped back in. > OK, on a level playing field there's no difference between the old and the new code. In fact, according to top the old code swapped out 272K and the new code swapped out 220K. An insignificant difference. The test scenario was as follows: 1) boot the box 2) start X 3) mount the source directory 4) start a bash script which copied the same set of files in a for-loop 5) start top and observe what happens Since all the files were either 4.3GB or 2GB cp didn't use mmap, but rather did read/write in a loop (if the comment in utils.c is still valid). My test yesterday did a `mv *`, but since mv used fastcopy(), which also does read/write in a loop, the pressure on the vm should have been very similar to cp. The major difference between today and yesterday was that I'd been running firefox and claws-mail for hours when I started the mv, so there was something to swap out. Since I'm not too eager to noodle around for hours before starting a test, let's just say that the new code appears to be no worse, or perhaps even better, than the old code. -- Gary Jennejohn