• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Ubuntu 5.10: Default install is kinda resource-intensive

kylef

Golden Member
I have this old HP laptop that was sitting in my office collecting dust. PIII 600, 256 megs RAM, and an upgraded 40gig HD. I also bought an Orinoco Gold wireless PCMCIA card because it supposedly has top-notch Linux compatibility.

So I decided to install a modern Linux distro to check in on the progress in this community, ever since I pretty much ditched it for Windows in 2001. (The first distro I installed was RedHat 4.2, if that gives you any idea.) My friends told me I should try out Ubuntu.

So anyway, to make a long story short, I'm posting this using Firefox on my Ubuntu laptop over my wireless network. Yay. Apparently I can still set up Linux after taking a half-decade hiatus. 🙂

But I am aghast at the memory consumption in the default install!

- Gnome nautilus and all the various applets take up more than 100 megs of resident memory!
- Firefox takes 110meg of VM with only two pages open!

So my question is: how do I trim down this Gnome-based resource hog into the lean, mean workstation machine that I used to remember?

Is there an easy way to ditch Gnome and replace it with a simpler, lighter-weight alternative which is 90% as functional? What will I sacrifice?

And is Firefox really this resource-intensive on Linux? I mean, geez... how can I have my XEmacs running with a few documentation websites open? 😉
 
Those memory stats are not accurate. Getting accurate memory usage is difficult in Linux without going through extra steps.. it's complicated and I don't want to go into it right now. Gnome is a bit of a hog, but it is not nearly so. I run Gnome desktop with half the memory you have and it still doesn't use swap unless I have a lot going on.

To improve performance of Linux on older machines and improve usability..

Set the display to 16 bit color. This will help older machines quite a bit and avoid memory usage so much and will vastly improve performance of things like your gnome terminal and such.

Set the background to no image with just a color background.

Install the Microsoft Web standards fonts, they are aviable from a bunch of different sources. Set up those fonts and turn off any anti-aliasing. Go into the advanced settings and set a DPI that is appropriate for your display. A simple chart is aviable at http://www.scantips.com/basics1a.html You can set it up in the X.org configuration if you know the exact HxW mm measurements for your display, but it's easier just to set them in the advanced section of the gnome font settings. If you have the ttf font files in your computer then just make a .fonts directory in your home directory and copy the ttf font files to that, they'll get become accessable automaticly.

Use a minimalist-style gnome theme. There is usually one called 'simple' use that.

Remove any applets from your panel that you don't have a need for.. These things are actually pretty bad memory hogs for what they do.

This one maybe a bit different from what version of gnome your using, but use the gconf-editor to change a setting on metacity to 'reduced_resources'.
Open up a terminal, type gconf-editor, go / --> apps --> metacity --> general --> and check mark 'reduced_resources'.

This will disable some features for metacity and do things like go into wireframe mode when you move windows around.



Otherwise to reduce the memory usage furthur you can stop using Gnome altogether. XFCE is a alternative GTK-based desktop environment that is gnome-like, but uses much less resources and is designed for performance. The next step down is going with a pure window manager like Fluxbox which is very popular. Other environments include WindowMaker desktop, which is based on the OpenSTEP API, which has a very high degree of comptability with Apple's Cocoa interface since they are based on the same API. Doesn't look much like it though. Then there are things like Rox Desktop. All sorts of stuff like that works very fast on low resource computers, much lower then yours.
 
Originally posted by: drag
Those memory stats are not accurate. Getting accurate memory usage is difficult in Linux without going through extra steps.. it's complicated and I don't want to go into it right now.
I'm a pretty technical guy, so if you point me to an article that explains why the reporting isn't accurate, I'd be happy to read about it. Despite the fact that I work on Windows, I actually know quite a bit about memory management on various OSes, but I haven't been paying attention to Linux for a few years. 😉

Set the display to 16 bit color. This will help older machines quite a bit and avoid memory usage so much and will vastly improve performance of things like your gnome terminal and such.
I'm not really a graphics guy, so I don't really understand why this should be the case. My laptop has 8 MB dedicated VRAM for the GPU. At 32-bits of color depth, a 1024x768 screen should take about 3 MB per framebuffer. So why would halving my color depth reduce memory consumption that much? Especially if the framebuffer is in VRAM, which is dedicated anyway, right? Or do graphics in Linux get rendered in user-mode buffers first?

