Am Fr, 11.02.2011, 17:10, schrieb Michael Peters: > On 02/11/2011 11:01 AM, Hendrik Schumacher wrote: > >> I didnt have time yet to read Torsten's post (will do later) but I will >> take a stab at this question. You are missing the difference between >> address space and used memory. Sample extract from /proc/*/smaps: >> >> Size: 884 kB >> Rss: 536 kB >> Pss: 17 kB >> Shared_Clean: 536 kB >> Shared_Dirty: 0 kB >> Private_Clean: 0 kB >> Private_Dirty: 0 kB >> Referenced: 536 kB >> Swap: 0 kB >> >> In this case the address space has a size of 884 kb. Only 536 kb are >> used >> though (Rss/Referenced). All of this space is shared. As you can see the >> difference between 884 kb and 536 kb is not swapped out but just not >> allocated. > > Interesting. I didn't know that. But I think the questions that Torsten > was posing about what would happen if an admin turned off swap while > things were running doesn't apply then, right? This memory isn't in > swap, it's just not in RAM. So turning off swap won't cause the > shared/unshared sizes to blow up, right? > > -- > Michael Peters > Plus Three, LP >
Yes and no. If I modify the example from above: Size: 884 kB Rss: 536 kB Pss: 17 kB Shared_Clean: 536 kB Shared_Dirty: 0 kB Private_Clean: 0 kB Private_Dirty: 0 kB Referenced: 536 kB Swap: 64 kB then switching off the swap would cause the Shared or the Private to "blow up" by 64 kb. Only the address space that is neither present nor swapped does not cause any effect when switching off the swap.