Hacker News new | ask | show | jobs
by wildduck 2335 days ago
What's window manager they are using? It must be light weight to run on just on 1G of RAM.
5 comments

Oh wow, now I feel old. I remember compiling and running Java course work on a laptop with 8MB of RAM. The display was monochrome, and the compiler literally took ten minutes to spin up (as go get, and drink a cup of coffee before it's done - probably swapping like mad). But it worked well enough with x11 and fvwm.

I see i was on a supercharged "pro" workstation with that much ram, though:

http://www.fvwm.org/history/

> There were two or three reasons for starting FVWM and RXVT. First, I had a need 33 MHZ 486 laptop PC with only 4 MB of RAM, and I thought linux and X11 were way better than the windows versions of the day. X11 with TWM and xterm would run on my PC, but just barely.

That's funny, because fvwm is much more usable than twm. I would have guessed it would be heavier on reasources because twm didn't do much.

I got on a nostalgia kick recently and switched back to fvwm on one of my machines. (Which incidentally runs FreeBSD.)

Wow. Looks like a lot of old computer can be put to good use.
fvwm was always faster than TWM, even if at a first TWM runs faster. Also, TCL would be faster than Java :)
Maybe back then, but nowadays I'm pretty sure java is a lot faster than tcl.
Actually the small Java gui app (tick tack toe, or something like it, I think) ran fine. And I think the startup problems with javac might have been solved too (use less ram) - but I never did get around to it. I think I tried IBMs "jikes" compiler, which I think was (at least partially) implemented in c++.

But mostly I was just shocked anyone could think running a wm could reasonablyrrequire a gig of ram...

>But mostly I was just shocked anyone could think running a wm could reasonablyrrequire a gig of ram...

Eh, most people run Fvwm/Blackbox/WMaker with 16MB/32MB of RAM. 8... well. To be confortable enough, maybe with NetBSD, FVWM, URxvt, a ultraslimmed kernel and jikes/any tiny Java compatible VM.

To be fair, WMs do not use much RAM, it’s DEs that do.
What is the distinction between DEs and WMs?
wm just manages windows, DE is usually this + a full application suite e.g. preferences UI, File Browser, web browser, photo viewer, etc, etc, etc and some kind of 'component' mechanism so that those pieces can interoperate better (e.g. file browser reads from some settings application to determine what photo app to open things with)
A DE manages user’s view of applications and, in general, the overall user experience (usually in the GUI setting); it also provides an API for applications to seamlessly fit that experience. Window management is but a small part of this.
A DE is a desktop environment and includes niceties like text editors, settings applications, music playered, and things that make an ecosystem. Gnome and KDE are the two most popular DEs. WM is a window manager and just handles well, window management. Sometimes that included decoration and styling, usually it includes moving and closing and minimizing them. Think, Mutter, Sway, or fvwm. A WM is a subset of a DE.
I'm pretty sure regular Ubuntu would even run fine on 1gb! Would probably eat half your ram at idle though.
...huh?

My window manager is currently taking about 65K of RAM, and X is using ~800K.

Granted, I run a pretty lightweight setup, but a 'normal' ship can't be 4 orders of magnitude higher, can it?

I cannot believe those numbers. I've never known X to use 800KB of RAM.

IIUC it needs to hold at own one screen-sized framebuffer in memory, which is ~5MB on my system.

Practically speaking Xorg right now is using 460MB of virtual memory, 39MB resident, and 22MB shared (and that's _without_ Chromium running, ha).

And i3 is using 56MB virtual, 33MB resident, 32MB shared.

Also, for reference, "sleep infinity" uses 2324K virtual, 704K resident, and 640K shared. You might be able to beat that by working entirely in assembly language and using hair-raising allocation tricks like using the few KB of stackspace kernel gives you as your heap...? I'm not sure.

Won't the screen-framebuffer be on gpu? Also, virtual memory shouldn't really matter.

Anyway:

    $ ps aux|egrep -i '(xorg|fvwm)'|awk -c '{print $2}'|xargs sudo pmap -x|grep 'total kB'
    total kB          808332  124808   86204
    total kB           64920   15724    2984
    total kB           61656   14428    2400
> Won't the screen-framebuffer be on gpu?

Not in X11. The front buffer needs to be in memory because it gets populated on-the-fly from windows via the Expose event, and the processes that those windows belong to need to be able to draw to it as a result. The protocol was also designed before there was any modern concept of "GPU memory", and couldn't assume the presence of anything more than very primitive 2D drawing hardware.

Another thing that can cause some extra memory use is applications caching pixmaps in the X server. X11 lets you register pixmaps server-side so that they don't have to be repeatedly transmitted across a network. This is great for X forwarding over networks, but largely unnecessary on modern hardware where both the server and clients reside on the same machine, and can cause the server's memory usage to balloon, especially with applications like web browsers.

That's 800 MB, not kB. Even the smallest process in your example is 14 MB.
OpenBSD:

SIZE RES

47M 41MB Xorg

2324K 9328K cwm

Maybe for "normal = GNOME/KDE"?
It looks like Openbox. I see openbox and xfce in the packages listing.