[comp.windows.x] Speeding up Sun 4 X?

oster@dewey.soe.berkeley.edu (David Phillip Oster) (12/30/89)

Please be kind to an X beginner.  I sit down at an 8Meg  Sun 4/260 and type:
xnews

and get a server that runs so slowly I can't believe it.  Am I doing
something wrong? Is there some option I can set to make it use less memory
so it will be less likely to be swapped out?

More data: after a compile, there is a three second pause before mouse
tracking restarts. It often takes longer than ten seconds for menus to
appear.  When windows are destroyed, the bits that were behind the window
at the time it was created show for a second. If I try to run MWM, it
hangs as soon as I click inside a window. Before that, it leaves garbage
on the screen. The other events, naturally, are just with the default
window manager.  What books should I already have read? (I am working
with the O'Reilly books and the Young book.)

--- David Phillip Oster            --  No, I come from Boston. I just work
Arpa: oster@dewey.soe.berkeley.edu --  in cyberspace.
Uucp: {uwvax,decvax}!ucbvax!oster%dewey.soe.berkeley.edu

mike@DART.CS.BYU.EDU (Mike Burbidge) (01/03/90)

The developer's version of OpenWindows 1.0 is a terrible memory hog. It uses
about 5.7 meg of runtime memory. You are experiencing an incredible amount
of paging and swapping. Sun has promised to address the memory problems by
their June release for the public (not just developers).

If you are just interested in running X11 stuff you can start xnews without
the NeWS server. Simply set the environment variable X11ONLY. You can
further reduce memory consumtion if you are not interrested in clip and
paste between SunView programs and XView programs. (SunView programs will
run under Suns X11) Set the environment variable NOSXSEL. At this point you
will have a server that uses under 2.5 meg of runtime memory.

Mike Burbidge.
mike@cs.byu.edu

news@bbn.COM (News system owner ID) (01/04/90)

mike@DART.CS.BYU.EDU (Mike Burbidge) writes:
< The developer's version of OpenWindows 1.0 is a terrible memory hog. It uses
< about 5.7 meg of runtime memory.
  ... [two good hacks for xnews users] ...
< At this point you
< will have a server that uses under 2.5 meg of runtime memory.

Ga!  (I usually won't use such an example, but in this case I have to
make an exception:) At this point, the server is about 10 TIMES the
size of the bitmap and windowing code in a Mac.  Now I could under-
stand a doubling in size (after all, extra space is needed to run
the server side of the network interface), but 10?!?!?

I just checked, and the (X11R3) xsun running on my 3/50 is 520K, with
less than 200K resident.  This isn't bad (still too fat, but not bad).

In the "Sun-Day" talk about Open Windows / X11/News, the Sun
representative said that Sun officially recomends no less than 8 meg
to run OW in (and she prefers 12).

I personally don't see any reason why a workstation with 4 meg (real)
shouldn't be able to support a kernal, a window system, and a useful
application or three.  Really, more memoy is great, but it should be a
*luxury* to make things run faster.

I expect the X servers from MIT to be a bit big, because they are
demonstrations of new ideas, with size a low concern, and the vendor
implimentations be carefully trimmed to work well on their hardware.
Unfortunately, I don't think this will be the case.  I can see Sun
trimming xnews by 50% if they are _real_ careful, but that will still
leav it at just under 3 TIMES the size of the X11R3 refrence server.

Ga.  Will I need 128 Meg in my machine in 1999, just to edit files?
Remember when Unix ran on a 64K machine?

		-- Paul Placeway <pplaceway@bbn.com>
		   (ocassionally accused of feeping creatureism,
		    usually correctly :-) )

rws@EXPO.LCS.MIT.EDU (Bob Scheifler) (01/04/90)

    I just checked, and the (X11R3) xsun running on my 3/50 is 520K, with
    less than 200K resident.  This isn't bad (still too fat, but not bad).

The R4 server is significantly smaller in data size than the R3 server, at
least in my experience.  It's a little larger in text size (about 20%); I
haven't analyzed what percentage of that is from increased functionality.

    I expect the X servers from MIT to be a bit big, because they are
    demonstrations of new ideas, with size a low concern,

On the contrary, data size was a major concern for the R4 server.

marbru@auto-trol.UUCP (Martin Brunecky) (01/04/90)

