{"id":19,"date":"2004-12-30T10:48:21","date_gmt":"2004-12-30T18:48:21","guid":{"rendered":"http:\/\/hongyu.org\/wordpress\/?p=19"},"modified":"2008-09-11T15:28:23","modified_gmt":"2008-09-11T23:28:23","slug":"system-memory-copied-from-dinix-help","status":"publish","type":"post","link":"https:\/\/www.hongyu.org\/wordpress\/?p=19","title":{"rendered":"System memory"},"content":{"rendered":"<p>Copied from the now diseased Dinix web forum:<\/p>\n<p>How can I tell what is using up all of my server&#8217;s memory?<br \/>\nLinux actually uses two different forms of disk caching, referred to as \u00e2\u20ac\u02dccached\u00e2\u20ac\u2122 and \u00e2\u20ac\u02dcbuff\u00e2\u20ac\u2122 in top. The amount of free memory displayed by the program top is misleading, since the Linux operating system will use most of the available memory for disk caching.<\/p>\n<p>When you launch new processes, Linux will automatically shrink the cache to free up needed memory. If more memory is needed<br \/>\nafter Linux has shrunk the disk cache, Linux will swap out currently unused portions of memory to disk.<\/p>\n<p>Swapping out parts of a process&#8217; memory is the reason for the difference between the SIZE and RSS columns for some<br \/>\nprocesses listed in top. The SIZE column is the amount of memory allocated to the process that can reside in physical memory<br \/>\nor on the swap partition. The RSS column shows how much of a process&#8217; memory resides in physical memory. (The SIZE column<br \/>\nmay actually show less memory than the process has requested, since Linux will wait to assign a unit of memory to the process<br \/>\nuntil the process has accessed memory inside that unit by reading or writing to it.)<\/p>\n<p>Linux will move data from the swap partition back into physical memory once a process requires that piece of data. This is why<br \/>\nthe data may remain on the swap partition even though enough physical memory has been freed to contain all the processes.<\/p>\n<p>If you want to know how much physical memory your programs our actually using, you can subtract the \u00e2\u20ac\u02dccached\u00e2\u20ac\u2122 and \u00e2\u20ac\u02dcbuff\u00e2\u20ac\u2122<br \/>\nfields in top from the used memory field. Conversely, you can add the \u00e2\u20ac\u02dccached\u00e2\u20ac\u2122 and \u00e2\u20ac\u02dcbuff\u00e2\u20ac\u2122 fields to the free memo<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Copied from the now diseased Dinix web forum: How can I tell what is using up all of my server&#8217;s memory? Linux actually uses two different forms of disk caching, referred to as \u00e2\u20ac\u02dccached\u00e2\u20ac\u2122 and \u00e2\u20ac\u02dcbuff\u00e2\u20ac\u2122 in top. The amount of free memory displayed by the program top is misleading, since the Linux operating system &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.hongyu.org\/wordpress\/?p=19\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;System memory&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[],"_links":{"self":[{"href":"https:\/\/www.hongyu.org\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/19"}],"collection":[{"href":"https:\/\/www.hongyu.org\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hongyu.org\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hongyu.org\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hongyu.org\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=19"}],"version-history":[{"count":0,"href":"https:\/\/www.hongyu.org\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/19\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.hongyu.org\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=19"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hongyu.org\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=19"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hongyu.org\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=19"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}