Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Jul 1999 15:37:31 -0700 (PDT)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        "D. Rock" <rock@dead-end.net>
Cc:        freebsd-hackers@FreeBSD.ORG, tech-userlevel@netbsd.org
Subject:   Re: Swap overcommit (was Re: Replacement for grep(1) (part 2))
Message-ID:  <199907152237.PAA13341@apollo.backplane.com>
References:   <199907152123.XAA00753@server.rock>

next in thread | previous in thread | raw e-mail | index | archive | help

:Before program start:
:total: 20000k bytes allocated + 4792k reserved = 24792k used, 191048k available
:
:After malloc, before touch:
:total: 18756k bytes allocated + 37500k reserved = 56256k used, 159580k available
:
:After malloc + touch:
:total: 52804k bytes allocated + 4852k reserved = 57656k used, 158184k available
:
:After fork:
:total: 52928k bytes allocated + 37644k reserved = 90572k used, 125264k available
:
:[there has been a little background activity, but the numbers speak for themselves]
:
:
:Daniel

    Assuming the allocated field is not inclusive of real
    memory, what we have is swap reservation under solaris
    for clean pages, and allocation and assignment for dirty
    pages.  The grand total will tell you the total VM potential
    for malloc'd space but does not appear to tell you how 
    much swap is actually active - i.e. was written to and 
    contains valid data.

    It would be interesting to see if the stack segment is
    included in the reservation.  Try setting the stack resource
    limit to 32m and run the same program, except without
    bothering to malloc() or touch anything.  See if the
    stack segment is included in the reservation field.

    It would also be interesting to see how solaris deals
    with MAP_PRIVATE mmap's.

    If this is correct, then solaris is using a VMSPACE = SWAPSPACE
    model.  FreeBSD uses a VMSPACE = SWAPSPACE + REALMEM model.

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199907152237.PAA13341>