From owner-freebsd-questions@freebsd.org Wed Jan 16 20:45:12 2019 Return-Path: Delivered-To: freebsd-questions@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 1E9EE1494DFA for ; Wed, 16 Jan 2019 20:45:12 +0000 (UTC) (envelope-from byrnejb@harte-lyne.ca) Received: from mx32.harte-lyne.ca (mx32.harte-lyne.ca [216.185.71.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx32.harte-lyne.ca", Issuer "CA_HLL_ISSUER_2016" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 090BC86CDB for ; Wed, 16 Jan 2019 20:45:10 +0000 (UTC) (envelope-from byrnejb@harte-lyne.ca) Received: from mx32.harte-lyne.ca (unknown [127.0.32.1]) by mx32.harte-lyne.ca (Postfix) with ESMTP id 79B68B685; Wed, 16 Jan 2019 15:45:10 -0500 (EST) X-Virus-Scanned: amavisd-new at harte-lyne.ca Received: from mx32.harte-lyne.ca ([127.0.32.1]) by mx32.harte-lyne.ca (mx32.harte-lyne.ca [127.0.32.1]) (amavisd-new, port 10024) with ESMTP id bJhOk1AHCE1l; Wed, 16 Jan 2019 15:45:08 -0500 (EST) Received: from webmail.harte-lyne.ca (mx32.harte-lyne.ca [216.185.71.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx32.harte-lyne.ca (Postfix) with ESMTPSA id B0D24B67A; Wed, 16 Jan 2019 15:45:07 -0500 (EST) Received: from 216.185.71.44 (SquirrelMail authenticated user byrnejb_hll) by webmail.harte-lyne.ca with HTTP; Wed, 16 Jan 2019 15:45:08 -0500 Message-ID: <8f1f1f6c5532a9b076d878ff98a9044c.squirrel@webmail.harte-lyne.ca> In-Reply-To: <20190116181146.375e2358d2091380c74a8291@sohara.org> References: <35c451bc1733004b7d868f60da68c639.squirrel@webmail.harte-lyne.ca> <20190116173621.9d90157c1adf526298763415@sohara.org> <0c45ab67b1480d39dd87059495f6a27c.squirrel@webmail.harte-lyne.ca> <20190116181146.375e2358d2091380c74a8291@sohara.org> Date: Wed, 16 Jan 2019 15:45:08 -0500 Subject: Re: Memory usage appears a bit high From: "James B. Byrne" To: "Steve O'Hara-Smith" Cc: byrnejb@harte-lyne.ca, freebsd-questions@freebsd.org Reply-To: byrnejb@harte-lyne.ca User-Agent: SquirrelMail/1.4.23 [SVN] MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Rspamd-Queue-Id: 090BC86CDB X-Spamd-Bar: -------- X-Spamd-Result: default: False [-8.49 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[byrnejb@harte-lyne.ca]; RBL_COMPOSITE_RCVD_IN_DNSWL_MED_DWL_DNSWL_LOW(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:216.185.71.0/26]; REPLYTO_ADDR_EQ_FROM(0.00)[]; RCVD_DKIM_ARC_DNSWL_MED(-0.50)[]; DKIM_TRACE(0.00)[harte-lyne.ca:+]; MX_GOOD(-0.01)[cached: mx32.harte-lyne.ca]; HAS_X_PRIO_THREE(0.00)[3]; RCVD_IN_DNSWL_MED(-0.20)[32.71.185.216.list.dnswl.org : 127.0.4.2]; DMARC_POLICY_ALLOW(-0.50)[harte-lyne.ca,quarantine]; NEURAL_HAM_SHORT(-1.00)[-0.998,0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:12021, ipnet:216.185.64.0/20, country:CA]; IP_SCORE(-3.78)[ip: (-9.91), ipnet: 216.185.64.0/20(-4.94), asn: 12021(-3.96), country: CA(-0.09)]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[harte-lyne.ca:s=dkim_hll]; RCVD_COUNT_FIVE(0.00)[5]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DWL_DNSWL_LOW(0.00)[harte-lyne.ca.dwl.dnswl.org : 127.0.4.1]; TO_MATCH_ENVRCPT_SOME(0.00)[] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2019 20:45:12 -0000 On Wed, January 16, 2019 13:11, Steve O'Hara-Smith wrote: > On Wed, 16 Jan 2019 12:46:39 -0500 > "James B. Byrne" wrote: > >> >> >> On Wed, January 16, 2019 12:36, Steve O'Hara-Smith wrote: >> > On Wed, 16 Jan 2019 12:31:14 -0500 >> > "James B. Byrne via freebsd-questions" >> >> > wrote: >> > >> >> We have an Cyrus IMAP service running on a BHyve FreeBSD-11.2p7 >> vm. >> >> It has 4 Gb allocated. I have noticed that top reports this: >> >> >> >> Mem: 164M Active, 204M Inact, 22M Laundry, 3426M Wired, 111M Free >> > >> > Are you running ZFS ? If so then most of the wired memory is >> > probably ARC. >> > >> >> Yes, we are running the vm using zfs. >> >> ARC: 2432M Total, 451M MFU, 1683M MRU, 8480K Anon, 38M Header, >> 252M Other >> 1828M Compressed, 3768M Uncompressed, 2.06:1 Ratio > > The ARC - ZFS cache is always in wired memory because it's kernel > space buffers and it does have a tendency to eat all the memory > it can get unless you constrain it by setting vfs.zfs.arc_max sysctl. > As I have never meddled with the sysctl settings on this bhyve host I infer that this setting in sysctl is calculated based on the total memory allocated when the vm is created: vfs.zfs.arc_max: 3043799040 How much should be committed to arc in a 4GB system? What are the benefits / costs of more or less ram allocated to arc? -- *** e-Mail is NOT a SECURE channel *** Do NOT transmit sensitive data via e-Mail Do NOT open attachments nor follow links sent by e-Mail James B. Byrne mailto:ByrneJB@Harte-Lyne.ca Harte & Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3