Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 441
  • Last Modified:

OS paging / swapping

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
maliksl4141
Asked:
maliksl4141
  • 2
1 Solution
 
Nisus091197Commented:
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
 
maliksl4141Author Commented:
thanks for introducing me to 'vmstat'
0
 
Nisus091197Commented:
my pleasure.

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

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now