Solved

OS paging / swapping

Posted on 2002-03-08
3
416 Views
Last Modified: 2013-12-27
Hi..i;m new to solaris.
i need some clarification on
OS paging / swapping .

1) what it is.
2) how it could affect solaris server
3) how to monitor/control it.


 tq.
0
Comment
Question by:maliksl4141
  • 2
3 Comments
 
LVL 5

Accepted Solution

by:
Nisus091197 earned 10 total points
ID: 6851032
Hi,

This is a brief introduction ...

1.

Paging / swapping are related to memory usage.  When a process is created the OS reserves a certain amount of swap space in case the process needs to be written to the swap file/partition if the physical memory runs short.

Paging is part of the normal process of reading in code from programs etc.

2.

If a system is swapping processes out of memory a lot then this is indicative of a shortage in physical memory.  The performance of the system can be drastically effected as accessing swapped processes is around 1000 times slower than from physical memory.  Disk I/O is very slow compared with RAM.

A system that is doing a lot of swapping often appears idle as the CPU is waiting for the process to be reloaded into memory.  Closer examination will reveal that a number of processes are blocked while they await their turn.

3.

Under Solaris, we use 'vmstat' to monitor physical and virtual memory (i.e. swap space).

If you suspect a system of swapping a lot, then run:

vmstat 5

and let it run for several minutes.

The numbers in the middle columns should ideally be 0 but 200-300 is not uncommon on busy database servers.

Have a look at the vmstat man page for more detailed info on this very handy tool.

The best way to improve the situation is to add more RAM and/or reduce the load on the server.  Some processes like database servers and BroadVision instances can take up a lot of memory.

The 'ps' command can tell you how much memory a process is using (see the RES column).

Swap space is modified using the 'swap' command.  'swap -a' can add a new swap file temporarily, 'swap -l' will list the swap devices.

Hope this helps,

Regards, Nisus
http://www.omnimodo.com
0
 

Author Comment

by:maliksl4141
ID: 6851979
thanks for introducing me to 'vmstat'
0
 
LVL 5

Expert Comment

by:Nisus091197
ID: 6852027
my pleasure.

When you get time check out iostat and netstat.  These are very useful also.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

28 Experts available now in Live!

Get 1:1 Help Now