Date: Sun, 6 Nov 2016 21:11:06 -0600 From: Alan Cox <alan.l.cox@gmail.com> To: gljennjohn@gmail.com Cc: Mark Johnston <markj@freebsd.org>, FreeBSD Arch <freebsd-arch@freebsd.org> Subject: Re: PQ_LAUNDRY Message-ID: <CAJUyCcPFfu=s3yL%2B1uppt0YvAU_NmZroCUyxj5dqTZpeaQ%2BwzA@mail.gmail.com> In-Reply-To: <20161106112326.47238905@ernst.home> References: <20161103182916.GA31178@wkstn-mjohnston.west.isilon.com> <20161105103128.78197d36@ernst.home> <20161105174148.GA75901@raichu> <20161106091230.4e365b55@ernst.home> <20161106112326.47238905@ernst.home>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Nov 6, 2016 at 4:23 AM, Gary Jennejohn <gljennjohn@gmail.com> wrote: > On Sun, 6 Nov 2016 09:12:30 +0100 > Gary Jennejohn <gljennjohn@gmail.com> wrote: > > > On Sat, 5 Nov 2016 10:41:48 -0700 > > Mark Johnston <markj@FreeBSD.org> 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 <markj@FreeBSD.org> 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. > > The behavior that you describe is most likely a consequence of r254304 (and r254544). You can test this hypothesis by setting the sysctl vm.pageout_update_period to zero.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJUyCcPFfu=s3yL%2B1uppt0YvAU_NmZroCUyxj5dqTZpeaQ%2BwzA>