Russell Coker: Shared Objects and Big Applications
Some time ago I wrote a little utility named memlockd [1]. Memlockd will lock files into memory which allows significantly faster access when the system pages heavily, in my simulated tests I have found that having the programs and shared objects needed for logging in locked in memory can make it possible to login without a timeout when there is heavy paging, this can make the difference between recovering a system with some processes that are out of control and having to reboot it (often without discovering the root cause).
As always happens some people use my software in ways that I never planned. One guy is using it to try and make OpenOffice.org load faster. I m not sure that this is a good idea. In a typical installation when configured for the purpose that I intended it (system recovery from a rabbit process) memlockd will take a bit less than 10M of RAM on an i386 platform (that is for bash, login, sshd, getty, busybox, and all necessary shared objects and a few data files. Since RHEL 4 Red Hat distributions have whinged at boot time if there was less than 256M of RAM available, installation of a Red Hat based system on anything less than 128M of RAM has been impossible for some years, and Debian systems perform very poorly with less than about 128M of RAM when you run apt-get. I initially designed memlockd to run on my SE Linux Play Machine which has 128M of RAM in it s current incarnation. Locking 7.5% of RAM on the system may impact performance, but as a large part of that RAM is used for things like libc and bash which tend to be partially paged in at all times this shouldn t be a noticeable impact. But locking 100M or more of OpenOffice seems more likely to have the potential to hurt performance, I often run OpenOffice on a machine with 512M of RAM and the biggest desktop machine I use has 1.5G of RAM for me it wouldn t make sense to lock OpenOffice into memory.
But it could be that there is some unusual aspect of his system that makes running memlockd with OpenOffice likely to give worthy benefits in performance without significantly hurting performance for other programs, for example it could have 4G of RAM and a really slow disk. It is also a possibility that the usage of the system makes OpenOffice so much more important than other programs that any decrease in performance in other areas is not relevant. In any case I m happy to help people use my software to do unusual things so I ll support this use.
I ve been asked why memlockd doesn t seem to give much benefit when starting up OpenOffice when run with +/opt/openoffice.org3/program/soffice.bin in the config file, where the + means to lock all shared objects that ldd reports that the binary needs.
for n in ldd /usr/lib/openoffice/program/soffice.bin sed -e s/^.*=..// -e s/\ .*// sort -u ; do readlink -f $n ; done sort -u > ldd.txt
I used the above command to get a list of all shared objects that ldd reports for the soffice.bin program. On my system (Debian/Lenny i386) it reports 77 shared objects loaded. When memlockd locks all those ps reports that the RSS is 51944K.
cat /proc/1234/maps sed -e s/^.*\ // sort -u > /tmp/map.txt
Then I used the above command to get a list of the files that are memory mapped by OpenOffice when running OpenOffice calc where 1234 is the PID of the soffice.bin process (I expect that the numbers will be similar for writer, impress, etc I just happened to have a spreadsheet open). It reports 172 memory mapped files which include 9 files related to fonts and 64 shared objects under /usr/lib/openoffice/program which are not found by ldd among other things. It s quite common for a large application to use dlopen(3) at run-time to map shared objects instead of linking against them. Running memlockd with this list gave an RSS of 118644K, which is more likely to give a useful performance boost to OpenOffice load times.

As someone born in India, I sometimes look around and wonder, Where are the
Indians (and other South Asians) in Free Software?
(I don't mean to exclude South Asians from other countries, so I will lump
us together. I believe that we are more similar than we are different,
although I know more about India than about the rest of South Asia.)
There is no shortage of Indians performing information technology jobs
in the United States. The same is true in academia; the Computing
Research Association uses National Science Foundation data to show
New Zealand:

For a very long time my laptop (running sid for a few years now) has
been booting kind of slowly. It looked like there was a 2-3 second
delay every time a kernel module was loaded, which resulted in something
like 3 minutes total boot time. Never bothered me enough, but
yesterday I've finally got some time to investigate. After increasing the
verbosity of
10 days ago, I uploaded
Collabora was kind enough to buy N900s for all its employees. Yay! I
got mine on Friday and has been playing around with it quite a bit.
It's very shiny and the user experience is a lot better than the
N810. There are a few graphical glitches, it seems it's XDamage
damaging a bit of a window and it's just not quick enough to repaint.
Not a problem, and it has far fewer instances of just hanging for half
a second which my iPhone has. That is, it hasn't had any of those
yet.
The screen is good, but resistive. Takes a short while to get used to
when you're used to capacative, but it's not a problem at all. The
keyboard is good, but I need to map something as the compose key.
Having US/UK key caps and using the Norwegian layout is a bit
confusing. Not really the fault of the device though.
The web browser is generally quite good. The gestures take a bit of
time to get used to, but they're not hard as such. Some of the
default "applications" are implemented as just links to the web pages
of services like Twitter, which is a bit silly as you don't even get a
version that's optimised for the N900. They're not useless, but they
are absolutely nowhere near a real application. Also, the "Store"
(Ovi Store) application/web page says "coming soon", which is quite
odd.
I'm not sure if I can change the selection of applications on the
default application list, but modifying the desktop is easy. There
seems to be few themes and background images available so far, at
least in anything resembling official repositories. Hopefully this
will improve over time.
So far, I haven't actually written any code for the N900. I have some
applications I want to write, mostly widget-style apps like "when does
the next bus home leave from a bus stop close to me and where is the
bus stop", but also some other ones.
Battery life is not great. It almost did 48 hours today with a bit of
use underway, and I did charge it before it ran completely out, but
when I'm used to closer to a week, it's not that good. Camera seems
good and is quite fast, I think it took less than five seconds from
opening the camera shutter until I had taken a picture. Shutter delay
is quite bad at about a third or half a second, but this is a mobile
phone (or mobile computer, as Nokia likes to call it) and not a DSLR,
so I'm quite happy with it.
As a phone, it seems fine so far. I can make calls and accept calls
and there's no noticeable problems with it. It also functions as a
modem/DUN over bluetooth, which is quite useful.
Build quality seems good, there's a good feeling when sliding the
keyboard in and out, but only time will tell how good it actually is.
So far, I'm happy with it, it's a big step up from my previous UK
phone (which is a Nokia E70; my iPhone is a 2G phone so I can't use it
here with the provider I'm using). Hopefully I'll post more happy
stories about it in the days to come.
Having excitedly bought an
As is becoming my custom, I'm planning to spend much of December and
January on the road. This time I'll be in Seattle, Japan and Wellington,
New Zealand. Here's the rough schedule:


I have an imaginary automobile. It is the finest hybrid
of German and Japanese engineering. It has a peppy little
engine and a turning radius so small it would make a baby
camel cry, and a six-speed manual transmission, and it is
powered by the urine of vegan bears.
My imaginary father asked me why I would possibly want to
buy an imaginary car with a manual transmission. Obviously,
whichever marketing campaign brainwashed him in the first
place wasn't strong enough on the memetics, because after
borrowing my imaginary car, he shut the hell up. You see,
it's considerably more fun to drive than an automatic.
There are other benefits as well, of course. The primary
one is that the transmission does what I want.
An automatic transmission is configured for maximum comfort ,
so it wastes a lot of power when shifting. With a manual,
you can slip from gear to gear with minimal clutch time, or
in some cases, if you're feeling sassy, without using the
clutch at all. You can control your engine speed so that
your shift will be just as smooth as an automatic without
the egregiously long clutch disengagement or shift overlap.
You also can see the road in front of you, so you're always
going to be smarter than an automatic transmission, unless
you don't understand how slopes work or what collisions with
other cars mean to your well-being.
Now some NRA member is going to point out that you can get
a shift kit and tweak your automatic to be less awful.
While spending money on this type of thing sounds like
a great idea, a shift kit is not going to bring an
automatic into the same league as my car. I can still
start the car when the battery's dead. I can get higher
fuel efficiency (vegan bears don't exactly urinate for
free). I can shift into fifth gear, and coming from a
full stop, drive up a hill without stalling (this is
particularly useful when a squirrel has gnawed the teeth
off of all your other gears). Furthermore, shift kit
or not, an automatic is absolutely no fun.
Someday, when transmissions have advanced into the realm
of liquid hyperspace buckminsterfullerene cones that
commune with the unicorns, and they'll have cameras and
radar feeding the car's computer with useful information
about its surroundings so it can make intelligent shift
decisions faster than a human. Then I'll have to choose
between saner and more fun. That era has not yet arrived.
This is a lousy metaphor for debhelper.
Why is wicd NEW? Simple, I managed to split the files into separate packages.
As soon as it clears NEW, those who are using experimental will be able to install a cli-only wicd, i.e. no more unnecessary throwing in of GTK+ and X
I will make a call for testing as soon as this package clears the queue. Hope I didn't make too much mistakes