From owner-freebsd-stable@FreeBSD.ORG Mon Mar 30 20:54:05 2015 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5925B50C for ; Mon, 30 Mar 2015 20:54:05 +0000 (UTC) Received: from mail-wi0-x22e.google.com (mail-wi0-x22e.google.com [IPv6:2a00:1450:400c:c05::22e]) (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 DA56D3DA for ; Mon, 30 Mar 2015 20:54:04 +0000 (UTC) Received: by wibg7 with SMTP id g7so828868wib.1 for ; Mon, 30 Mar 2015 13:54:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=3DCmcaN0V60cY+hFEgpsZySPQP/l/+V+P5q8DpFI8E8=; b=yaZVUjw5f7AeBSX4nef6H7F/hjP/Yc6ANTVv0dzkppj2aQodVrWY36nuveE4R/74yq HjTl9CV8zwMKJnm7sXVqJlpn6k2U/WHxZz6Zf5IHlQquls284ZPnLIXnDFuCh7nPPpIr nbEe4dyzwxUaDWe005uunKwzUXztoB4PDOhA01GfTh1MXLD+maPITV0nckosLCGHuHaI A2puGdsvy3waH1w5Gmf0K51b+QISGc05tipnxJu4Dw62JGv2SCPwfNHR+OGQG6IrAIi/ 1ScKNF3PqwwFWOt6VBMqeUUGceCzi5c3STpRf1U6FDNvKn3pdC+KsoVqarjCz030dx1W jlCg== X-Received: by 10.194.211.104 with SMTP id nb8mr68747624wjc.51.1427748843192; Mon, 30 Mar 2015 13:54:03 -0700 (PDT) Received: from brick.home (abvb139.neoplus.adsl.tpnet.pl. [83.8.199.139]) by mx.google.com with ESMTPSA id ff4sm7356202wib.9.2015.03.30.13.54.02 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Mar 2015 13:54:02 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Mon, 30 Mar 2015 22:54:00 +0200 From: Edward Tomasz =?utf-8?Q?Napiera=C5=82a?= To: Miroslav Lachman <000.fbsd@quip.cz> Subject: Re: rctl logs swapuse even if swap is empty Message-ID: <20150330205400.GD12290@brick.home> Mail-Followup-To: Miroslav Lachman <000.fbsd@quip.cz>, freebsd-stable Stable References: <550CBCE3.6040908@quip.cz> <550F3729.5020208@quip.cz> <5517CB3F.5070004@quip.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5517CB3F.5070004@quip.cz> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: freebsd-stable Stable X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2015 20:54:05 -0000 It's been a while since I last touched that part of code, but I believe the "swapuse" limit is swap reservation. In other words, the amount of swap that would be used if the system had to swap, in the worst case scenario. On 0329T1151, Miroslav Lachman wrote: > Hello Edward, > I am trying to contact you directly, because you are the author of RCTL. > Can you shed some light on this issue? I still have a problem with > understanding this swapuse issue. Now I have a monitoring of all values > reported by "rctl -u jail:fox" and there are values like 60GB of > swapuse. It doesn't make sense to me. > If this is a bug, I can send you a CSV log file, od ODS (LibreOffice > Calc) with graph, or MRTG graphs of all values. > > Miroslav Lachman > > https://lists.freebsd.org/pipermail/freebsd-stable/2015-March/082019.html > > > Miroslav Lachman wrote on 03/22/2015 22:42: > > Miroslav Lachman wrote on 03/21/2015 01:35: > >> I tried RCTL for the first time, so maybe it is error on my side. > > > > [...] > > > >> Both jails are small webservers with PHP + Apache. They do not use much > >> memory and they really do not user any swap space. (according to top and > >> swapinfo) > >> > >> > >> # swapinfo -h > >> Device 1K-blocks Used Avail Capacity > >> /dev/mirror/gm0s1b 16777216 0B 16G 0% > >> > >> > >> # rctl -hu jail:fox | grep swap > >> swapuse=0 > >> > >> > >> Processes in both jails are logged as using more than 32MB of swap: > >> > >> Mar 21 01:18:55 neon kernel: rctl: rule "jail:fox:swapuse:log=33554432" > >> matched by pid 20783 (httpd), uid 80, jail fox > >> Mar 21 01:18:55 neon kernel: rctl: rule "jail:fox:swapuse:log=33554432" > >> matched by pid 20787 (httpd), uid 80, jail fox > >> Mar 21 01:18:58 neon kernel: rctl: rule "jail:fox:swapuse:log=33554432" > >> matched by pid 19207 (httpd), uid 80, jail fox > >> Mar 21 01:18:58 neon kernel: rctl: rule "jail:fox:swapuse:log=33554432" > >> matched by pid 20790 (sh), uid 0, jail fox > >> Mar 21 01:18:58 neon kernel: rctl: rule "jail:fox:swapuse:log=33554432" > >> matched by pid 20792 (sh), uid 0, jail fox > >> Mar 21 01:18:58 neon kernel: rctl: rule > >> "jail:olymp:swapuse:log=33554432" matched by pid 20793 (sh), uid 0, jail > >> olymp > >> Mar 21 01:18:58 neon kernel: rctl: rule > >> "jail:olymp:swapuse:log=33554432" matched by pid 20795 (sh), uid 0, jail > >> olymp > >> > >> Is it expected? I do not think so. > >> Or am I doing something wrong with rctl? > > > > This is really strange. FOP (Java application) in jail is failing unless > > rctl swapuse is set to 7GB or more. > > > > Does swapuse means anything completely different than what is swapinfo > > or top reporting? > > > > The same web services with FOP is running completely fine on real server > > with 2GB of physical RAM installed and less than 5GB of swap partition > > (swap is empty). But it is not working in jail if RCTL is set to > > swapuse:deny=4GB or memoryuse:deny=4GB. > > > > Can somebody explain it? > > > > Miroslav Lachman > > _______________________________________________ > > freebsd-stable@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" > > >