From owner-freebsd-questions@FreeBSD.ORG Tue May 21 19:40:42 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 5AF95EF6 for ; Tue, 21 May 2013 19:40:42 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from st11p05mm-asmtp002.mac.com (st11p05mm-asmtpout002.mac.com [17.172.108.237]) by mx1.freebsd.org (Postfix) with ESMTP id 3770F922 for ; Tue, 21 May 2013 19:40:41 +0000 (UTC) Received: from cswiger1.apple.com (unknown [17.209.4.71]) by st11p05mm-asmtp002.mac.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Jan 3 2012)) with ESMTPSA id <0MN5006ZYVVJX040@st11p05mm-asmtp002.mac.com> for questions@freebsd.org; Tue, 21 May 2013 18:40:32 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.10.8626,1.0.431,0.0.0000 definitions=2013-05-21_05:2013-05-21,2013-05-21,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=2 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=6.0.2-1305010000 definitions=main-1305210187 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: Charles Swiger In-reply-to: <24044FD7-4E2A-493F-B0CE-701C3A73169F@gmail.com> Date: Tue, 21 May 2013 11:40:30 -0700 Content-transfer-encoding: quoted-printable Message-id: References: <24044FD7-4E2A-493F-B0CE-701C3A73169F@gmail.com> To: Dmitry Sivachenko 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: Tue, 21 May 2013 19:40:42 -0000 On May 21, 2013, at 11:03 AM, Dmitry Sivachenko = wrote: > Hello, >=20 > Can you please explain me the meaning of RES column in top(1) output: > as far as I understand from man-page, it is resident portion of the = process, that is the amount of memory process takes from RAM. Yes, that's the definition. > But I get: >=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). 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. Regards, --=20 -Chuck