Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Jul 1999 17:44:25 -0500 (CDT)
From:      Jonathan Lemon <jlemon@americantv.com>
To:        hackers@freebsd.org
Subject:   Re: Swap overcommit (was Re: Replacement for grep(1) (part 2))
Message-ID:  <199907152244.RAA12439@free.pcs>
In-Reply-To: <local.mail.freebsd-hackers/199907151825.LAA11948@apollo.backplane.com>
References:  <local.mail.freebsd-hackers/378D67B3.3E2A703C@newsguy.com> <local.mail.freebsd-hackers/Pine.GSO.3.95.990715082122.11860B-100000@jericho> <local.mail.freebsd-hackers/199907151738.CAA10933@srapc342.sra.co.jp> <local.mail.freebsd-hackers/199907151809.LAA11823@apollo.backplane.com> <local.mail.freebsd-hackers/199907151819.DAA11342@srapc342.sra.co.jp>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <local.mail.freebsd-hackers/199907151825.LAA11948@apollo.backplane.com> you write:
>::    -s             Print summary information  about  total  swap
>::                   space usage and availability:
>::
>::                      allocated   The total amount of swap space
>::                                  (in      1024-byte     blocks)
>::                                  currently allocated for use as
>::                                  backing store.
>::
>::                      reserved    The total amount of swap space
>::                                  (in   1024-bytes  blocks)  not
>::                                  currently    allocated,    but
>::                                  claimed by memory mappings for
>::                                  possible future use.
>::
>::                      used        The total amount of swap space
>::                                  (in  1024-byte blocks) that is
>::                                  either allocated or reserved.
>:--
>:soda
>
>    It would be really easy to test this.
>
>    Write a program that malloc's 32MB of space and touches it,
>    then sleeps 10 seconds and forks, with both child and parent
>    sleeping afterwords.  ( the parent and the forked child should
>    not touch the memory after the fork occurs ).
>
>    Do a pstat -s before, after the initial touch, and after
>    the fork.  If you do not see the reserved swap space jump
>    by 32MB after the fork, it isn't what you thought it was.

aladdin[5:32pm]> prtconf
System Configuration:  Sun Microsystems  i86pc
Memory size: 128 Megabytes

aladdin[5:41pm]> uname -a
SunOS aladdin 5.6 Generic_105182-14 i86pc i386


total: 67280k bytes allocated + 28668k reserved = 95948k used, 196460k avail
malloced 32MB...
total: 67320k bytes allocated + 61460k reserved = 128780k used, 163592k avail
touched...
total: 100084k bytes allocated + 28696k reserved = 128780k used, 163732k avail
forking...
total: 100092k bytes allocated + 61520k reserved = 161612k used, 130864k avail
touching again (parent)...
touching again (child)...
total: 132864k bytes allocated + 28748k reserved = 161612k used, 130760k avail
exiting...
exiting...
total: 67248k bytes allocated + 28700k reserved = 95948k used, 196448k avail

--
Jonathan


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?199907152244.RAA12439>