Running with vm.overcommit_memory=2

Luciano Miguel Ferreira Rocha strange at
Sat Feb 19 13:25:33 UTC 2005

On Fri, Feb 18, 2005 at 11:50:39PM -0700, Tyler Larson wrote:
> Luciano Miguel Ferreira Rocha wrote:
> >>How much memory does it take to clone() a bash?
> >>
> >
> >
> >$ ps -o size,vsz,rss,args 
> >1428 6244 2212 -bash
> >
> >About 1428MB, I guess. Not that it would be consumed, but that the
> >kernel must guarantee to be available.
> >
> >Regards,
> >Luciano Rocha
> >
> Erm.. Perhaps I'm a bit behind on things, but I though the SZ field 
> shows the number of pages that a process is using, not the number of 
> Megs guaranteed. That'd make your estimate just a few orders of 
> magnitude high.
> The VSZ will give your answer in bytes rather than pages. That's the 
> total process size in virtual memory, displayed in KB. The RSS is the 
> amount of that's actually IN memory. The discrepency between these 
> numbers would then indicate, at least in a crude way, the difference 
> between what the app thinks it's using versus what the OS actually has 
> tied up in the process.

They're both in KB, my mistake.
> So, you're looking at something more along the lines of 6MB, rather than 
> 1.4GB; with 2M actually used.

Actually, from the manual page:
size    SZ    approximate amount of swap space that would be
              required if the process were to dirty all writable
              pages and then be swapped out. This number is
              very rough!

So, if it is correct, about 1.4MB.

Luciano Rocha


More information about the fedora-devel-list mailing list