Swap vrs Paging


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Swap vrs Paging
# 1  
Old 10-05-2005
Swap vrs Paging

Can anyone explain the difference between Paging and Swap in unix. I know over the years that the term has almost become interchangable.

However I have noticed in VMSTAT for a Solaris system that I am investigating that there is significant Paging but no Swapping and hence I am wondering do I have a RAM shortage or not.

My own understanding is that Paging is when individual parts ( i.e. pages ) of a process get swapped in/out whereas in swapping the entire process gets swapped in/out
# 2  
Old 10-05-2005
Swapping came first and can be implemented on any cpu. Entire processes are loaded into core to run. And entire processes are written out. It is common to have a process split into segments... a read-only text segment and a writable data segment and often a writable stack segment. At swap-out time the text segment can be discarded. On many computers you can arrange for processes running the same program to share the text segment. This model arose during the 1970's. 128 kb was a very large memory for a cpu. 4 kb was a mid-sized process. So swapping was not super expensive.

Paging came after swapping and paging needs a cpu with a memory management unit (mmu). A process is started with zero or one pages in core. When a page is needed but is not in core, a page fault occurrs. The page is brought in as needed. Between risc architectures and 64 bit computing, processes are now too big for swapping to be useful. HP-UX will no longer swap ever. Some os'es still swap if paging wasn't cutting it. Any os that swapping is in deep trouble.

On Solaris, paging is used for data from data files too. The buffer cache is only for meta-data. This allows memory mapped data files processed with mmap() to be consistent with data files processed with read()/write().

Earlier this year I took Sun's performance tuning course. They made the point that scan-rate (sr in vmstat) is the metric to detect memory shortages. If it is zero, you have memory. Scan-rate is the number of pages examined to finf memory to free up.
# 3  
Old 10-05-2005
Computer thanks

thanks for the reply - very comprehensive ! Smilie
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. UNIX for Dummies Questions & Answers

how to monitor swap space paging activity?

hi guys My tivoli monitoring tools is reporting the monitor parameters says Pages Paged out is too high 1600 so it is a critical warning (threshold 400) now according to them this usually happens at dawn so is there a way to monitor this? during the time I am not working? ans something... (1 Reply)
Discussion started by: karlochacon
1 Replies

3. AIX

Paging

Hi , I have 8Gb memory in my JS21 server. When I run svmon it shows 3655Mb memory is utilized and 4344Mb free. I have configured 8Gb paging space and 14% is utilized which is 1Gb. I dont have memory issues but just want to know Why 1gb paging is utilized when my almost 4Gb real memory is free?... (6 Replies)
Discussion started by: vjm
6 Replies

4. UNIX for Dummies Questions & Answers

vmstat and paging ... how to interpret and get currently swap space size

Hi, OS = Solaris 5.10 I need some guidance on interpreting vmstat to confirm whether my server is swapping or not. Can anyone please advise whether the column to check on the vmstat output is the pi column, does higher pi values means the server is swapping or am having swapping issues? ... (1 Reply)
Discussion started by: newbie_01
1 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. Shell Programming and Scripting

paging

I need a script which sends a mail when paging is happening and which process is causing paging? (5 Replies)
Discussion started by: jayaramanit
5 Replies

8. Solaris

LDOM vrs Container

Does anyone know the difference between a Logical Domain and a Container ? Both seem to be virtualisation technologies from Sun. Also I know a Domain can have containers within it but I don't see the point (4 Replies)
Discussion started by: jimthompson
4 Replies

9. 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

10. AIX

swap space / paging space

how do you get the paging space reduced without rebooting the machine ? the os is aix (2 Replies)
Discussion started by: aaronh
2 Replies
Login or Register to Ask a Question