Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

RES column in top(1) output

3 views
Skip to first unread message

Dmitry Sivachenko

unread,
May 21, 2013, 2:03:57 PM5/21/13
to
Hello,

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. But I get:

Mem: 55G Active, 23G Inact, 11G Wired, 3729M Cache, 9838M Buf, 97M Free
Swap: 49G Total, 14M Used, 49G Free


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

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).

It is clear I am missing something.

Thanks in advance.
_______________________________________________
freebsd-...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questi...@freebsd.org"

Charles Swiger

unread,
May 21, 2013, 2:40:30 PM5/21/13
to
On May 21, 2013, at 11:03 AM, Dmitry Sivachenko <trtr...@gmail.com> wrote:
> Hello,
>
> 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:
>
> Mem: 55G Active, 23G Inact, 11G Wired, 3729M Cache, 9838M Buf, 97M Free
> Swap: 49G Total, 14M Used, 49G Free
>
>
> 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
>
> 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,
--
-Chuck

Dmitry Sivachenko

unread,
May 22, 2013, 12:39:39 AM5/22/13
to
On 21.05.2013, at 22:40, Charles Swiger <csw...@mac.com> wrote:
>>
>> Mem: 55G Active, 23G Inact, 11G Wired, 3729M Cache, 9838M Buf, 97M Free
>> Swap: 49G Total, 14M Used, 49G Free
>>
>>
>> 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
>>
>> 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.
>


Okay, I see.

What is the correct way to obtain the amount of physical memory used by a process?

Thanks!
0 new messages