swap questions


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers swap questions
# 1  
Old 04-13-2004
swap questions

Solaris 8 OS

partition> p
Current partition table (original):
Total disk cylinders available: 7506 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 869 1.95GB (870/0/0) 4099440
1 swap wu 870 - 2608 3.91GB (1739/0/0) 8194168[
2 backup wm 0 - 7505 16.86GB (7506/0/0) 35368272
3 usr wm 2609 - 3043 1000.84MB (435/0/0) 2049720
4 var wm 3044 - 4782 3.91GB (1739/0/0) 8194168
5 unassigned wm 0 0 (0/0/0) 0
6 usr wm 4783 - 7505 6.12GB (2723/0/0) 12830776
7 unassigned wm 0 0 (0/0/0) 0



# df -k
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t0d0s0 1987399 82108 1845670 5% /
/dev/dsk/c0t0d0s6 6317162 580811 5673180 10% /usr
/proc 0 0 0 0% /proc
fd 0 0 0 0% /dev/fd
mnttab 0 0 0 0% /etc/mnttab
/dev/dsk/c0t0d0s4 4032142 561779 3430042 15% /var
swap 7050128 16 7050112 1% /var/run
swap 7050160 48 7050112 1% /tmp
/dev/dsk/c0t1d0s5 14116855 441725 13533962 4% /opt
/dev/dsk/c0t0d0s3 962571 244583 660234 28% /usr/openwin
/dev/dsk/c0t1d0s7 3296378 887953 2375462 28% /export/home


VFSTAB FILE
# more vfstab
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
#/dev/dsk/c1d0s2 /dev/rdsk/c1d0s2 /usr ufs 1 yes -
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/dsk/c0t0d0s1 - - swap - no -
/dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 / ufs 1 no -
/dev/dsk/c0t0d0s6 /dev/rdsk/c0t0d0s6 /usr ufs 1 no -
/dev/dsk/c0t0d0s4 /dev/rdsk/c0t0d0s4 /var ufs 1 no -
/dev/dsk/c0t1d0s7 /dev/rdsk/c0t1d0s7 /export/home ufs 2 yes -
/dev/dsk/c0t1d0s5 /dev/rdsk/c0t1d0s5 /opt ufs 2 yes -
/dev/dsk/c0t0d0s3 /dev/rdsk/c0t0d0s3 /usr/openwin ufs 2 yes -
swap - /tmp tmpfs - yes -


Please help to explain the swap entries listed...

I partitioned 4GB of swap on install. When I do "df-k" what does the number "7050128 and 7050160" represent? Doesn't add up to 4GB.

Also if I check VFSTAB it mounts /tmp as a swap space. What is tmpfs?

swap -s
total: 357040k bytes allocated + 61912k reserved = 418952k used, 7051984k available
(7051984k available???)

swap -l
swapfile dev swaplo blocks free
/dev/dsk/c0t0d0s1 32,1 16 8194144 8194144
What is 8194144??

Sorry for so many questions but I figured I would give all of the info instead of multiple posts/reponses.

Please help me understand? Should they all total to 4GB?

Thanks in advance.
# 2  
Old 04-14-2004
At some point, people realized that the kernel never swaps everything completely out of physical memory. So a portion of your main memory can be counted as a swap area.

swap -l is listing the physical swap area size in blocks where a block is 512 bytes. So divide that by 2 to find that you have 4,097,072 KB of physical swap.

swap -s tells you how much you can use. This is more than you have. Remember though if you use more swap than you have, you can no longer theoretically empty memory completely by swapping everything out.

/var/run and /tmp are filesystems built on virtual memory. The numbers mean the same thing as with any filesystem. But they are misleading. If you fill up /tmp, you cannot also fill up /var/run. They compete for the same space.
# 3  
Old 04-14-2004
OK...got the blocks...and /2...makes sense...I can see that now.

I guess /tmp and /var/run are created virtually by default upon installation and 'share' the total swap space(7050128 approx) but it is listed as if they both have 7050128 available.

How about the vfstab file....

swap - /tmp tmpfs - yes -

I understand that this means:

device to mount = swap (as seen in 'df -k')
device to fsck = - (raw name -no applicable device)
mount point = /tmp (as seen in 'df -k')
FS type = tmpfs This is a type of filesystem??
fsck pass = - (do not check file systems)
mount at boot = yes
mount options = - (no mount options)

The tmpfs is another filesystem?...and How come '/var/run' is not listed in vfstab and /tmp is?

Thanks again.
# 4  
Old 04-14-2004
Yes tmpfs is another type of filesystem. As for why /var/run is not listed in vfstab, that is a good question. I don't know why sun did that.
# 5  
Old 04-14-2004
/var/run is most likely not a permenent mount. vfstab will always get mounted at system boot.

something else in the system is mounting /var/run after the system is booted that would be why it is seen in mnttab and not vfstab.

as to what is doing the mounting i havent a clue. but that would be the best logical guess.

edit:

just got this off google groups when i typed in /var/run in the solaris section.

Code:
Solaris 2.8 has introduced a new file system, /var/run.  Here's what the
docs say about it:

"A new TMPFS-mounted file system, /var/run, is the repository for
temporary system files that are not needed across system reboots in this
Solaris release and future releases. The /tmp directory continues
to be repository for non-system temporary files.

Because /var/run is mounted as a memory-based file system rather than a
disk-based file system, updates to this directory do not cause
unnecessary disk traffic that would interfere with systems running
power management software.

The /var/run directory requires no administration. You may notice that
it is not unmounted with the umount -a or the umountall command.

For security reasons, /var/run is owned by root."


Last edited by Optimus_P; 04-14-2004 at 01:15 PM..
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Explain the output of swap -s and swap -l

Hi Solaris Folks :), I need to calculate the swap usage on solaris server, please let me understand the output of below swap -s and swap -l commands. $swap -s total: 1774912k bytes allocated + 240616k reserved = 2015528k used, 14542512k available $swap -l swapfile dev swaplo... (6 Replies)
Discussion started by: seenuvasan1985
6 Replies