Install the Microsoft Web standards fonts, they are aviable from a bunch of different sources. Set up those fonts and turn off any anti-aliasing. Go into the advanced settings and set a DPI that is appropriate for your display. A simple chart is aviable at http://www.scantips.com/basics1a.html
This is good info, thank you. I'll give it a whirl.

This one maybe a bit different from what version of gnome your using, but use the gconf-editor to change a setting on metacity to 'reduced_resources'...
This will disable some features for metacity and do things like go into wireframe mode when you move windows around.
Is metacity the replacement for Enlightenment?

Otherwise to reduce the memory usage furthur you can stop using Gnome altogether. XFCE is a alternative GTK-based desktop environment that is gnome-like, but uses much less resources and is designed for performance. The next step down is going with a pure window manager like Fluxbox which is very popular.
Fluxbox is actually what I should try. But I have long since forgotten how to set up a new window manager in Linux. Once upon a time I switched my SparcStation at school to use BlackBox rather than FVWM, but I'll be damned if I remember the exact steps... 🙂

It had something to do with modifying a .xsession file maybe that told XLogin what to run? I don't see one of those in my home directory anymore, but maybe I'm totally off base. The exact steps in the handoff from the XLogin program to a user's X session were always a bit unclear to me.
 
To setup a new window manager simply install it through the synaptic interface or apt-get or whatever you like using. From your graphical login screen were you enter your username and password you can sellect a fluxbox 'session', those things should be added automaticly.

Otherwise if you like to use startx you put what programs and window managers and such you want to start up in a .xinitrc file in your home directory. There should be samples for these somewere on your system.

Keep in mind that when using Fluxbox your going to loose niceties like your gnome font configuration and themes.. to make sure you keep any of those settings you can run 'gnome-settings-daemon' in the background which will then deal with theme'ng stuff with GTK applications. (in fedora/redhat stuff this isn't in your $PATH) Not sure how to make sure that starts up automaticly in fluxbox though. Various gnome related tools are generally named something like gnome-font-properties or gnome-session-properties and such if you want to access them from a xterm.

Is metacity the replacement for Enlightenment?

Metacity and Enlightenment 0.16 are Window managers and are pretty much interchangable. Used to be you had KDE-compatable, and Gnome-compatable window managers along with some that weren't compatable with either. Now there are 'EWMH' standards so that theoreticly any EWMH-compatable window manager can replace another.

Metacity is a simple, heavyweight (simple things tend to be complex to hide the complexity from the users) Window manager that is now the 'official' window manager for the Gnome desktop. With it you get all the nice GUI dialogs and such for it.

Enlightenment 0.16 has been continiously been given updates and now newer versions are EWMH compliant. I don't think Fluxbox is EWMH compliant, at least with current 'stable' versions, but that doesn't matter if your getting rid of the Gnome desktop completely.

For Gnome I like to use Openbox, which is designed to be used in Gnome or KDE. It's lightweight and has configuration stuff that I like.

I'm not really a graphics guy, so I don't really understand why this should be the case. My laptop has 8 MB dedicated VRAM for the GPU. At 32-bits of color depth, a 1024x768 screen should take about 3 MB per framebuffer. So why would halving my color depth reduce memory consumption that much? Especially if the framebuffer is in VRAM, which is dedicated anyway, right? Or do graphics in Linux get rendered in user-mode buffers first?

I think that this has to do with how fonts and other things are actually rendered, especially in Gnome. Current X.org's capabilities as far as 2d hardware acceleration is best described as 'suck', or 'virtually non-existant' so on low-cpu machines you can have a considurable performance improvement.. (generally media playback applications have various 'driver' options so that you can get good performance with those)

Just try it if you want if it doesn't make a difference you can go back. I am not sure of the exact issues, but it does make a difference in other people's laptops and such that I've looked at.

'm a pretty technical guy, so if you point me to an article that explains why the reporting isn't accurate, I'd be happy to read about it. Despite the fact that I work on Windows, I actually know quite a bit about memory management on various OSes, but I haven't been paying attention to Linux for a few years.

Good. Just as long as you don't think Virtual Memory is a file on your harddrive. 😛

It has to do with how things like shared libraries and cache stuff is taken into account. Often you get large amounts of applications that share most of the memory with each other, but will show up as seperate items in your memory stuff. Also the terms and stats can be misleading.

There is currently a large effort underway to reduce the memory usage and do optimizations on Gnome.
This wiki outlines a lot of the issues and such related to it.
http://live.gnome.org/MemoryReduction

