Solved

OS paging / swapping

Posted on 2002-03-08
3
414 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
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 several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

762 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

20 Experts available now in Live!

Get 1:1 Help Now