Slimming X. Possible?

Slimming X. Possible?

Post by Liang Shing » Fri, 21 Jul 1995 04:00:00



It is possible to slim down X, to make it run faster and requires less
memory?

What are the lessons we can learn from QNX Photon?

L S Ng

 
 
 

Slimming X. Possible?

Post by Liang Shing » Fri, 21 Jul 1995 04:00:00


How can X be slimmed down, to make it run faster on less memory?

How does QNX Photon do it?

L S Ng

 
 
 

Slimming X. Possible?

Post by Kazimir Kylhe » Fri, 21 Jul 1995 04:00:00




Quote:>It is possible to slim down X, to make it run faster and requires less
>memory?

Umm, find a way to configure it so that it uses less backing store (or
none at all) and feeds expose events to applications more. I'm not sure
how this is configured with Xfree, but there is probably a way. Applications
can also ask to not use backing store, or "save under".

Also, let's not forget that programs that are frugal with memory don't
necessarily use the best algorithms.

The memory usage of X also could also depend on which vendor's X you use.

I'd say, just get more RAM.

Quote:>What are the lessons we can learn from QNX Photon?

Dunno. Get me the source, then we can talk.
 
 
 

Slimming X. Possible?

Post by Joel Squi » Fri, 21 Jul 1995 04:00:00



Liang> It is possible to slim down X, to make it run faster and
Liang> requires less memory?

Liang> What are the lessons we can learn from QNX Photon?

I've been thinking about this as well. X is just too big. I've never
seen or touched QNX, so my opinions on it are rather vague, but from
what I gather they get speed and small size just by cutting out as
much of the extraneous stuff as they can. The X protocol is filled
with lots of special cases that have to be dealt with, optimized away,
etc. Most of the cruft comes from being designed when X terminals were
much different than they are now, and X was designed to accomodate as
many of the different vendor designs as possible. Thus, an X server
has to be able to handle both bit-plane and frame-buffer memory
organizations, in both big-endian and little-endian order, with
several different types of pixel color assignments. To reduce the
network usage, they also added many complicated drawing methods like
wide, dashed, ellipse and filled, self-intersecting polygon drawing.
Thus, an X server has to be a fairly complicated piece of code. This
adds up to lots of memory. I don't think much can be done to fix this
while still keeping the few good points of X. The ability to grab X
client source code from 1988, compile it, and have it run with few
difficulties is not something to be scoffed at.

For those interested, I've read that AT&T's new 'plan 9' OS has a
graphics interface consisting of something like 10k lines of
code. It'll be interesting to see how this fares against X.

--

                      .oO finger for PGP key Oo.

 
 
 

Slimming X. Possible?

Post by Dan Hildebra » Sat, 22 Jul 1995 04:00:00




Quote:>How can X be slimmed down, to make it run faster on less memory?

>How does QNX Photon do it?

The paper at ftp.qnx.com:/pub/papers/qnx-pen.ps.Z explains the Photon
architecture.

--

http://www.qnx.com/~danh                    175 Terence Matthews
phone: (613) 591-0931 (voice)               Kanata, Ontario, Canada
       (613) 591-3579 (fax)                 K2M 1W8

 
 
 

Slimming X. Possible?

Post by Mark Komarins » Sat, 22 Jul 1995 04:00:00



: It is possible to slim down X, to make it run faster and requires less
: memory?

: What are the lessons we can learn from QNX Photon?

Never used QNX, so I can't say there, but a few ideas spring to mind:
Cut the number of colors to under 256 (8bpp)
Cut the size of the virtual desktop (but this may only use video mem)
If you're using fvwm, cut out some of the extra features (virtual windows, etc)
Run in a smaller video resoltion (800x600)

--

"Sure we should sell California to the Japanese.  It's going to fall into
the ocean anyway." - Car Talk (on NPR)

 
 
 

Slimming X. Possible?

Post by Matthew Cros » Sat, 22 Jul 1995 04:00:00




Quote:>It is possible to slim down X, to make it run faster and requires less
>memory?

