LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 07-08-2016, 01:14 PM   #1
doobinnm
LQ Newbie
 
Registered: Jul 2016
Posts: 2

Rep: Reputation: Disabled
How can RSS be > VSZ in ps ??


From everything I understand, a process's VSZ (virtual memory size) should be greater than its RSS (resident set size). Yet I see cases on a regular basis where this is not true. I am running Redhat Linux Server release 6.3.

Here is an example, looking at the process "Xorg":
$ ps -p 17316 -o pid,comm,rss,vsz,sz
PID COMMAND RSS VSZ SZ
17316 Xorg 314076 166932 41733

(I verified the RSS and VSZ numbers match what is in the /proc/PID/status file, to make sure truncation of the ps output could not be blamed.)
This shows that the RSS is almost twice as big as the VSZ. This runs counter to my understanding of RSS & VSZ.

Is there some sort of shared data that is calcuated in the RSS that is not also included in the VSZ calculation?
thx in advance...
 
Old 07-10-2016, 07:16 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,138

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
The two are unrelated. VSZ is the total virtual address space which has been mapped by a process. Note that this can include unallocated space and space which is not resident. RSS is amount of space that is resident in memory and available to the process but may not be mapped. Either of the two may include space that is shared by other processes.
 
Old 07-10-2016, 09:34 AM   #3
doobinnm
LQ Newbie
 
Registered: Jul 2016
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thank you, smallpond. In reading your answer, I am assuming that there is some kind of memory that RSS accounts for - the part that you describe as "but may not be mapped" by a process, which is NOT included in the VSZ? Why is this? Is it because of extra space leftover in allocated pages in physical memory due to partial pages being requested/mapped? In my Xorg example I referenced, there were approximately 147+ mb more (almost 2x) in RSS than in VSZ. Perhaps this 147+ mb is the sum of the "leftovers" ?
 
  


Reply



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
LXer: RSS Puppy: a lightweight, open source RSS reader LXer Syndicated Linux News 0 02-15-2016 10:05 PM
Vsz memory size balainemb Linux - Kernel 0 10-07-2009 11:55 PM
Monitoring Memory, VSZ or RSS disordr Linux - Server 1 09-08-2008 09:51 PM
Why is VSZ more than RSS in ps aux even if I'm not using any swap? weijie90 Linux - Hardware 4 08-20-2008 06:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

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

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