Discussion:
Tuning for very little RAM
Da Rock
2010-01-05 10:03:45 UTC
Permalink
Its been a while- work's has been keeping me very busy for months now.

I have revived an old laptop which has very little RAM, and it is
absolutely hammering the swap.

I'm trying to set it up as a demo for some skeptics with no money, so I
need email, internet (with plugins), openoffice, acrobat, and wine.

Aside from all that though, for the academics of it how can I help this
situation? The laptop has around 100MB RAM, with 16k free, and has a new
install of FreeBSD 8.0.

Cheers
Gary Kline
2010-01-06 08:04:26 UTC
Permalink
Post by Da Rock
Its been a while- work's has been keeping me very busy for months now.
I have revived an old laptop which has very little RAM, and it is
absolutely hammering the swap.
I'm trying to set it up as a demo for some skeptics with no money, so I
need email, internet (with plugins), openoffice, acrobat, and wine.
Aside from all that though, for the academics of it how can I help this
situation? The laptop has around 100MB RAM, with 16k free, and has a new
install of FreeBSD 8.0.
Cheers
It's late here so I'm pretty much doing this ad hoc, but I think you
should renice the least important apps. Your mail MUA/MTA can be set
to very low prio, for instance. If this is an ongoing demo, bring up
and leave up OOo and have it set a it higher than your email. wine:
don't know. Your broswer should be set very high.

gary

PS: About three years back I ran a 1998 HP deskyop with less than 512M
with full KDE. It was slow is some things, but perfectly adaquate so
long as I didn't try everything at once!
Post by Da Rock
_______________________________________________
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
--
Gary Kline ***@thought.org http://www.thought.org Public Service Unix
http://jottings.thought.org http://transfinite.thought.org
The 7.79a release of Jottings: http://jottings.thought.org/index.php
Bill Moran
2010-01-06 12:25:31 UTC
Permalink
Post by Da Rock
Its been a while- work's has been keeping me very busy for months now.
I have revived an old laptop which has very little RAM, and it is
absolutely hammering the swap.
I'm trying to set it up as a demo for some skeptics with no money, so I
need email, internet (with plugins), openoffice, acrobat, and wine.
Aside from all that though, for the academics of it how can I help this
situation? The laptop has around 100MB RAM, with 16k free, and has a new
install of FreeBSD 8.0.
The most obvious thing to do is reduce the number of running programs.
Go through /etc/ttys, for example, and disable all but one or two consoles,
and edit /etc/rc.conf to disable anything that you don't need on the
system (possible sendmail, syslog?, etc)
--
Bill Moran
http://www.potentialtech.com
http://people.collaborativefusion.com/~wmoran/
Charlie Kester
2010-01-06 17:21:06 UTC
Permalink
Post by Bill Moran
Post by Da Rock
Its been a while- work's has been keeping me very busy for months now.
I have revived an old laptop which has very little RAM, and it is
absolutely hammering the swap.
I'm trying to set it up as a demo for some skeptics with no money, so I
need email, internet (with plugins), openoffice, acrobat, and wine.
Aside from all that though, for the academics of it how can I help this
situation? The laptop has around 100MB RAM, with 16k free, and has a new
install of FreeBSD 8.0.
The most obvious thing to do is reduce the number of running programs.
Go through /etc/ttys, for example, and disable all but one or two consoles,
and edit /etc/rc.conf to disable anything that you don't need on the
system (possible sendmail, syslog?, etc)
The other most obvious thing to do is to look at the apps you're running
and see if there are more lightweight alternatives.

If I had to run a machine like that, I'd probably want to avoid X
Windows altogther and go console-only. But it sounds like your
"skeptics" won't let you do that.

Assuming you have to use X, you'll want to avoid heavyweight desktop
environments like KDE or Gnome. I like tiled window managers like musca
or dwm myself, but your skeptics will probably want a more traditional
window manager (aka MS-Windows clone) like xfce or openbox.

When you say "internet (with plugins)" I think you mean Firefox. If
this isn't a hard and fast requirement, take a look at some of the more
lightweight browsers like Midori, Kazehakase or Arora. (I'd recommend
even more lightweight alternatives like surf or elinks, but I don't
think your skeptics will approve.)

Same for OpenOffice. There are alternatives to each of the apps in the
OpenOffice suite that might not have all the same bells and whistles,
but will run in much less RAM.

For some ideas on which apps to try, look at the apps bundled in some of
the Linux distros that target small machines.
http://bengross.com/smallunix.html has a good list of these distros.
Charlie Kester
2010-01-06 17:40:21 UTC
Permalink
Post by Charlie Kester
For some ideas on which apps to try, look at the apps bundled in some of
the Linux distros that target small machines.
http://bengross.com/smallunix.html has a good list of these distros.
Hmm, I probably should have checked that reference more thoroughly
before using it here. It's not as helpful for these purposes as I
thought.

