[comp.windows.news] Improving NeWS performance on SunOS 4.0

hedrick@geneva.rutgers.edu (Charles Hedrick) (12/03/88)

For some odd reason I like NeWS.  Unfortunately, I am using a Sun
3/50, which has only 4MB of memory.  NeWS (and probably also other
window systems) are marginal with 4MB.  I found that whenever I moved
between windows, things paused for a few seconds while the program
behind the new window got paged in.  This was quite annoying.  I'm
managed to improve things markedly by rebuilding the NeWS software
from source under 4.0.  I assume this is because the sharable library
saves memory.  It may not save that much, but NeWS is right at a point
where a relatively small saving matters a lot.  That big change
occured simply by rebuilding from source.  (In the 1.1 source, you'll
find you need to use -DFOURPOINT0 in order to get a few things to
compile under 4.0.)  In an attempt to save a bit more space, I also
removed support for X10 (it never was very useful, and we're using
X11).  (Do this by redefining the symbols XSRC, XOBJ, and XHDRS, etc.
to be null, and comment out the stuff about X in
.../lib/NeWS/demomenu.ps.)  Finally, I put "0 setretainthreshold" in
my user.ps, on the theory that retained windows requires more memory,
and I'm willing to use more CPU to save memory.  Simplying recompiling
under 4.0 made a difference.  It's not clear that the other two things
did.  With my new version, it's possible to go back and forth between
Emacs and psterm windows without swapping.  The working set size seems
to have gone from about 1.2M to 1M, but from its behavior with other
programs, it appears that the RSS column under 4.0 includes the shared
libraries, so the effective change is in fact slightly larger.  Again,
on an 8MB machine this change probably wouldn't be noticable, but on a
3/50 it is quite significant.  (I also do various things to tune
psterm, but I think I've mentioned that before.  In particular, if you
type quickly I strongly recommend that you turn off the "fast repaint"
feature.)

dshr@SUN.COM (David Rosenthal) (12/10/88)

Saving memory usage in NeWS will improve your performance,  and especially
on a 4M machine.  The suggestions you make look sensible.

However,  it turns out that the most important way of saving memory
on 4M Suns is configuring your kernel correctly.  This is especially
true with SunOS4.0,  and the initial documentation that went out
with 4.0 didn't give you a whole lot of help doing so.

The first and most important thing is:

	NEVER RUN A GENERIC KERNEL

	The only thing generic kernels are good for is to configure
	other kernels.

Beyond that,  you should read Appendix E. of the current SunOS4.0
Read This First.  The RTF has recently been updated - if you don't have
an updated copy ask your salesperson or TSE.  Appendix E gives a good
deal of detail about how to configure your kernel to save the maximum
amount of space.  Depending on which of the hints you are able to use
in your configuration,  you can save up to half a megabyte of wired-down
memory (that is what I was able to save on my 4M 3/75) as compared to
running with the default (in my case SDST75) configuration.

	David.