Unfortunately, X as it stands is way overengineered, bloated, etc.
It suffers from second system syndrome big time.  You could re-engineer
X to take a lot of the bloat out, but it would be a pain, much better to
start from a clean slate.

But there are alternatives.  mgr is availible.

Gnustep is working on re-implimenting OpenStep (aka NeXTStep)  on top
of X, but they are eventually planning to us Ghostscript to go with
a display postscript base.

Also, 8 1/2, plan 9's windowing system is incredibally lean, mean, fast,
etc etc.  It lacks clicky icons and lots of other stupid Windowing junk,
so the majority of the lusers out there will hate it, but who cares.
("Brazil", the follow on to 8 1/2 also looks interesting.  They are planning
to reduce graphic operations down to blocks of pixels to easily integrate
TV and such)

Quote:>What are the lessons we can learn from QNX Photon?

Never used it, though if it is as well engineered as the rest of QNX,
probably quite a lot.  (QNX and Plan 9 are my two favourite OS's,
from an architectural point of view.  While Linux is well engineered,
since it is a re-doing of Unix it suffers from all Unix's warts--NFS,
feeping creatureism, that sort of thing)

--

Disclaimer:  It was another country, and besides, the wench is dead.

 
 
 

Slimming X. Possible?

Post by Doug DeJul » Sat, 22 Jul 1995 04:00:00




Quote:>It is possible to slim down X, to make it run faster and requires less
>memory?

Absolutely.  But it would not be easy.  And the best way to do it is
debatable.

Find the highest level, most abstract X interfaces you want to
support, and then re-implement it from scratch providing those
interfaces.  Want to be able to download and compile X programs, with
no worry about networking?  Then*the networking code, just
create a purely local streamlined app and series of libraries that
gives you the same basic functionality with the same API.  Also*
optional things, just do the bare minimum required.

Want the networking support to work?  Get a document that specifies
the raw X network protocol.  Then implement as server for it, from
scratch, hand tuned to a particular OS and hardware platform.

These would really, really streamline X.  They'd also probably be
really difficult, and nonportable.  They'd also be obsolete the moment
the next version of X comes out.  Worth it?

I hope something better comes along within 20 years or so.
--



 
 
 

Slimming X. Possible?

Post by Robert Woodco » Sun, 23 Jul 1995 04:00:00



Quote:>I've been thinking about this as well. X is just too big. I've never
>seen or touched QNX, so my opinions on it are rather vague, but from
>what I gather they get speed and small size just by cutting out as
>much of the extraneous stuff as they can. The X protocol is filled
>with lots of special cases that have to be dealt with, optimized away,
>etc. Most of the cruft comes from being designed when X terminals were
>much different than they are now, and X was designed to accomodate as
>many of the different vendor designs as possible. Thus, an X server
>has to be able to handle both bit-plane and frame-buffer memory
>organizations, in both big-endian and little-endian order, with
>several different types of pixel color assignments. To reduce the
>network usage, they also added many complicated drawing methods like
>wide, dashed, ellipse and filled, self-intersecting polygon drawing.
>Thus, an X server has to be a fairly complicated piece of code. This
>adds up to lots of memory. I don't think much can be done to fix this
>while still keeping the few good points of X. The ability to grab X
>client source code from 1988, compile it, and have it run with few
>difficulties is not something to be scoffed at.

This is *the* reason X needs to be as expandable as possible. Not all
users want to do *everything* from their computers. Not all people want
to edit the source code and trim out blocks that aren't useful to them.
This way, you can start out with a base kernel, and add stuff as needed.

Almost every single add-on in the history of MS-Windows has been a
kludge. This explains away about 20% of the crashes. The rest, well...
you know who's fault that is... <g>

But, *please* don't fall into the compatibility trap... Especially since
the Linux user base contains so many people that can maintain code. <g>
It's not worth compromising the speed or stability of the system. I would
love it (and I'm sure other people would too) if Linux + X effectively
turned my 486 into a P6... :)