Instead, I recommend googling for "lightweight linux apps". It's a
frequently-discussed topic, and the people involved seem to love making
lists. Most of the apps mentioned are in the FreeBSD portstree, so don't
be put off by the fact that the discussion is usually confined to Linux.
Warren Block
2010-01-06 17:52:32 UTC
Permalink
Post by Charlie Kester
Assuming you have to use X, you'll want to avoid heavyweight desktop
environments like KDE or Gnome. I like tiled window managers like musca
or dwm myself, but your skeptics will probably want a more traditional
window manager (aka MS-Windows clone) like xfce or openbox.
Hey, xfce is not like Windows, it's fast. If you want really light and
Windows-like, icewm. Although last time I tried it, desktop icons--the
lifeblood of the typical Windows user--required external programs
(idesk) and were a hassle.
Post by Charlie Kester
When you say "internet (with plugins)" I think you mean Firefox. If
this isn't a hard and fast requirement, take a look at some of the more
lightweight browsers like Midori, Kazehakase or Arora. (I'd recommend
even more lightweight alternatives like surf or elinks, but I don't
think your skeptics will approve.)
AdblockPlus and FlashBlock are near requirements for browsing,
particularly for slow machines. Maybe they'll work with non-Firefox
gecko browsers.
Post by Charlie Kester
Same for OpenOffice. There are alternatives to each of the apps in the
OpenOffice suite that might not have all the same bells and whistles,
but will run in much less RAM.
gnumeric is nice for a spreadsheet. May not be particularly
lightweight, but lighter than OO.

-Warren Block * Rapid City, South Dakota USA
Charlie Kester
2010-01-06 18:29:59 UTC
Permalink
Post by Warren Block
Post by Charlie Kester
Assuming you have to use X, you'll want to avoid heavyweight desktop
environments like KDE or Gnome. I like tiled window managers like musca
or dwm myself, but your skeptics will probably want a more traditional
window manager (aka MS-Windows clone) like xfce or openbox.
Hey, xfce is not like Windows, it's fast.
LOL
Post by Warren Block
If you want really light and Windows-like, icewm. Although last time I
tried it, desktop icons--the lifeblood of the typical Windows
user--required external programs (idesk) and were a hassle.
I don't think we want to hijack this thread or this forum and turn it
into a debate over which window managers and apps are best. As I
pointed out in my followup to my original reply, there's already a
voluminous discussion on those topics. I think we should simply point
interested readers in that direction and let them make up their own
minds.
Post by Warren Block
Post by Charlie Kester
When you say "internet (with plugins)" I think you mean Firefox. If
this isn't a hard and fast requirement, take a look at some of the more
lightweight browsers like Midori, Kazehakase or Arora. (I'd recommend
even more lightweight alternatives like surf or elinks, but I don't
think your skeptics will approve.)
AdblockPlus and FlashBlock are near requirements for browsing,
particularly for slow machines. Maybe they'll work with non-Firefox
gecko browsers.
Good point. Something anyone considering these Firefox alternatives
should investigate.
Post by Warren Block
Post by Charlie Kester
Same for OpenOffice. There are alternatives to each of the apps in the
OpenOffice suite that might not have all the same bells and whistles,
but will run in much less RAM.
gnumeric is nice for a spreadsheet. May not be particularly
lightweight, but lighter than OO.
Same with Abiword for a word processor. But again, we probably
shouldn't get too deep into the discussion of various apps.
Kaya Saman
2010-01-06 19:02:49 UTC
Permalink
[...]
Post by Charlie Kester
I don't think we want to hijack this thread or this forum and turn it
into a debate over which window managers and apps are best. As I
pointed out in my followup to my original reply, there's already a
voluminous discussion on those topics. I think we should simply point
interested readers in that direction and let them make up their own
minds.
[...]

I am currently using a PIV 2.4GHz with 480MB RAM with fluxbox!

This works really well, I have firefox and opera browsers installed and
will look at getting my favorite Seamonkey installed too sometime but
isn't a priority as this machine doubles as a DNS, NTP, NFS, and Radio
streaming server :-)

And I only have a 35GB HD too which is peanuts considering that in my
full-blown network in my other house I have round 3.2TB.......

So far am only using 80-90MB RAM when X is turned off! With X on it's
round ~125MB that's with running Xterm, Firefox, and Rhythmbox or even
Mplayer.