In article <50334@bbn.COM> pplacewa@antares.bbn.com (Paul W Placeway) writes:
>
>I expect the X servers from MIT to be a bit big, because they are
>demonstrations of new ideas, with size a low concern, and the vendor
>implimentations be carefully trimmed to work well on their hardware.
>Unfortunately, I don't think this will be the case.  I can see Sun
>trimming xnews by 50% if they are _real_ careful, but that will still
>leav it at just under 3 TIMES the size of the X11R3 refrence server.
>
>Ga.  Will I need 128 Meg in my machine in 1999, just to edit files?
>Remember when Unix ran on a 64K machine?
>
   .... Note, the Sun server in question implements ALL of the X11 R3
   server functionality IN ADDITION to NeWS Postscript script download
   support.
   While Sun(y guys) claim the NeWS imaging model far superior to that
   of X11, somebody has to pay for this superiority. In this particular
   case, anybody ho wants to use Sun server for X11 only, has to pay
   the memory penalty for the NeWS code that is in the server, no matter
   wheather you want to use it or not. 
   ....
   Could Sun give you an option of running X11-only server ? Maybe. But
   then you wan't have an access to their (much better) imaging model.

   So, in 1999, when X11 finally goes broke and the entire world runs
   NeWS, you probbably WILL need your 128 Meg to just edit files.


-- 
###############################################################################
Martin Brunecky, Auto-trol Technology Corporation,
12500 North Washington Street, Denver, CO-80241-2404
(303) 252-2499                                        ncar!ico!auto-trol!marbru

madd@world.std.com (jim frost) (01/04/90)

news@bbn.COM (News system owner ID) writes:
>I expect the X servers from MIT to be a bit big, because they are
>demonstrations of new ideas

There are no new ideas in X (in fact it's missing quite a few fairly
old ideas supported by other graphical environments) except, perhaps,
that it's available to anyone for the asking.  The OpenWindows
environment, on the other hand, demonstrated quite a few interesting
ideas.

Given that the OW environment is extensible and that applications USE
that extensibility, it's not surprising that the server grows quite
large.  In a comparable case, consider if X applications loaded
much of themselves into the server instead of running as clients.
Pretty soon the server would be quite large (and your ethernet would
be much happier than it is with many X applications :-).

This isn't to say that I don't think the OW environment could be
better done, just that OW is much more novel than X.  X is much better
suited to a lean server environment and high network bandwidth (which
is what we have now on LANs) while OW runs much better on lower
bandwidth network connections but needs quite a bit of resources on
the server.  Which is best depends on your environment.  Me, I like
the OW idea but I like the fact that X is available for the effort of
going and getting it.  And since few people I know have a 12mb
workstation at their desk....

That said, back to your regularly scheduled program, already in
progress.

jim frost
jimf@saber.com

montnaro@spyder.crd.ge.com (Skip Montanaro) (01/04/90)

In article <568@auto-trol.UUCP> marbru@auto-trol.UUCP (Martin Brunecky) writes:

      Could Sun give you an option of running X11-only server ? Maybe. But
      then you wan't have an access to their (much better) imaging model.

You can set X11ONLY mode when running xnews. This cuts out the PostScript
stuff and pswm. When I was stuck on an 8-meg 3/260 (diskless) I often ran
xnews with X11ONLY set and gwm as the window manager.  On my SPARCStation-1
with 20-megs and local disk I just run the whole thing. It rarely pages.

Note, that running both the X and NeWS interpreters has an added time
penalty. I must also read comp.windows.news :-)

--
Skip (montanaro@crdgw1.ge.com)

bob@MorningStar.Com (Bob Sutterfield) (01/04/90)

In article <9001032317.AA02189@expire.lcs.mit.edu> rws@EXPO.LCS.MIT.EDU (Bob Scheifler) writes:
   The R4 server is significantly smaller in data size than the R3
   server, at least in my experience.  It's a little larger in text
   size (about 20%);

Hmmm...  glancing at servers running on SPARC machines hereabout:

9:50am> size /usr/local/bin/X11/Xsun bin.sun4/Xsun* 
text    data    bss     dec     hex
557056  32768   13544   603368  934e8   /usr/local/bin/X11/Xsun	(a)
704512  40960   4832    750304  b72e0   bin.sun4/Xsun.cc	(b)
753664  32768   5056    791488  c13c0   bin.sun4/Xsun.gcc	(c)
9:50am>

(a) was built with gcc 1.33 or 1.34 under SunOS 4.0.1	X11R3 + Purdue 2.1
(b) "   "     "    Sun's cc under SunOS 4.0.3c		X11R4
(c) "   "     "    gcc 1.36 under SunOS 4.0.3c		X11R4

