From owner-freebsd-questions@FreeBSD.ORG Wed May 22 04:39:43 2013 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 3FC79434 for ; Wed, 22 May 2013 04:39:43 +0000 (UTC) (envelope-from trtrmitya@gmail.com) Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com [209.85.217.169]) by mx1.freebsd.org (Postfix) with ESMTP id C5ABB7CC for ; Wed, 22 May 2013 04:39:42 +0000 (UTC) Received: by mail-lb0-f169.google.com with SMTP id 10so1597346lbf.28 for ; Tue, 21 May 2013 21:39:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; bh=peTFSKryCjGmm1T1eeq7SlgKw/0PJxE54Kr5Uzztp6A=; b=VnJnHihODXb+6xs24m7ndQuYuhcF4Zzps4+37klYfr026geSP9WKFjhl7vEHTEjax0 UYZTV1Xce++GBLgynawKlO7ZGdzXRHLI0Y15f83qL3B+jSCZ9tBUzubGZa0NHS5NjWQN gcI+aYopV8cVb1qci1/bdK4GWW+QTVeapYUtyU12rADyh3Xbqto6i39BPkjLWGpbRrsm ZD0+sQ+JQvDXP3ehp5mh1ebDrojUZ8TCUy1Re7/alQqIRoQeBT9IruIHAn0YXM2s3AGw Im+6vsVTuGfN27nDizael0oxwipih7q+tsJu9pz6YjEr99aFG0S2TeJVUXOiN9WsjFnP FteQ== X-Received: by 10.112.204.100 with SMTP id kx4mr3161684lbc.17.1369197581523; Tue, 21 May 2013 21:39:41 -0700 (PDT) Received: from [10.0.1.20] (ip-95-220-128-64.bb.netbynet.ru. [95.220.128.64]) by mx.google.com with ESMTPSA id l8sm2171959lae.4.2013.05.21.21.39.40 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 21 May 2013 21:39:40 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Subject: Re: RES column in top(1) output From: Dmitry Sivachenko In-Reply-To: Date: Wed, 22 May 2013 08:39:39 +0400 Content-Transfer-Encoding: quoted-printable Message-Id: References: <24044FD7-4E2A-493F-B0CE-701C3A73169F@gmail.com> To: Charles Swiger X-Mailer: Apple Mail (2.1503) Cc: questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2013 04:39:43 -0000 On 21.05.2013, at 22:40, Charles Swiger wrote: >>=20 >> Mem: 55G Active, 23G Inact, 11G Wired, 3729M Cache, 9838M Buf, 97M = Free >> Swap: 49G Total, 14M Used, 49G Free >>=20 >>=20 >> PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU = COMMAND >> 93273 username 103 52 0 141G 115G uwait 22 25:37 = 19.82% XXX >>=20 >> So I have a machine with 96GB of RAM, no swap is used and my = process's resident size is 115G (more than physical memory). >=20 > Memory that has been allocated but not written to is associated with = the process address space in terms of accounting, but does not actually = consume physical memory. There's also copy-on-write memory (used for = the program executable code itself, which is also typically also marked = read-only), mmap()ing big sparse files or device special files like a = video framebuffer (ie, an X11 server), and probably a few other things = which can reserve lots of resident memory without actually consuming = physical memory. >=20 Okay, I see. What is the correct way to obtain the amount of physical memory used by = a process? Thanks!=