Storage Access Patterns
Access tends to be sequential
If address N is accessed by the CPU, it it highly likely that address N+1 will be accessed next.
Access tends to be localized
If address X is accessed, it is likely that other addresses surrounding X will also be accessed in the future.
The Storage Spectrum
Storage technologies:
CPU registers
Cache memory
Ram
Hard drives
Off-line backup storage (tape, optical disk, etc.)
Virtual Memory
Virtual memory is a portion of the hard disk that operation system uses to application programs to meet the require exceeds the amount of physical memory available.
Paging occurs when an active process requires more memory than what is accessible in physical memory. Portions of the process are moved to disk so the physical memory can be used for something else.
Swapping is done by the kernel. When memory space is running low the kernel looks for a process that isn't likely to run in the near future. That process is written entirely to disk, and the newly-freed memory is reassigned to another process or job.
Virtual Memory in Redhat Linux
Using free to get a concise overview of memory and swap utilization.
$ free
total used free shared buffers cached
Mem: 1023368 1004148 19220 0 14544 277328
-/+ buffers/cache: 712276 311092
Swap: 2031608 198436 1833172
System has 1G of RAM, about ~1004 MB is actually in use. ~198 MB of swap is in use.
sar [-a] [-A] [-b] [-c] [-d] [-g] [-k] [-m] [-p] [-q] [-r] [-u] [-v] [-w] [-y ] [ -o filename ] t [ n ]
Viewing result of sar -r
09時17分12秒 LINUX RESTART
09時20分02秒 kbmemfree kbmemused %memused kbbuffers kbcached kbswpfree kbswpused %swpused kbswpcad
09時30分02秒 35432 987936 96.54 30024 523368 2031444 164 0.01 0
09時40分01秒 33080 990288 96.77 37776 512900 2031444 164 0.01 0
09時50分01秒 13600 1009768 98.67 45868 516460 2031444 164 0.01 0
10時00分01秒 57096 966272 94.42 52216 469420 2031444 164 0.01 0
平均値: 34802 988566 96.60 41471 505537 2031444 164 0.01 0
kb: Kilobytes of memory allocated to
sar -W
09時17分12秒 LINUX RESTART
09時20分02秒 pswpin/s pswpout/s
09時30分02秒 0.00 0.07
09時40分01秒 0.00 0.00
09時50分01秒 0.00 0.00
10時00分01秒 0.00 0.00
平均値: 0.00 0.02
page swap in per second (pswpin/s)
page swap out per second (pswpout/s)
No comments:
Post a Comment