Lots of good links from there. (a couple)
http://bmaurer.blogspot.com/2006/03/memory-usage-with-smaps.html
http://cvs.gnome.org/viewcvs/white-papers/MemoryUsage/MemoryUsage.txt?rev=1.2

For a long time it's been the highest priority to get everything working, usable, and stable. Now it's maturing to the point were some people are realy paying attention towards optimizations and integration... Especially with the interest in using Linux distros in developing countries and 'embedded' devices.

Here is the Linux kernel memory management home page. http://linux-mm.org/LinuxMMDocumentation
They gotten pretty out of date in the past, mostly going into 2.4 series kernel changes during it's lifetime, but now it looks like they are going to a wiki to keep things up to date faster. There may be some good stuff there.

As far as 'just gnome' goes I think that Gnome developers are starting to take advantage of OpenSolaris and Dtrace a bit to help out with profiling and optimization. Or at least Sun has been pimping dtrace and showing gnome people how to use it and examples of benifits to try to attract more developers to it's platform.

Or something like this.

With the next release of Ubuntu (6.04 Dapper Drake) should start to show off some of these 'enhancements'. The efforts of some gnome developers to optimize stuff started after the release of Gnome 2.14, which is the current desktop on Ubuntu 5.10. With Fedora 5 (just released with the Gnome 2.16 desktop) people claim to experiance better performance. So it should be interesting to reinstall Ubuntu from scratch when 6.04 is released and see if you notice a difference.
 
Originally posted by: drag
As far as 'just gnome' goes I think that Gnome developers are starting to take advantage of OpenSolaris and Dtrace a bit to help out with profiling and optimization. Or at least Sun has been pimping dtrace and showing gnome people how to use it and examples of benifits to try to attract more developers to it's platform.

Or something like this.

BSDTalk 030 talks about DTrace a bit (I think it was that one anyhow). If that's the right one it specifically mentions Gnome terminal being run under DTrace and the absurd number of calls it makes. If I hadn't been only half listening to it I'd probably remember more details. 😛
 
Ya.. Well people throw together all these programs using all these shared libraries. Then they use these functions that Gnome provides to do specific tasks and such without realy knowing what all these functions do in the background.

So you get these situations were, just a example, somebody might use a certain function in a dialog box or menu that gets called every time you click your mouse on it and this function may want to create a whole window and poll dozens of text files on your harddrive when all you want it to do is display some simple text. Or something like that. And it'll do this every single time.. maybe a half dozen times in a minute. It'll make everything seem very slow.

The applets tend to be the worst of it. They are optional items not included or activated by default so people aren't paying as close as attention to that as they do nautilus or whatnot and they are made by the more inexperianced people... So they end up being huge for what they are for and sometimes do bizzare things.

For instance on this machine right now I am running Gnome 2.12, I believe. My metacity window manager has a 'memory size' of 15.9 megs, but in reality it's only actually using 5.7 megs right now. Out of that 4.8 megs is shared with other applications... so that would be the GTK libraries and other system libs. So in actuality Metacity itself is only consuming .9 megs of RAM for what it does unique.

Now compare that to 'eggcup'. That's a little applet that I can click on to pause or cancel print jobs and stuff like that. Otherwise it just sits there with a little printer icon on my gnome-panel. It owns 41 megs in the vm, but has 7.9 megs active and 6.2 of that is shared.

So why is my window manager (which does a very complex thing and is continually in use) using less then a meg of ram, but my printer display applet (which does something very simple and is almost never in use) uses over a meg and a half?

I expect that it's sitting there doing system calls continiously every time my mouse brushes over it. 😛
 
Originally posted by: Nithin
drag, i tried xfce on ubuntu. the right click menu doesn't work. any ideas?


Sorry, don't know. I don't use Xfce much. Maybe check out the ubuntu forums. If it doesn't work for you then it's very very likely that it didn't work for somebody else, or even lots of other people, and they've found a fix for it already.
 
- Firefox takes 110meg of VM with only two pages open!

FF is ass. If you ever use xrestop to see how much pixmap space in the xserver it's using you'd die laughing. And if you leave it open for a day or so with only a few tabs it'll end up using several hundred megs of pixmaps space in the xserver. Generally I use Galeon, it uses Gecko for the rendering but for some reason doesn't have the memory problems that FF does.

I'm a pretty technical guy, so if you point me to an article that explains why the reporting isn't accurate, I'd be happy to read about it. Despite the fact that I work on Windows, I actually know quite a bit about memory management on various OSes, but I haven't been paying attention to Linux for a few years.

