Paging: Difference between revisions
From Hackepedia
Jump to navigationJump to search
No edit summary |
Added example and pagesize table |
||
Line 1: | Line 1: | ||
When a [[process]] causes a page fault because of missing data, this data is "paged in". When a process is forfeiting memory the data is "paged out" to swap, subsequently when this data is needed again it is "paged in" again. Paging is different from swapping because swapping moves the entire memory of a process to/from swap. Different architectures have different | When a [[process]] causes a page fault because of missing data, this data is "paged in". When a process is forfeiting memory the data is "paged out" to swap, subsequently when this data is needed again it is "paged in" again. Paging is different from swapping because swapping moves the entire memory of a process to/from swap. Paging is performed in units of that are of ''pagesize'' bytes. Different architectures have different sizes of pages. | ||
i386 | {|style="width:50%; height:200px align=center margin: 1em auto 1em auto"" border="1" cellpadding=5 | ||
|- | |||
amd64 | |'''Architectures''' || '''Pagesize (bytes)''' | ||
|- | |||
sparc | |i386 || 4096 | ||
|- | |||
sparc64 | |amd64|| 4096 | ||
|- | |||
vax | |sparc || 4096 or 8192 | ||
|- | |||
alpha | |sparc64 ||8192 | ||
|- | |||
macppc | |vax || 4096 | ||
|- | |||
mac68k | |alpha ||8192 | ||
|- | |||
|macppc ||4096 | |||
|- | |||
|mac68k || 4096 | |||
|} | |||
To find the pagesize of your system try typing "pagesize". | To find the pagesize of your system try typing "pagesize". | ||
Line 21: | Line 26: | ||
$ pagesize | $ pagesize | ||
4096 | 4096 | ||
Here is sample output from a Solaris 8 production system that is experiencing mild paging, but zero [[swapping]]: | |||
[root@soemhost /tmp]# vmstat -S 60 | |||
procs memory page disk faults cpu | |||
r b w swap free si so pi po fr de sr m1 m1 m1 m2 in sy cs us sy id | |||
0 0 0 1591144 1483816 0 0 574 2 2 0 0 0 0 0 1 843 1729 457 6 13 82 | |||
0 0 0 1164512 1051184 0 0 42 6 6 0 0 0 0 0 0 729 2268 222 3 30 66 | |||
0 0 0 1253864 1060440 0 0 17 3 3 0 0 2 2 2 1 500 1977 217 6 33 60 | |||
0 0 0 1208336 1058672 0 0 50 8 8 0 0 1 1 1 0 681 2947 252 5 35 60 |
Latest revision as of 13:00, 19 April 2006
When a process causes a page fault because of missing data, this data is "paged in". When a process is forfeiting memory the data is "paged out" to swap, subsequently when this data is needed again it is "paged in" again. Paging is different from swapping because swapping moves the entire memory of a process to/from swap. Paging is performed in units of that are of pagesize bytes. Different architectures have different sizes of pages.
Architectures | Pagesize (bytes) |
i386 | 4096 |
amd64 | 4096 |
sparc | 4096 or 8192 |
sparc64 | 8192 |
vax | 4096 |
alpha | 8192 |
macppc | 4096 |
mac68k | 4096 |
To find the pagesize of your system try typing "pagesize".
$ pagesize 4096
Here is sample output from a Solaris 8 production system that is experiencing mild paging, but zero swapping:
[root@soemhost /tmp]# vmstat -S 60 procs memory page disk faults cpu r b w swap free si so pi po fr de sr m1 m1 m1 m2 in sy cs us sy id 0 0 0 1591144 1483816 0 0 574 2 2 0 0 0 0 0 1 843 1729 457 6 13 82 0 0 0 1164512 1051184 0 0 42 6 6 0 0 0 0 0 0 729 2268 222 3 30 66 0 0 0 1253864 1060440 0 0 17 3 3 0 0 2 2 2 1 500 1977 217 6 33 60 0 0 0 1208336 1058672 0 0 50 8 8 0 0 1 1 1 0 681 2947 252 5 35 60