From owner-freebsd-stable@FreeBSD.ORG Sat Mar 21 00:35:19 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 96016D3C for ; Sat, 21 Mar 2015 00:35:19 +0000 (UTC) Received: from elsa.codelab.cz (elsa.codelab.cz [94.124.105.4]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5205E3EA for ; Sat, 21 Mar 2015 00:35:18 +0000 (UTC) Received: from elsa.codelab.cz (localhost [127.0.0.1]) by elsa.codelab.cz (Postfix) with ESMTP id 5996D2842B for ; Sat, 21 Mar 2015 01:35:15 +0100 (CET) Received: from illbsd.quip.test (ip-89-177-50-74.net.upcbroadband.cz [89.177.50.74]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by elsa.codelab.cz (Postfix) with ESMTPSA id B5A6D28422 for ; Sat, 21 Mar 2015 01:35:13 +0100 (CET) Message-ID: <550CBCE3.6040908@quip.cz> Date: Sat, 21 Mar 2015 01:35:47 +0100 From: Miroslav Lachman <000.fbsd@quip.cz> User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:35.0) Gecko/20100101 Firefox/35.0 SeaMonkey/2.32 MIME-Version: 1.0 To: freebsd-stable Stable Subject: rctl logs swapuse even if swap is empty Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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: Sat, 21 Mar 2015 00:35:19 -0000 I tried RCTL for the first time, so maybe it is error on my side. I have system with 2 jail with the following rctl.conf jail:fox:swapuse:log=32M jail:fox:swapuse:deny=512M jail:fox:memoryuse:log=3G jail:fox:memoryuse:deny=4096M jail:olymp:swapuse:log=32M jail:olymp:swapuse:deny=512M jail:olymp:memoryuse:log=2G jail:olymp:memoryuse:deny=3072M 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? # uname -srmi FreeBSD 10.1-RELEASE-p8 amd64 GEN_RCTL Kernel is GENERIC + RCTL options Miroslav Lachman