swap size keeps dropping on Solaris 10 (x86)
Hi,
I have setup Solaris 10 (x86) on a SunFire V20Z, and mirrored my 2 hds.
raidctl c1t0d0 c1t1d0
recently i have been getting system messages that says
WARNING: /tmp: File system full, swap space limit exceeded
when i checked, I noticed that my swap size has dropped. I had setup c1t0d0s1 for swap (2GB).
When i reboot, the system will show the swap as correct, but it will start dropping over a period of time
bash-3.00# swap -l
swapfile dev swaplo blocksfree
/dev/dsk/c1t0d0s128,658 4193272 4193272
bash-3.00# swap -s
total: 565248k bytes allocated + 933124k reserved = 1498372k used, 2280600k available
The next day when i check again;
-bash-3.00$ swap -l
swapfile dev swaplo blocksfree
/dev/dsk/c1t0d0s128,658 4193272 4193272
-bash-3.00$ swap -s
total: 1344296k bytes allocated + 1676016k reserved = 3020312k used, 642752k available
I have just rebooted my system again because my /tmp has dropped to 8.3MB
swap8.3MB 4.0K 8.3MB1% /tmp
My /tmp mount in vfstab shows;
swap-/tmptmpfs-yes-
Any help?
[1140 byte] By [
smw42] at [2007-11-26 7:36:59]

# 1
Well, /tmp and swap are tightly connected to eachother, since its basicly the same thing.
Hence, when you allocate space in /tmp, the amount of available swap will drop, in the same way the amount of space available in /tmp will drop if a lot of swap has been allocated by processes running on the system.
swap -s will show you the amount of unallocated (or free) swap, that it shrinks over time is perfectly normal on most systems, however its not really normal that applications allocates that much swap on a short time.
I suspect that you have an application running on your system which is eating a lot of memory and hence using up your swap space, so next time this problem occour, i'ld run the following;
prstat -a -s size
This will give a list of processes running on the system, and sort them by how much virtual memory they have allocated.
Funny thing; i tested the command above on a S10 server, and found that nfsmapid had allocated about 400 mb. And i'm not even using NFSv4.. smells memory leak.
Hope this explaination is somewhat clear ;)
7/M.