From owner-freebsd-hackers@freebsd.org Sun May 19 16:40:35 2019 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 8049415B2380 for ; Sun, 19 May 2019 16:40:35 +0000 (UTC) (envelope-from rwmaillists@googlemail.com) Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D69066B952 for ; Sun, 19 May 2019 16:40:33 +0000 (UTC) (envelope-from rwmaillists@googlemail.com) Received: by mail-wr1-x436.google.com with SMTP id d18so11904291wrs.5 for ; Sun, 19 May 2019 09:40:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pTRWWJ8+GQS26Hm89JbizCcNtCo974tQAHQynzTSKOk=; b=Sx1wLPmQka++x3YrgHdb02Pu+hgM+Ozql8U8EoqwsiPyZJ1pUOqKPRTfs5O2xAxOOi yLQ0BekRdRsZaDYVKC4gz8Mvtp1WtMyL8GMB/rKtUMTxDD6tVELs/YVkMvrFmMcbHmBl lsaEFd+a4fIzuA9WZWwOD5LrsgTYwQARifygLEcuS8F7MjsUyp/i/3rs3TbiYWy4t1KN VQHzxXc9jGHZ52UHNjjAFPTQrB2pdcaG1JzuF2rrtKr3KqMDxKV1QZJ/D6R2bOp6jw+m 7pgt8tMPGu8vM81SUlnXmQLfLAkHIfDoAwvmdbCwF1SsgjigVoF7pr/lYn+HgesuNbmU bpVw== X-Gm-Message-State: APjAAAWB+99xysBprjKqdZ89SMupaIITzJKn3AIZnKr1s3qj7G0ZQrt/ tFt/sIoauTPRk8Q+aB/Hj1IPB44eQkg= X-Google-Smtp-Source: APXvYqxU9KbzZflkpRo4JXu7cbDHyosdTybiR1SEmavZLxxMQ7QWIFb7dwUxoJA73u+LvMGXn3oY5Q== X-Received: by 2002:adf:9ccc:: with SMTP id h12mr9793636wre.21.1558284032367; Sun, 19 May 2019 09:40:32 -0700 (PDT) Received: from gumby.homeunix.com ([2.121.235.191]) by smtp.gmail.com with ESMTPSA id g13sm11627381wrw.63.2019.05.19.09.40.31 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 19 May 2019 09:40:31 -0700 (PDT) Date: Sun, 19 May 2019 17:40:30 +0100 From: RW To: freebsd-hackers@freebsd.org Subject: Re: total configured swap exceeds maximum Message-ID: <20190519174030.0206eb41@gumby.homeunix.com> In-Reply-To: <18598E43-CFB1-4C3C-BC46-A4F0DEB569CF@yahoo.com> References: <20190519160033.0b0e47fa@gumby.homeunix.com> <18598E43-CFB1-4C3C-BC46-A4F0DEB569CF@yahoo.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; amd64-portbld-freebsd12.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: D69066B952 X-Spamd-Bar: ------ X-Spamd-Result: default: False [-6.72 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; FREEMAIL_FROM(0.00)[googlemail.com]; TO_DN_NONE(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[googlemail.com:+]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; DMARC_POLICY_ALLOW(-0.50)[googlemail.com,quarantine]; NEURAL_HAM_SHORT(-0.95)[-0.950,0]; RECEIVED_SPAMHAUS_PBL(0.00)[191.235.121.2.zen.spamhaus.org : 127.0.0.10]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[googlemail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; DWL_DNSWL_NONE(0.00)[googlemail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[googlemail.com:s=20161025]; RCVD_TLS_LAST(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; IP_SCORE(-2.76)[ip: (-9.29), ipnet: 2a00:1450::/32(-2.20), asn: 15169(-2.27), country: US(-0.06)]; RCVD_IN_DNSWL_NONE(0.00)[6.3.4.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0] 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: Sun, 19 May 2019 16:40:35 -0000 On Sun, 19 May 2019 08:53:15 -0700 Mark Millard wrote: > On 2019-May-19, at 08:33, Wojciech Puchar wrote: > > >>> what should i set kern.maxswzone to ? it is 0 > >>> > >>> # sysctl kern.maxswzone > >>> kern.maxswzone: 0 > >> > >> IIRC for amd64 kern.maxswzone=0 represents the maximum allowed. > > so i cannot have more VM than 5*RAM? > > There is is a kernel memory tradeoff structure to increase in > kern.maxswzone being larger as I understand. Quoting "man 8 loader" > (but the "eight times" is system/architecture specific and will > likely be different): > > kern.maxswzone > Limits the amount of KVM to be used to hold swap > metadata, which directly governs the maximum amount of swap the > system can support, at the rate of approximately 200 > MB of swap space per 1 MB of metadata. This value is specified > in bytes of KVA space. If no value is provided, the > system allocates enough memory to handle an amount of swap that > corresponds to eight times the amount of physical > memory present in the system. In swap_pager.c /* * Initialize our zone, guessing on the number we need based * on the number of pages in the system. */ n = vm_cnt.v_page_count / 2; if (maxswzone && n > maxswzone / sizeof(struct swblk)) n = maxswzone / sizeof(struct swblk); In i386 maxswzone defaults to a specific value and it is possible to increase the size. In amd64 maxswzone defaults to 0 which give the highest value of n permitted.