Of course, I don't use Linux yet, so all this is outsider babble... :>
--
_________________________________________________________
Robert Woodcock | Note: Your standard disclaimers apply. |

................| it can be quite a curse) - Plucky Duck |

 
 
 

Slimming X. Possible?

Post by Anselm Lingna » Tue, 25 Jul 1995 04:00:00




> Gnustep is working on re-implimenting OpenStep (aka NeXTStep)  on top
> of X, but they are eventually planning to us Ghostscript to go with
> a display postscript base.

Of course this is not likely to turn out any slimmer or faster than
X is today :^)

Quote:> ("Brazil", the follow on to 8 1/2 also looks interesting.  They are planning
> to reduce graphic operations down to blocks of pixels to easily integrate
> TV and such)

I know about 8 1/2. Are there any papers etc. about Brazil?

Anselm
--

Filenames are only for people who can't remember where they put their files.
                                                           --- Tarjei T. Jensen

 
 
 

Slimming X. Possible?

Post by Jim Nan » Tue, 25 Jul 1995 04:00:00



|> It is possible to slim down X, to make it run faster and requires less
|> memory?

It would probably (certainly) be possible to rewrite some parts of the X
server to make them more efficient.  In particular, it would be nice to
have the server use mmap/munmap to allocate/free memory for things such
as large pixmaps so that the process size of the server could shrink as
well as grow.

I do not think there is too much you can change from the configuration files
which will shrink the size of the server much.

Jim

 
 
 

Slimming X. Possible?

Post by Harald Koen » Wed, 26 Jul 1995 04:00:00



Quote:> |> It is possible to slim down X, to make it run faster and requires less
> |> memory?
> It would probably (certainly) be possible to rewrite some parts of the X
> server to make them more efficient.  In particular, it would be nice to
> have the server use mmap/munmap to allocate/free memory for things such
> as large pixmaps so that the process size of the server could shrink as
> well as grow.

exactly this is implemented in XFree86 3.1.2 but unfortunately this
hasn't been tested long enough to go into the default binaries (safty first),
but sources are available and you can add

        #define UseInternalMalloc  YES

to your own "site.def" file and compile a new server...

Harald
--
All SCSI disks will from now on                     ___       _____
be required to send an email notice                0--,|    /OOOOOOO\
24 hours prior to complete hardware failure!      <_/  /  /OOOOOOOOOOO\
                                                    \  \/OOOOOOOOOOOOOOO\
                                                      \ OOOOOOOOOOOOOOOOO|//
Harald Koenig,                                         \/\/\/\/\/\/\/\/\/
Inst.f.Theoret.Astrophysik                              //  /     \\  \

 
 
 

Slimming X. Possible?

Post by Matthew Kenn » Wed, 26 Jul 1995 04:00:00



: |> It is possible to slim down X, to make it run faster and requires less
: |> memory?

: It would probably (certainly) be possible to rewrite some parts of the X
: server to make them more efficient.  In particular, it would be nice to
: have the server use mmap/munmap to allocate/free memory for things such
: as large pixmaps so that the process size of the server could shrink as
: well as grow.

A copying garbage collecgor would help in this---and many other programs--too.

: I do not think there is too much you can change from the configuration files
: which will shrink the size of the server much.

: Jim

 
 
 

Slimming X. Possible?

Post by Pete Fenel » Thu, 27 Jul 1995 04:00:00



Quote:> For those interested, I've read that AT&T's new 'plan 9' OS has a
> graphics interface consisting of something like 10k lines of
> code. It'll be interesting to see how this fares against X.

Plan9 is solving a different problem (that of building a scaleable
distributed operating system working across heterogeneous platforms), and its
GUI -- though fast and technically clever -- would not necessarily appeal to
the sort of user who likes Linux; 8 1/2 is spartan and *very* lean -- it's
not what you'd call a luxurious system. It's a Formula 1 car as opposed to
a family saloon :-)

If you want the clean and simple Plan 9 feel on Linux, you can get
ports of 9wm (a clone of the window manager), 9term (a clone of the
terminal emulator, which is actually built into the wm in the real
system) and sam (the editor), but they still sit on top of a big old X
server.