rws@EXPO.LCS.MIT.EDU (Bob Scheifler) (01/05/90)

    Hmmm...  glancing at servers running on SPARC machines hereabout:

My 20% came from looking at Sun-3 servers compiled with gcc.  Mileage
will of course vary with the instruction set and the compiler.

stripes@eng.umd.edu (Joshua Osborne) (01/05/90)

In article <50334@bbn.COM> pplacewa@antares.bbn.com (Paul W Placeway) writes:
>mike@DART.CS.BYU.EDU (Mike Burbidge) writes:
>< At this point you
>< will have a server that uses under 2.5 meg of runtime memory.
>
>Ga!  (I usually won't use such an example, but in this case I have to
>make an exception:) At this point, the server is about 10 TIMES the
>size of the bitmap and windowing code in a Mac.  Now I could under-
>stand a doubling in size (after all, extra space is needed to run
>the server side of the network interface), but 10?!?!?
The Sun4 is SPARC baised, SPARC is a RISC.  Mac is 68000 baised, 68000 is a
CISC.  I do beleve CISC code is *more* compact then RISC code.  The Mac's
windowing system was written in assembler (designed to be called by Pascal), 
X is written in C.  Assembler is offen more compact then C, esp if your
assembler programer knows he has a 64K ROM and 128K RAM while the C programer
knows he has 4+Meg real mam, and tons of VM.  Who is to say that the Mac didn't
scrifice speed for space?  Mabie Sun choose speed over space?  And mabie X
provides more then the Mac's windowing system?  Which had *NO* color to begin
with (I don't know if you are talking about a Mac OS written for color or not).
[this isn't a flame of the Mac OS, I liked it alot last I used it]

>I personally don't see any reason why a workstation with 4 meg (real)
>shouldn't be able to support a kernal, a window system, and a useful
>application or three.  Really, more memoy is great, but it should be a
>*luxury* to make things run faster.
View OpenWindows as a luxury :-)    And MIT's X11 as window system for
your 4Meg box.

>Ga.  Will I need 128 Meg in my machine in 1999, just to edit files?
>Remember when Unix ran on a 64K machine?
Without memmory protection, no pageing (did it have swaping?), no network
(tcp/ip, NFS, RFS)...
-- 
           stripes@wam.umd.edu          "Security for Unix is like
      Josh_Osborne@Real_World,The          Mutitasking for MS-DOS"
      "The dyslexic porgramer"                  - Kevin Lockwood
Einstein argued that there must be simplified explanations of nature, because
God is not capricious or arbitrary.  No such faith comforts the software
engineer.
- Fred Brooks, Jr.

oster@dewey.soe.berkeley.edu (David Phillip Oster) (01/05/90)

In article <1990Jan4.203816.1886@eng.umd.edu> stripes@eng.umd.edu (Joshua Osborne) writes:
_>In article <50334@bbn.COM> pplacewa@antares.bbn.com (Paul W Placeway) writes:
_>>mike@DART.CS.BYU.EDU (Mike Burbidge) writes:
_>>< At this point you
_>>< will have a server that uses under 2.5 meg of runtime memory.
_>>
_>>Ga!  (I usually won't use such an example, but in this case I have to
_>>make an exception:) At this point, the server is about 10 TIMES the
_>>size of the bitmap and windowing code in a Mac.  Now I could under-
_>>stand a doubling in size (after all, extra space is needed to run
_>>the server side of the network interface), but 10?!?!?
_>The Sun4 is SPARC baised, SPARC is a RISC.  Mac is 68000 baised, 68000
_>is a CISC.  I do beleve CISC code is *more* compact then RISC code.
_>The Mac's windowing system was written in assembler (designed to be
_>called by Pascal), X is written in C.  Assembler is offen more compact
_>then C, esp if your assembler programer knows he has a 64K ROM and 128K
_>RAM while the C programer knows he has 4+Meg real mam, and tons of VM.
_>Who is to say that the Mac didn't scrifice speed for space?  Mabie Sun
_>choose speed over space?  And mabie X provides more then the Mac's
_>windowing system?  Which had *NO* color to begin with (I don't know if
_>you are talking about a Mac OS written for color or not).  [this isn't
_>a flame of the Mac OS, I liked it alot last I used it]

Sigh, I didn't mention it when I started this thread, but the reason I
wanted help speeding up an 8Meg Sun 4/260's X implementation is because 
I was sick of waiting 4 times as long for simple services as I was used
to.

