Hey people on this post im going to explain some basics about - TopicsExpress



          

Hey people on this post im going to explain some basics about buffer memory management on Linux to help newcomers understand why sometimes it looks like we have almost 100% of RAM usage according to top (and conky and almost any other monitor program) but htop says its not. First lets R.T.F.M.: In Linux, buffer memory (on ram and swap) stores 3 different types of data: - page cache - dentries & inodes - shared memory >Page cache is stored data from reads and writes from data media like hard drives, SD Cards or flash drives, so If we need to access this data again later it can be read from the RAM (wich is way faster) and not from the disk. >Inodes contains information about ownership, access mode and file types. >Dentries are the glue that holds inodes and files together by relating inode numbers to file names. Dentries also play a role in directory caching which, ideally, keeps the most frequently used files on-hand for faster access. >Shared memory allows processes to access common structures and data by placing them in shared memory segments. It is the fastest form of inter-process communication available since no kernel involvement occurs when data is passed between the processes. The buffers (page cache, dentries & inodes and shared memoy) are dynamic so if any application needs memory the system will flush the buffers. Ok so... Why sometimes conky shows 2Gb used but htop says 500Mb? Htop doesnt sees the buffers because it can be flushed by the system for any application since buffers are not necessary for the system in any way more than a cache. On the other hand top, conky and other software shows the buffer as used memory because reasons (i dont really know why, its just like that) and that causes the misunderstood. check the attached image. (continued below)
Posted on: Thu, 08 Jan 2015 04:46:06 +0000

Recently Viewed Topics




© 2015