From owner-freebsd-hackers@freebsd.org Wed Oct 24 20:32:38 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F9BE106F421 for ; Wed, 24 Oct 2018 20:32:38 +0000 (UTC) (envelope-from robert.ayrapetyan@gmail.com) Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BAA7479149; Wed, 24 Oct 2018 20:32:37 +0000 (UTC) (envelope-from robert.ayrapetyan@gmail.com) Received: by mail-pl1-x635.google.com with SMTP id bb7-v6so2749105plb.13; Wed, 24 Oct 2018 13:32:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=MhRYysYrJQPyaZBO0+u5UpCPxj6BkJfd30DqXL/pqe4=; b=UQ/F0cqenJ2LdVyEvlq9s5DuXcCitiAy24VkBp49i6cIRV8w77jKWfgK+e9oDK6+ho EGIubslw7LweAUn7fmwlG3FsJA42DymIuXj4lciWDraUsSj4KSrqUeGI6e6aKpT5t6As bG82dJl3V4yW6XQBobOPYfFIUey/HD92GJK4QUbaYikAKrHOE4IreRzW44k/bqOhSEVo 2WP717QzkhfzZDTmetUpgAh69gUSCvyvjbx/9lmSM+uQ9+c5EMWJ1j/u2LqzeKvS2zHp P47usDdg7G33orrbIgIOqr72prixaHRD/ughmCdLakyDwnhr7P/z2xbnbeF3VjFDd/js qKow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=MhRYysYrJQPyaZBO0+u5UpCPxj6BkJfd30DqXL/pqe4=; b=OM0mfPYyWP4ZP5pHNTCqtPRwKaDE8S0xRZk9xVU23bh23MR2gGGAGOLxdZyN/0AeES RZAdDZWiEsU5zQKiFlVoL0VRfza3dX6TC4Bj4COwpBzSP3gwwMiYMstfZab3MuO5wUzA ULH5KCXGx11b60NWr6+HdORsIFZB9IcM9Llrnf9ZocEhMe1OqO+Zn2ovWADm7ITR+UP9 ZueE6o4MAtsPoLXUhi3UVg6A2WacvFZKbW1Jwt6D2kG+ozpYNCAG6gOmtelnUwiGNBuk eQX4sFGHE699SRBv1x9TSSEkzIxMv042yPrQpkzF9xBlmZ/2MVHoMAdvxcStcN5HfHaq ifPw== X-Gm-Message-State: AGRZ1gK4doMHnhM4Lz90BHV8QguZbjE1OEtrE9DtVmL/MsNVx1iVJqXA ZkSMk9HsbzvaOWa8XvMx/xoQdE8= X-Google-Smtp-Source: AJdET5ff9mTUWnIwL3+gdO/MekPhAwbF9K2n/LGN5+xGnvHi4eTgNB4gFhanYaacjYGsc8WR+N/nKw== X-Received: by 2002:a17:902:9698:: with SMTP id n24-v6mr3926595plp.9.1540413156265; Wed, 24 Oct 2018 13:32:36 -0700 (PDT) Received: from [192.168.1.113] (c-73-202-42-181.hsd1.ca.comcast.net. [73.202.42.181]) by smtp.gmail.com with ESMTPSA id d10-v6sm5407466pgp.26.2018.10.24.13.32.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Oct 2018 13:32:35 -0700 (PDT) Subject: Re: Sudden grow of memory in "Laundry" state From: Robert To: Mark Millard , Rozhuk Ivan Cc: FreeBSD , Mark Johnston References: <55b0dd7d-19a3-b566-0602-762b783e8ff3@gmail.com> <20180911005411.GF2849@raichu> <20180911150849.GD92634@raichu> <104be96a-c16b-7e7c-7d0d-00338ab5a106@gmail.com> <20180928152550.GA3609@raichu> <20181024211237.302b72d9@gmail.com> <981C887D-78EB-46D2-AEE5-877E269AF066@yahoo.com> Message-ID: Date: Wed, 24 Oct 2018 13:32:34 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US 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: Wed, 24 Oct 2018 20:32:38 -0000 Here is one more from another identical machine: Mem: 1237M Active, 10G Inact, 15G Laundry, 3591M Wired, 846M Free ARC: 81M Total, 869K MFU, 46M MRU, 32K Anon, 491K Header, 34M Other      4664K Compressed, 43M Uncompressed, 9.36:1 Ratio Swap: 32G Total, 1152M Used, 31G Free, 3% Inuse and one unaffected: Mem: 392M Active, 9621M Inact, 136K Laundry, 6106M Wired, 15G Free ARC: 110M Total, 2321K MFU, 54M MRU, 165K Anon, 643K Header, 53M Other      6252K Compressed, 50M Uncompressed, 8.25:1 Ratio Swap: 32G Total, 11M Used, 32G Free All machines are identical and are running same single active process. There are no memory leaks in the process code (at least not through the mmap). Size of all "Active" allocations is roughly 1.5-2GB on all machines. On 10/24/18 11:25 AM, Robert wrote: > Sorry, that wasn't my output, mine (related to the screenshot I've > sent earlier) is: > > Mem: 1701M Active, 20G Inact, 6225M Laundry, 2625M Wired, 280M Free > ARC: 116M Total, 6907K MFU, 53M MRU, 544K Anon, 711K Header, 55M Other >      6207K Compressed, 54M Uncompressed, 8.96:1 Ratio > Swap: 32G Total, 15G Used, 17G Free, 46% Inuse > > > I'm OK with a low "Free" memory if OS can effectively allocate from > "Inactive", > > but I'm worrying about a sudden move of a huge piece of memory into > "Swap" without any relevant mmap calls. > > > My question is: what else (except mmap) may reduce "Free" memory and > increase "Laundry"\"Swap" in the system? > > Thanks. > > > On 10/24/18 9:34 AM, Mark Millard wrote: >> On 2018-Oct-24, at 11:12 AM, Rozhuk Ivan wrote: >> >>> On Wed, 24 Oct 2018 10:19:20 -0700 >>> Robert wrote: >>> >>>> So the issue is still happening. Please check attached screenshot. >>>> The green area is "inactive + cached + free". >>>> >>>>   . . . >>> +1 >>> Mem: 845M Active, 19G Inact, 4322M Laundry, 6996M Wired, 1569M Buf, >>> 617M Free >>> Swap: 112G Total, 19M Used, 112G Free >> Just a limited point based on my understanding of "Buf" in >> top's display . . . >> >> If "cached" means "Buf" in top's output, my understanding of Buf >> is that it is not a distinct memory area. Instead it totals the >> buffer space that is spread across multiple states: Active, >> Inactive, Laundry, and possibly Wired(?). >> >> In other words: TotalMemory = Active+Inact+Laundry+Wired+Free. >> If Buf is added to that then there is double counting of >> everything included in Buf and the total will be larger >> than the TotalMemory. >> >> Also Inact+Buf+Free may double count some of the Inact space, >> the space that happens to be inactive buffer space. >> >> I may be wrong, but that is my understanding. >> >> >> === >> Mark Millard >> marklmi at yahoo.com >> ( dsl-only.net went >> away in early 2018-Mar) >>