본문 바로가기

개발자/Misc

Linux Memory 구조



                total

         free       used


               kernel     user


               file-backed  anonymous


        buffer  cached   swapcached <---------- 차이점이 무엇인가?

       (data ?) (code?)   (dirty page?)



redhat.com

https://access.redhat.com/solutions/406773

  • Buffers: Memory in buffer cache, so relatively temporary storage for raw disk blocks. This shouldn't get very large.
  • Cached: Memory in the pagecache (Diskcache and Shared Memory)
  • SwapCached: Memory that is present within main memory, but also in the swapfile. (If memory is needed this area does not need to be swapped out AGAIN because it is already in the swapfile. This saves I/O and increases performance if machine runs short on memory.)


---------------

Buffers: Relatively temporary storage for raw disk blocks
shouldn't get tremendously large (20MB or so)


Cached: in-memory cache for files read from the disk (the
pagecache). Doesn't include SwapCached

SwapCached: Memory that once was swapped out, is swapped back in but
still also is in the swapfile (if memory is needed it
doesn't need to be swapped out AGAIN because it is already
in the swapfile. This saves I/O)




http://blog.csdn.net/cinmyheart/article/details/38136375




https://www.cs.auckland.ac.nz/~jmor159/363/html/TLB.html