The internals of the plan 9 display system are *very* different to X, and
rely on some of the deeper secrets of the OS, particularly the control you
can have over the namespace as seen by processes -- the upshot of it is that
you can do wonderful things like run the window system remotely in a
*completely* transparent fashion -- you can even run the windowing system in
a window logged in elsewhere :-)

pete
--
Peter Fenelon - Research Associate - High Integrity Systems Engineering Group,
Dep't of Computer Science, University of York, York, YO1 5DD (+44 1904 433388)

 
 
 

Slimming X. Possible?

Post by black.. » Thu, 27 Jul 1995 04:00:00




>If you want the clean and simple Plan 9 feel on Linux, you can get
>ports of 9wm (a clone of the window manager), 9term (a clone of the
>terminal emulator, which is actually built into the wm in the real
>system) and sam (the editor), but they still sit on top of a big old X
>server.

Does anyone actually have a working 9term binary?  If so, can you
forward me the patches required to compile?

Cheers, Terry Murphy

 
 
 

1. Lightnux, the slim Linux

Yesterday night I had a dream :

I was visiting one of my clients' office and was looking at the people
working there :
- 8 secretaries typing mail as usual on their old x386 Win3.1 machine,
- 2 accountants entering book items from their term emulator using my
remote char-based accounting application running on the Linux Server,
- 3 managers using their wonderful Pentium Pro box under Win98 one hour per
day for just playing Doom.

In my dream I was unplugging the x386 machines, leaving to the users their
monitor, keyboard and mouse and plugging these peripherals back on a small
and flat box I placed under their monitor. This box was just offering a
VGA, a keyboard, a mouse and a network connection plugs : no floppy drive,
no CD and even no hard drive.

This box contained its own OS stored in a simple PROM. This OS was a tiny
Linux Kernel with just the minimal functions for good networking : Web
browser, terminal emulation and GUI. When the users plugged on their new
machine, there was no OS loading delay and no noise. They immediatly got
their connection to the server. The accountants kept using my accounting
application without any change. The secretaries worked on a new word
processor, running on the remote Linux server, providing Word 6 compatible
documents. And the managers, between two Doom games, could open and read
these documents from their Office 98 word processor.

Not only I could sell these nice boxes at an interesting price, but my
client gave me for free all their x386 CPUs, thanking me for taking off
this obsolete stuff. And with this old material I could build new boxes by
using the inside components, and sell back these boxes in a new client
office.

When I woke up this morning I went on the Web and looked for this tiny OS.
Unfortunately for me, the idea was already taken by QNX. QNX's OS can be
stored entirely on one floppy (1.44 MB)! Unbelievable!...But it is a
commercial product with the well known serie of development licenses,
run-time licenses, paying options and so on...The final bill raises to
several thousands $. And you remain in the hands of a commercial structure
and its changing pricing options, most often going higher than lower.

So my idea is the following :

Linux is getting fat. The last Red Hat distribution is about 800 MB and
needs at least 32 MB RAM to run efficiently. This is acceptable for a
server machine where you need more functionalities and which has higher
architecture.

But for a workstation, it becomes too much. So, why not to write a very
light and packaged version of the current Linux, with only the minimal
functions for networking easily? This "Lightnux" should be no more than 4
MB if we want to store it on a simple PROM.

Do anybody have an experience in that way? Do you think we can obtain
efficient results quickly by using standard Linux components, or is it
necessary to develop specific functions?

Thank you for your answer.

Pascal Ferrari

2. volume manager 2.6 question

3. Using a secondary AT-type controller underl linux

4. How to make Linux slim?

5. SilentBSD!

6. bash is too large, make it slim?

7. gethostbyname and g++ and Linux

8. Slim Driver Configuration

9. [v850] Update v850 includes for slimmed-down sched.h

10. Solaris 9 core install is not even remotely slim in weight

11. Q: Which -slim- micro-Linux (or other OS) for -this- app?

12. slimming down freebsd?