It's been a while since I've actually looked into it, but I believe it has to do with the accounting of shared pages. It's simple to see how many pages belonging to one process are shared, but it's impractical to determine the reverse. Meaning it would take way too much time to figure out all of the process's that every page in the system is mapped into.

Gnome was starting to get a little heavy, but I think they started to notice and are slowly trimming it back to decent levels. My biggest problem with them is their constant use of Python. It's much slower and more memory hungry than 'normal' compiled applications.

Fluxbox is actually what I should try. But I have long since forgotten how to set up a new window manager in Linux. Once upon a time I switched my SparcStation at school to use BlackBox rather than FVWM, but I'll be damned if I remember the exact steps...

Just install it. In Ubuntu (and all Debian based distros) it'll add a new option to the session menu of GDM and you can choose that when you login, it'll even ask you if you want to make that your default session.
 
Gnome was starting to get a little heavy, but I think they started to notice and are slowly trimming it back to decent levels. My biggest problem with them is their constant use of Python. It's much slower and more memory hungry than 'normal' compiled applications.

Python isn't bad. It's realy quite insane to do highly interactive programs in C anymore. You need a high level language to do interface stuff in and Python is a pretty good choice.

It works well with C stuff. Bindings to C modules are usually easy to do. So it matches the existing Gnome structure well. It's not as fast as something like Java or Mono, but it actually tends to use much less memory then either. It is more portable then java, since it doesn't depend on propriatory VM, and it doesn't have the legal issues surround either of them.

Also it's mature and has a crapload of free software products, modules, and source code aviable for it. OpenGL, SDL, scientific computing, multimedia and graphics, mathamatical stuff, etc etc etc.

Plus since it's used with gnome-related items a 'python' program is going to end up using 80% C-compiled stuff anyways since it's going to be running GTK bindings and all sorts of stuff like that.
 
Python isn't bad. It's realy quite insane to do highly interactive programs in C anymore. You need a high level language to do interface stuff in and Python is a pretty good choice.

IMO it's quite insane for a media player to be #3 in the top memory eating applications running on my machine. And python applications are noticably slower with regards to interactivity too.

 
Originally posted by: Nothinman
Python isn't bad. It's realy quite insane to do highly interactive programs in C anymore. You need a high level language to do interface stuff in and Python is a pretty good choice.

IMO it's quite insane for a media player to be #3 in the top memory eating applications running on my machine. And python applications are noticably slower with regards to interactivity too.

There are plenty of C programs that take up a lot of RAM also and are slow.

There is a write a wrong way to do anything..
For isntance right:
wajig
and wrong:
yum

The key is to write things that need to be fast in C. You write things that are complex or
difficult or bug-prone in Python. They go together fairly well.


Anyways..

What media player are you talking about? It certainly isn't either Rhythmbox or Totem.. which are the default Gnome items.

Is it Quod Libet?

The only Python stuff that I am aware of on my desktop is the Gnome Deskbar applet.. the thing that ties into beagle, email, and web searches among other things. It doesn't use much more then my other applets and has less then my weather applet thingy. I use straw RSS feed reader for a long time and I didn't notice that being slow.
 
There are plenty of C programs that take up a lot of RAM also and are slow.

Irrelevant, if you were to develop two apps that do the same thing in both C and Python 9 times out of 10 the Python version is going to be bigger and slower.

What media player are you talking about? It certainly isn't either Rhythmbox or Totem.. which are the default Gnome items.

No, it's not, but I did try Rhythmbox and Banshee and I couldn't get either of them to behave the way I'd like. Infact I tried them again right now to see if they had gotten any better and AFAICT nothing's changed. Hell you can't even edit the ID3 tags of an MP3 inside of Rhythmbox. And after 'importing' my music Rhythmbox is ~35M RSS and Banshee was nearly at 50M before it crashed while 'importing' my music. And totem doesn't even count, it's only comparable to WMP 7.

Is it Quod Libet?

Yes and so far it's the only one I've found that works decently, although it hovers ~50M RSS.

The only Python stuff that I am aware of on my desktop is the Gnome Deskbar applet.. the thing that ties into beagle, email, and web searches among other things. It doesn't use much more then my other applets and has less then my weather applet thingy. I use straw RSS feed reader for a long time and I didn't notice that being slow.

Well I don't have most of Gnome installed so I can't really look right now, just what's necessary for things like Galeon, Nautilus, etc to run.