In my opinion it's always best to test and try out a few WM's to see
which one fits the bill best, after that it's easy!

Regards,

Kaya
Da Rock
2010-01-06 20:13:29 UTC
Permalink
Post by Kaya Saman
[...]
Post by Charlie Kester
I don't think we want to hijack this thread or this forum and turn it
into a debate over which window managers and apps are best. As I
pointed out in my followup to my original reply, there's already a
voluminous discussion on those topics. I think we should simply point
interested readers in that direction and let them make up their own
minds.
[...]
I am currently using a PIV 2.4GHz with 480MB RAM with fluxbox!
This works really well, I have firefox and opera browsers installed and
will look at getting my favorite Seamonkey installed too sometime but
isn't a priority as this machine doubles as a DNS, NTP, NFS, and Radio
streaming server :-)
And I only have a 35GB HD too which is peanuts considering that in my
full-blown network in my other house I have round 3.2TB.......
So far am only using 80-90MB RAM when X is turned off! With X on it's
round ~125MB that's with running Xterm, Firefox, and Rhythmbox or even
Mplayer.
In my opinion it's always best to test and try out a few WM's to see
which one fits the bill best, after that it's easy!
I'm running icewm - desktop icons are not a priority atm, but I will use
idesk later.

I think sysctl options will help, as well as reducing my consoles. I'll
keep everyone posted and see what happens.

Thanks for the pointers guys.
Charlie Kester
2010-01-06 20:32:27 UTC
Permalink
Post by Kaya Saman
[...]
Post by Charlie Kester
I don't think we want to hijack this thread or this forum and turn it
into a debate over which window managers and apps are best. As I
pointed out in my followup to my original reply, there's already a
voluminous discussion on those topics. I think we should simply point
interested readers in that direction and let them make up their own
minds.
[...]
I am currently using a PIV 2.4GHz with 480MB RAM with fluxbox!
Well, I'm currently using a P3 866MHz with 512MB RAM with musca!

And it works very well too. ;-)

Anyway, like I said, let's not get too carried away with this line of
thought. This thread is about tuning for very little RAM. Choosing
lightweight apps is only one of the things needed to tackle that
problem.
Gary Kline
2010-01-06 21:02:25 UTC
Permalink
Post by Charlie Kester
Post by Bill Moran
Post by Da Rock
Its been a while- work's has been keeping me very busy for months now.
I have revived an old laptop which has very little RAM, and it is
absolutely hammering the swap.
I'm trying to set it up as a demo for some skeptics with no money, so I
need email, internet (with plugins), openoffice, acrobat, and wine.
Aside from all that though, for the academics of it how can I help this
situation? The laptop has around 100MB RAM, with 16k free, and has a new
install of FreeBSD 8.0.
The most obvious thing to do is reduce the number of running programs.
Go through /etc/ttys, for example, and disable all but one or two consoles,
and edit /etc/rc.conf to disable anything that you don't need on the
system (possible sendmail, syslog?, etc)
The other most obvious thing to do is to look at the apps you're running
and see if there are more lightweight alternatives.
If I had to run a machine like that, I'd probably want to avoid X
Windows altogther and go console-only. But it sounds like your
"skeptics" won't let you do that.
Assuming you have to use X, you'll want to avoid heavyweight desktop
environments like KDE or Gnome. I like tiled window managers like musca
or dwm myself, but your skeptics will probably want a more traditional
window manager (aka MS-Windows clone) like xfce or openbox.
Or even lighter weight, CTWM, which is just a step up from twm....
Post by Charlie Kester
When you say "internet (with plugins)" I think you mean Firefox. If
this isn't a hard and fast requirement, take a look at some of the more
lightweight browsers like Midori, Kazehakase or Arora. (I'd recommend
even more lightweight alternatives like surf or elinks, but I don't
think your skeptics will approve.)
Same for OpenOffice. There are alternatives to each of the apps in the
OpenOffice suite that might not have all the same bells and whistles,
but will run in much less RAM.
AbiWord is a great word-processor if that would serve Da Rock's
needs. For very kwik browsing I use links -G [[the graphical
incarnation of the otherwise text]] links.

Every bell and whistle is 'just a tad more'; but then so many tads
add up to tons; so it takes some forethought before piling on the
apps. Da Rock, did you mis-type that you only have 16k free? ....
Post by Charlie Kester
For some ideas on which apps to try, look at the apps bundled in some of
the Linux distros that target small machines.
http://bengross.com/smallunix.html has a good list of these distros.
Good one!

