From owner-freebsd-stable@FreeBSD.ORG Fri Mar 27 02:58:55 2015 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E0526EBD; Fri, 27 Mar 2015 02:58:55 +0000 (UTC) Received: from mail-ig0-x236.google.com (mail-ig0-x236.google.com [IPv6:2607:f8b0:4001:c05::236]) (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 A14D32CE; Fri, 27 Mar 2015 02:58:55 +0000 (UTC) Received: by ignm3 with SMTP id m3so24660200ign.0; Thu, 26 Mar 2015 19:58:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=pSUoS/QMhWlm1Xv6O7SZZqqpmd1/N5hKGAQRXRO2wEE=; b=k2snxicHjiIZzZBf9xrUlQnV5a209XvWwknf+aGJGV8y9EPz/xTta7UFww/wAd34nZ m7xaFwP08tvM3C9XGz8EdIzxyLM0Fh3KM9B2x7TkF7XtQ13MEq1/zpLTPfS3aQbkJ/C4 FvjnV0J51Y6Lntluk9AiBN5xS6zbYa/ZZNKj+Dp9aVHzXUH8YZCJpomAbi/WFn01BQh/ mTlPTlKnvVOi3tZkMs84+oZJvCmyL6dOv9I1J8lJGTb8qYM2E6Wl4ykbtFmoWiJL/I3c UgNAX88TtDZ2kLb/yzZvDR1FhObjO3oC2lcv87/BUz5MQzyegEqiZ9eYz1XRb/O1MVpQ Ty5w== MIME-Version: 1.0 X-Received: by 10.42.123.77 with SMTP id q13mr8966336icr.29.1427425134999; Thu, 26 Mar 2015 19:58:54 -0700 (PDT) Sender: jdavidlists@gmail.com Received: by 10.36.67.139 with HTTP; Thu, 26 Mar 2015 19:58:54 -0700 (PDT) In-Reply-To: <5514B220.6080308@multiplay.co.uk> References: <20150316232404.GM2379@kib.kiev.ua> <5514B220.6080308@multiplay.co.uk> Date: Thu, 26 Mar 2015 22:58:54 -0400 X-Google-Sender-Auth: ZKKY5exEolGe8F8hZTp0T5Ml3K4 Message-ID: Subject: Re: Significant memory leak in 9.3p10? From: J David To: Steven Hartland , "freebsd-questions@freebsd.org" Content-Type: text/plain; charset=UTF-8 Cc: freebsd-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: Fri, 27 Mar 2015 02:58:56 -0000 On Thu, Mar 26, 2015 at 9:28 PM, Steven Hartland wrote: > Does vmstat -m or vmstat -z shed any light? None, as those show kernel memory usage, not user space. Looking at them anyway shows nothing unusual, consuming large amounts of memory, or disproportionate to the kernel memory shown as in-use. The list of suspects that can consume user memory without being associated with any user process is very short: some sort of anonymous, persistent shared memory object. Konstantin offered a partial list of some likely candidates in response to the initial message, including: - NO: tmpfs mounts (not used) - NO: swap-backed md disks (not used) - PROBABLY NO: sysv shared memory (believed not to be used) - MAYBE: possibly posix shared memory (unknown whether used) - MAYBE: anonymous mmap segments that have somehow got lost (i.e. file descriptor is hanging around in the kernel somewhere) -- proposed by someone off-list - MAYBE: others? Of the two remaining known possibilities, posix shared memory seems more likely than an unknown mmap bug. Unfortunately, I have not found any way to gather statistics and/or get/set limits on posix shared memory usage. Does such a method exist? Really, it would be great if there were a tool that could walk the entire list of VM blocks and generate some kind of report or statistics (like vmstat -z or vmstat -m, but for VM rather than kernel memory). As it is, we are reduced to guessing what might be going on, which is decidedly suboptimal. However, I have no idea if such a tool exists, if it is even possible to write, or (if it is) how to go about writing it. Thanks!