Oh and I just installed Straw to see how it worked and it didn't. It downloaded the feeds and showed me that there were new items but it wouldn't populate the item list on the right.
 
Originally posted by: Nothinman
There are plenty of C programs that take up a lot of RAM also and are slow.

Irrelevant, if you were to develop two apps that do the same thing in both C and Python 9 times out of 10 the Python version is going to be bigger and slower.

If you were to setup a situation were you had identical programs, one written in C and the other written in Python... Then yes, probably 10 times out of 10 the C will be faster and consume less ram.

But the the problem is that generally speaking C programs are also going to be more likely to have memory leaks, crash, and are much more likely to have security issues if they are put in a position were that sort of thing matters. They also generally take longer to develop and end up being more costly. Generally speaking if you have 2 equally good programmers and have a time limit on what they can produce they will end up with a more stable and feature-full product with python even if it will be slightly slower and use more ram.

Generally speaking, of course. The biggest difference is going to be in the quality of the programmer, by far, not so much the sort of programming language they use.

It's similar to why you don't generally program dynamic webpages in C or system kernels in assembler.

For my RSS reader I've since switched to Liferea.. a C program, I beleive. 😉

 
But the the problem is that generally speaking C programs are also going to be more likely to have memory leaks, crash, and are much more likely to have security issues if they are put in a position were that sort of thing matters. They also generally take longer to develop and end up being more costly. Generally speaking if you have 2 equally good programmers and have a time limit on what they can produce they will end up with a more stable and feature-full product with python even if it will be slightly slower and use more ram.

I understand the differences in the langauges, I just don't care. My machine only has 1G of memory, if I leave everything open it'll start touching swap after only 1 day. Mostly that's FF's fault, but crap like Quod Libet doesn't help matters.

For my RSS reader I've since switched to Liferea.. a C program, I beleive.

I've been using it for a while now but it also hovers around 25M RSS. Maybe my expectations are just unrealistic.
 
I've been unable to find a *correct* set of instructions for installing the Microsoft TrueType fonts on Ubuntu 5.10.

The instructions I have found which appear to be the most up-to-date are only for RPM-based distributions.

Anyone have a link for what I need to do on Ubuntu?

Thanks!
 
Originally posted by: kylef
I've been unable to find a *correct* set of instructions for installing the Microsoft TrueType fonts on Ubuntu 5.10.

The instructions I have found which appear to be the most up-to-date are only for RPM-based distributions.

Anyone have a link for what I need to do on Ubuntu?

Thanks!

As long as their true type fonts all you have to do is make a .fonts (don't forget the . in from of it and that that . makes it hidden) directory in your home directory and copy the ttf files to that. Then they'll be automaticly aviable to your applications.

There is a tarball with them here if you haven't found a good package for it.
http://avi.alkalay.net/software/webcore-fonts/
 
Originally posted by: xcript
Originally posted by: kylef
Anyone have a link for what I need to do on Ubuntu?
<a target=_blank class=ftalternatingbarlinklarge href="https://wiki.ubuntu.com/FontInstallHowto">https://wiki.ubuntu.com/FontInstallHowto</a>

Unfortunately, the msttcorefonts package does not seem to exist when I search Synaptic. Has it been removed?

Lots of people on the Debian forums point to that package, but I've added all available repositories to Synaptic and run a search, and it comes up with nothing...

Am I somehow not running Synaptic correctly?
 
packages.ubuntu.com says it's in multiverse, are you sure you have it enabled and you hit update after you enabled it?
 
You need to update things first, so after you add the sources you need to update it to pull down the new package selection. Then you can search for them.

If that doesn't work then try running from the terminal:
apt-get update
apt-cache search corefont

And see if you can get some errors or find it that way.

I have a mscorefonts package aviable, but seriously I just like copying files to the ~/.fonts directory. It works automaticly you don't have to restart anything, plus I have lots of other fonts that I have.
 
Originally posted by: Nothinman
packages.ubuntu.com says it's in multiverse, are you sure you have it enabled and you hit update after you enabled it?

Yup, I have both Multiverse (binaries and source) repositories selected. No luck.

I'm doing a search for "mstt" and the only thing that shows up is "X.Org X server -- IMSTT driver", which is already installed and doesn't appear to have anything to do with truetype fonts.

Drag, I have already updated everything. I had to do that already just to get XEmacs installed. It also pulled all of the security updates down using the updater gnome panel plugin.

Really, I don't know what's wrong. There must be some stupid setting in Synaptic messed up?
 
Back
Top