Tuesday, June 21, 2005

Why do swap -l, swap -s and /tmp disagree about the amount of swap

3.76) How can I grow a UFS filesystem?

You can grow but not shrink a UFS filesystem if you manage to increase
the size of the partition it lives in, with the following command:

/usr/lib/fs/ufs/mkfs -G -M /current/mount /dev/rdsk/cXtYdZsA newsize

Specifying the current mount point and raw device as well as the new
size in 512 byte blocks.

You can do this even when the filesystem is mounted and in use.

3.81) Why do swap -l, swap -s and /tmp disagree about the amount of swap?

First of all, let's get the tmpfs issue (/tmp, /var/run) out of the
way. The tmpfs filesystem is a filesystem that takes memory from the
virtual memory pool. What it lists as size of swap is the sum of the
space currently taken by the filesystem and the available swap space
unless the size is limited with the size=xxxx option.

In other words, the "size" of a tmpfs filesystem has nothing to do
with the size of swap; at most with the available swap.

The second confusing issue is what "swap" really is. Solaris defines
swap as the sum total of physical memory not otherwise used and
physical swap. This is confusing to some who believe that swap is just
the physical swap space.

The "swap -l" command will list the swap devices and files configured
and how much of them is already in use.

The "swap -s" command will list the size of virtual swap. Physical
swap added to the physical memory. On systems with plenty of memory,
"swap -l" will typically show little or no swap space use but "swap
-s" will show a lot of swap space used.

PREV INDEX

0 Comments:

Post a Comment

<< Home