[Gllug] Linux workstation admin simpler than OS X
Richard Jones
rich at annexia.org
Sun Aug 2 09:43:44 UTC 2009
On Sun, Aug 02, 2009 at 08:58:25AM +0100, John Edwards wrote:
> On Sat, Aug 01, 2009 at 07:26:00PM +0100, Richard Jones wrote:
> <snip>
> > It's also written in python, so it consumes buckets of memory doing
> > whatever it is that python does to consume huge amounts of memory for
> > any trivial task. It's using over 100MB of memory on that machine
> > right now, to manage a fixed network that doesn't need to be managed.
>
> Which version of python is that using?
>
> Version 2.5 has some memory leak bugs fixed and performs a lot
> better than 2.4 when it comes to memory usage over time.
It's not memory leaks, just poor use of memory. Perl, Python and Ruby
throw away all the knowledge of compiler technology which was
accumulated over the 1960s, 70s and 80s. Instead they take a very
naive approach to building interpreters and do zero static analysis on
the code. The result is that they waste runtime resources as a
tradeoff for having very simplistic implementations (making life easy
for the implementers of these languages, and hard for everyone that
has to use them -- the reverse of how it should work).
As an example: all three languages will store, at runtime, the type of
every single variable, even short-lived temporary variables, and even
variables where it could be proven that the type will never be needed.
This is amazingly dumb, and no compiler written since about 1975 works
like this.
As another example: they all use reference counting, which is very
primitive form of garbage collection that has very high overhead. But
it is simple to implement, particularly if you have no background at
all in computer science and you consider academic papers to be
irrelevant to hacking away at code.
The consequence of this is that a simple wrapper around /sbin/ifconfig
and dhclient takes 100MB of RAM, and the earth groans supplying
electricity to a million machines running 'yum-updatesd'.
Use a real language (OCaml in my case) and you don't have to put up
with this nonsense.
Rich.
--
Richard Jones
Red Hat
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list