1821413 Members
2444 Online
109633 Solutions
New Discussion юеВ

Re: Swap utilization

 
Chakravarthy_1
Occasional Advisor

Swap utilization

Hi Guys,

I have a doubt regarding swap utilization. As per my understanding the system utilizes swap space olny when there is insufficient real memory(RAM). I see swap utilization even when there is lot of memory available on the system. Please explain under what circumstances this could occur.


Regards,
Pathri.
5 REPLIES 5
Bill Hassell
Honored Contributor

Re: Swap utilization

Programs that use memory mapped files will also use a small amount of swap space. NOTE: usage and reservation are different. Usage means that pages have been written from deactivated processes while reserved is just anticipating possible future use.


Bill Hassell, sysadmin
Reshma Malusare
Trusted Contributor

Re: Swap utilization

Hi,
About swap utilization :
Swap space is an area on a high-speed storage device, reserved for use by the virtual memory
system for paging processes.
Physical memory is a finite resource on a computer. This means that only so many processes
can fit into physical memory at any one moment in time, even though many more processes
may actually be ready to run or execute. While executing, a program├в s pages of data and instructions (text) are copied to and from secondary storage as needed. This is referred to as demand paging. Generally, the text portion of a program does not change as the program
executes. Therefore, when needed, text is copied into RAM from the file containing the
executable. The data pages of an executing program do change. Therefore, if a data page must be removed from RAM to free up space for other pages, it must first be copied to the swap space.

Available swap on a system consists of all swap space enabled as device and file system swap. To find how much swap space is presently available on your system and how much is being used, use SAM or run the command swapinfo.

The output of swapinfo tells you the type of swap by location, how much of it is available, how much is used, how much is free, and how much is reserved but not allocated. For more information, refer to swapinfo(1M).

for reference please read below link:
http://docs.hp.com/en/B2355-90672/ch06s03.html?jumpid=reg_R1002_USEN
Chakravarthy_1
Occasional Advisor

Re: Swap utilization

Hi,

Yes i agree to most of you points but you mentioned

The data pages of an executing program do change. Therefore, if a data page must be removed from RAM to free up space for other pages, it must first be copied to the swap space.

My question was when there is sufficient RAM why do the Data pages have to be swapped to disk.

Bye.
Bill Hassell
Honored Contributor

Re: Swap utilization

How did you measure available RAM? If you did not change the dbc_max_pct then it may occupy 50% of your RAM and will not be reported with ps, top or ipcs.


Bill Hassell, sysadmin
Chakravarthy_1
Occasional Advisor

Re: Swap utilization

Hi,

I saw it through glance utility on unix.

Thanks,
Bye.