home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.unix.wizards:3830 comp.sys.sun.misc:4114
- Path: sparky!uunet!igor!twinkie!drk
- From: drk@twinkie.Rational.COM (David Kaelbling)
- Newsgroups: comp.unix.wizards,comp.sys.sun.misc
- Subject: Reducing "reserved" swap space?
- Keywords: SunOS, shared libraries, swap
- Message-ID: <5672@igor.Rational.COM>
- Date: 7 Sep 92 17:44:23 GMT
- Sender: news@Rational.COM
- Followup-To: poster
- Lines: 26
-
-
- Can anybody explain what exactly determines the "reserved" swap space
- allocated by a program, and how I can reduce this number?
-
- I have a large application (running on Sun-4's under SunOS 4.1.x), and
- want to have several copies of the application running concurrently.
- Currently the swap space requirements are a major obstacle. According
- to "pstat -s" each copy of the application allocates 1.5Mb of swap and
- reserves 9.4Mb. Purify reports that the heap is around 3.5 Mb. To
- the untrained eye it appears that swap space is reserved for the
- entire text segment (size reports 6430kb text, 876kb data, 29kb bss),
- but never used. How can I eliminate or amortize this waste?
-
- I put most of the code into shared libraries; they help but add 20
- seconds to the startup time of the application, which is unacceptable.
-
- I tried "ld -n"; that just moved 6.5Mb from reserved to allocated.
-
- I tried setting the sticky bit (as root, since doing it normally fails
- silently); swap space requirements were unchanged.
-
- I've searched through many TFM's to no avail. The bulk of the code is
- compiled with -PIC already (a relic of shared libraries).
- --
- David Kaelbling (508) 520-8632 [home -7826]
- 12 Mountain Rock Ln.; Norfolk, MA 02056-1772 DKaelbling@Rational.COM
-