gary
Post by Charlie Kester
_______________________________________________
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
--
Gary Kline ***@thought.org http://www.thought.org Public Service Unix
Bruce Cran
2010-01-06 15:52:59 UTC
Permalink
On Tue, 05 Jan 2010 20:03:45 +1000
Post by Da Rock
Its been a while- work's has been keeping me very busy for months now.
I have revived an old laptop which has very little RAM, and it is
absolutely hammering the swap.
I'm trying to set it up as a demo for some skeptics with no money, so
I need email, internet (with plugins), openoffice, acrobat, and wine.
Aside from all that though, for the academics of it how can I help
this situation? The laptop has around 100MB RAM, with 16k free, and
has a new install of FreeBSD 8.0.
You can save a bit of memory by building a custom kernel. First, remove
any options you don't need such as INET6, NFS, AUDIT etc. Then, you can
replace "device ata" with more specific drivers, and "device mii" with
specific PHY drivers for your NIC. On a 128MB box I have that's running
8-STABLE my kernel is just 4.1MB.

You should also be able to build Xorg so it'll use less memory - for
example by not requiring hald but getting it to read the
configuration from xorg.conf instead.

You can also tell FreeBSD to agressively swap idle processes out by
setting vm.swap_idle_enabled to 1.
--
Bruce Cran
Ian Smith
2010-01-09 04:48:59 UTC
Permalink
In freebsd-questions Digest, Vol 292, Issue 8, Message: 13
Post by Bruce Cran
On Tue, 05 Jan 2010 20:03:45 +1000
Post by Da Rock
Its been a while- work's has been keeping me very busy for months now.
I have revived an old laptop which has very little RAM, and it is
absolutely hammering the swap.
I'm trying to set it up as a demo for some skeptics with no money, so
I need email, internet (with plugins), openoffice, acrobat, and wine.
[Rock, mate, you may be on a hiding to nothing trying to run X apps in
100MB (128MB fitted I guess?) while setting yourself up as the advocate
of an OS they're going to think is soooo slow .. but that's just me :-]

With a lightweight wm it may be better, but you're talking about some
big apps. OTOH, 256MB is plenty for that sort of usage; any chance of
adding more RAM to it? Even another 32MB will really help ..
Post by Bruce Cran
Post by Da Rock
Aside from all that though, for the academics of it how can I help
this situation? The laptop has around 100MB RAM, with 16k free, and
has a new install of FreeBSD 8.0.
I just manage with 160MB on a old Celeron 300 laptop whose prime mission
is pppoe, firewall, nat and routing for the LAN, half a dozen obscure
websites, DNS, mail and such .. plus until now, KDE 3.5 on Xorg 6.9 on
5.5-STABLE. Just! That with 30-40% swap (of 384MB) in use, but mostly
static, eg 6 more Konsoles I'm not using just now, 5x minimised kwrites
for sources I may edit a few times a week, stuff like that stashed away
in swap, using very little resident memory, ie not as bad as it looks :)
Post by Bruce Cran
You can save a bit of memory by building a custom kernel. First, remove
any options you don't need such as INET6, NFS, AUDIT etc. Then, you can
replace "device ata" with more specific drivers, and "device mii" with
specific PHY drivers for your NIC. On a 128MB box I have that's running
8-STABLE my kernel is just 4.1MB.
Indeed. That's no bigger than my trimmed 5.5 kernel, good to hear.
Post by Bruce Cran
You should also be able to build Xorg so it'll use less memory - for
example by not requiring hald but getting it to read the
configuration from xorg.conf instead.
Again talking on the margins of usability, I notice that the Xorg with
7.0-RELEASE (X server 1.4.0) only used similar memory to 6.9 (30-50M,
say 20M resident), but on 8.0-RELEASE (X server 1.6.1) top shows SIZE
126M RES 115M .. on a 256MB laptop, eek! It's a HAL-free config, though
installed from packages so not at all optimised. Will try that later,
while I'm hunting for 1G RAM at a decent price for it (Thinkpad T23)
Post by Bruce Cran
You can also tell FreeBSD to agressively swap idle processes out by
setting vm.swap_idle_enabled to 1.
Thanks for this, Bruce; I hadn't come across it before, or missed it.

This has had an amazing and so far apparently only beneficial effect on
the 5.5 box. At 127d uptime, I crossed my fingers and set that, to see
swap drop from its then steady 46% (~15 mozilla tabs open, past time to
restart the leaky thing anyway :) to below 40% in a matter of minutes.

A little extra (async) swap in/out activity for sure, but contrary to
expectations it's noticeably more responsive to things like switching
desktops/windows on a slow machine already under swap stress, and even
somehow(?) has increased idle CPU in top by about 3% to over 90%!

cheers, Ian

Continue reading on narkive:
Loading...