Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-06-2006, 01:56 PM   #1
Registered: Oct 2004
Location: /usr/home
Distribution: Mint, Ubuntu server, FreeBSD, Android
Posts: 362

Rep: Reputation: 32
General query: diff bw virtual vs. resident memory

In terms of the memory usage of a given application, what is the difference between virtual and resident memory? What matters most when you are trying to figure out what is using how much?

For example, at the moment, according to top, I see that Firefox is using approx 70Mb res, 137Mb virt. Which is more important?

Last edited by Kropotkin; 02-06-2006 at 01:58 PM.
Old 02-06-2006, 02:04 PM   #2
Senior Member
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
All in top man page:
RES -- Resident size (kb)
The non-swapped physical memory a task has used.

VIRT -- Virtual Image (kb)
The total amount of virtual memory used by the task. It includes all code, data and shared libraries plus pages that have been swapped out.
Old 02-06-2006, 02:08 PM   #3
Registered: Jan 2006
Location: india
Distribution: FEDORA CORE 3
Posts: 103

Rep: Reputation: 15
man pages r bliss !!
Old 02-06-2006, 06:52 PM   #4
LQ Guru
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,706
Blog Entries: 4

Rep: Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949
Application programs live in a virtual-memory environment. All the memory they ever reference is virtual, in terms of virtual addresses.

Unbeknownst to the programs, all of their virtual memory is divided by the operating system into pages. Those pages can be non-existent (never referenced), a copy of a shared library page, a page that is in real-memory right now, or a page that's been copied to the swap-file, or some combination of the above.

Applications have no idea that any of this is going on.

The Linux memory-manager tries to utilize the real-memory (SIMMs on the motherboard) as efficiently as possible, balancing all the requirements of all the processes on an ongoing basis as their requirements constantly change.

There is no hard-and-fast rule. What you do want to avoid is "thrashing," or excessive swapping. You'll know it when you see it. It ain't pretty.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
memory types - what's what: vm resident shared rss X's jonaskoelker Linux - Software 2 05-26-2005 04:59 AM
diff bet RAM & CACHE memory LinuxTiro Linux - Hardware 1 08-30-2003 12:23 PM
RH 8.0 Mapping Virtual Memory to get access to VMIC Reflective Memory PCI card. Merlin53 Linux - Hardware 0 05-05-2003 12:50 PM
memory (ram) query bigjohn Linux - Newbie 4 02-21-2003 02:36 AM
memory query bigjohn Linux - Newbie 1 11-14-2002 03:57 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:46 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration