Operating System - HP-UX
1753696 Members
5558 Online
108799 Solutions
New Discussion юеВ

Re: What constitutes VSS or Virtual Memory?

 
Alzhy
Honored Contributor

What constitutes VSS or Virtual Memory?

Is a process is reported as having a total of 152MB as RSS and 900 MB as VSS what does it tell me?

Of the 900MB VSS -- what would be allocated from "SWAP Space"?


I have Glance.

It seems all of a Process Text, Shmem, Data. Stack, Other has an RSS Component and a VSS component. And it is in Data where RSS and VSS is allocated to the most.

But how does VSS alocate from SWAP space?

And is it a Good Idea to have massive amounts of SWAP just to address those "wayward" scenarios where processes go wild?

I've kept my SWAP allocation to about 60% average peak utilization. BUt there's clamour to add "more" than the 256GB there already exists.


Hakuna Matata.
3 REPLIES 3
Dennis Handly
Acclaimed Contributor

Re: What constitutes VSS or Virtual Memory?

>Of the 900MB VSS - what would be allocated from "SWAP Space"?

I assume all of it.

>is it a Good Idea to have massive amounts of SWAP just to address those "wayward" scenarios where processes go wild?

You can also use maxdsiz to limit them. Unfortunately if you don't have maxdsiz small enough, one bad apple can kill everyone else.

>But there's clamour to add "more" than the 256GB there already exists.

What does "swapinfo -tam" show? Do it during your heavy loads.
Heironimus
Honored Contributor

Re: What constitutes VSS or Virtual Memory?

Knowing what VSS really means requires an understanding of how the process in question works. It's typically just the measure of address space that's in use, which includes things that aren't really part of the process memory like shared libraries, memory-mapped files, and malloc'd-but-unused memory. However, some or all of the VSS size will be reserved in swap depending on the executable's allocation policy. You can easily end up needing an enormous swap size just to allow for all your process reservations, even though very little of that reserved space should actually be in use on a properly-sized system.
Preeti Agarwal
New Member

Re: What constitutes VSS or Virtual Memory?

VSS (or Virtual Set Size) is the total accessible address space of a process (obtained by execing, mmaping, shmget..). If the process accesses any portion outside this space, it will exit with a SIGSEGV.

When the kernel allocates this virtual space, it may also reserve swap space for these portions. Swap is reserved to ensure that if this process needs to be swapped to a swap device (due to memory pressure), it will have space in the swap device (else the process will die abnormally at any time). Swap is not reserved for objects which can be re-read from a file (e.g. text of the executable).

Whenever the process accesses an address, an actual physical page is allocated to it. The total number of actual physical pages associated with the process is termed as RSS or Resident Set Size.