I am used to a 2Meg Mac IIcx (less than $3k. 16Mhz 68030.) Typical window
system activity, general graphics, and compile/link a simple
program that uses the window system, are each 4 to 10 times faster on the
cheap mac than they are on the expensive sun, even though the Sun has a
lot more RAM, a lot more MIPS, a graphics coprocessor, a lot more disk,
a lot more buttons on the mouse, & a lot more buttons on the keyboard.

The consensus of the discussion is that I should buy another 8Meg of RAM
for the Sun.  RAM for a Mac is less than $80.00/Meg. Anybody know where to
get cheap Sun RAM?

By the way, where is the mapping of all those buttons on the keyboard,
under X, documented?

_> The mac is a detour in the inevitable march of mediocre computers.
_> drs@bnlux0.bnl.gov (David R. Stampf)
--- David Phillip Oster          -master of the ad hoc odd hack. 
Arpa: oster@dewey.soe.berkeley.edu 
Uucp: {uwvax,decvax}!ucbvax!oster%dewey.soe.berkeley.edu 

datri@concave.uucp (Anthony A. Datri) (01/06/90)

>   the memory penalty for the NeWS code that is in the server, no matter
>   wheather you want to use it or not. 

Unless Sun's vm system is significantly different from 4.3's, pages in the
text (the server code) that are never referenced (used) won't get paged in, so
you may pay in PTE's, but not physical memory.

datri@concave.uucp (Anthony A. Datri) (01/06/90)

>>Ga.  Will I need 128 Meg in my machine in 1999, just to edit files?
If you use GNUsomething, probably.
>>Remember when Unix ran on a 64K machine?
>Without memmory protection, no pageing (did it have swaping?), no network
>(tcp/ip, NFS, RFS)...
You get much of this still running 2.10BSD in 256k.
.

burzio@mmlai.UUCP (Tony Burzio) (01/07/90)

In article <33480@ucbvax.BERKELEY.EDU>, oster@dewey.soe.berkeley.edu (David Phillip Oster) writes:
> The consensus of the discussion is that I should buy another 8Meg of RAM
> for the Sun.  RAM for a Mac is less than $80.00/Meg. Anybody know where to
> get cheap Sun RAM?

This is all very confusing for me.  We have a discless HP330 (~1.5 MIPS)
with 4MB RAM(!) running X, and it runs HPs' X just fine.  Sure, there is 3-4
second pause between window switches while the machine swaps, but our network
is dropping 30% of large packets so this will improve (Yes, there is a 
difference between coax cables, use the wrong one and POW!).  X starts up
quite promptly and is judged useable  (we start 25 applications at startup,
what with all the xloads and such, with MOTIF-ish WM, so we are trying hard
to overload the machine :-) :-).  Buying over 16 MEG of memory is just 
impossible for us on all machines.  Why is Sun and DEC forcing humongous
memory requirements on such a simple system as X?  Marketing perhaps?
For the extra RAM money, we could buy a bunch more low-end HP workstations
for our users instead.  It's capital equipment time of year again, just musing.
Please email your thoughts and I will summarize...

*********************************************************************
Tony Burzio               * Beware of marketeers!
Martin Marietta Labs      *
mmlai!burzio@uunet.uu.net *
*********************************************************************

wayne@dsndata.uucp (Wayne Schlitt) (01/09/90)

In article <641@mmlai.UUCP> burzio@mmlai.UUCP (Tony Burzio) writes:
> [ .... ]
> 
> This is all very confusing for me.  We have a discless HP330 (~1.5 MIPS)
> with 4MB RAM(!) running X, and it runs HPs' X just fine.  Sure, there is 3-4
> second pause between window switches while the machine swaps, ...
>  [ ... ]                                                         X starts up
> quite promptly and is judged useable [ ...]


wow.  we have found that a 4meg hpux system running X pages with just
an xterm running.  if you try to run anything serious, it thrashes.
although we are not using X here very much yet, i guess i have always
figured that 8meg was minimum.  

even with 8meg it sometimes takes 3-4 seconds between window switches.
personally, i dont think 3-4 seconds is too good, but i guess everyone
has a different idea of what "promptly" and "usable" are.

we have tried to tune the system, but the best we have been able to do
is get hpux to consume around 1.75meg, X takes about 1.5meg, xterm
takes about .5meg, and xload and xclock take about .5meg.  this totals
up to 4.25 meg...


-wayne