2. Solaris

swap

Hi, Can somebody please help here, since iam just a beginner. According to my book knowledge. the Avalilable memory calculated by swap -l (includes only swap) should be small as compared to swap -s value(includes Virtual memory=swap +physical). but this is quite opposite in my case. swap... (6 Replies)
Discussion started by: Laxxi
6 Replies

3. Red Hat

swap

Hi, I have added a new disk to production server. How to make it visible to os and how to configure it. I also want to add some space from that disk to swap space. Please help me out. (1 Reply)
Discussion started by: chetansingh23
1 Replies

4. Homework & Coursework Questions

Print questions from a questions folder in a sequential order

1.) I am to write scripts that will be phasetest folder in the home directory. 2.) The folder should have a set-up,phase and display files I have written a small script which i used to check for the existing users and their password. What I need help with: I have a set of questions in a... (19 Replies)
Discussion started by: moraks007
19 Replies

5. HP-UX

Swap device file and swap sapce

Hi I have an integrity machine rx7620 and rx8640 running hp-ux 11.31. I'm planning to fine tune the system: - I would like to know when does the memory swap space spill over to the device swap space? - And how much % of memory swap utilization should be specified (swap space device... (6 Replies)
Discussion started by: lamoul
6 Replies

6. Red Hat

swap not defined as swap

free -m : 1023 total swap space created default partition /dev/sdb1 50M using fdisk. i did write the changes. #mkswap /dev/sdb1 #swapon /dev/sdb1 free -m : 1078 total swap space this shows that the swap is on Question : i did not change the type LINUX SWAP (82) in fdisk. so why is... (5 Replies)
Discussion started by: dplinux
5 Replies

7. HP-UX

How much Swap is too much?

I have a HP-UX B.11.23 server with 16 gb of memory 84 gb of swap configured. I am being pushed to define more swap to try and get more Tuxedo domains to start. At what point do we have too much swap for the amount of memory? Thanks in advance. (11 Replies)
Discussion started by: scotbuff
11 Replies

8. Solaris

Swap config - Mirror swap or not?

Hello and thanks in advance. I have a Sun box with raid 1 on the O/S disks using solaris svm. I want to unmirror my swap partition, and add the slice on the second disk as an additional swap device. This would give me twice as much swap space. I have been warned not to do this by some... (3 Replies)
Discussion started by: BG_JrAdmin
3 Replies

9. UNIX for Dummies Questions & Answers

About swap

Is it really so that if swap will be located in the begining of hard drive, than it will work faster? (1 Reply)
Discussion started by: Ty3
1 Replies

10. UNIX for Dummies Questions & Answers

Swap

When i re-updated my system i set my swap at 500 MB. I have 256 in ram and have never even gone into the 250 mb of swap that i had originally configured. How do I reduce the swap? (3 Replies)
Discussion started by: macdonto
3 Replies
Login or Register to Ask a Question