« June 2003 | Main | August 2003 »

July 2003 Archives

July 2, 2003

Echo is running much faster now

But yet not fast enough. It is probably just a matter of one or two pages being allocated too much. Gonna try ktrace on it. Albeit not tonite. Must sleep...

ktrace only traces BSD calls it seems

So I don't see the vm_allocate calls traced there. That sucketh indeed.

Domino doch nicht in Gefahr

Ente meines Tankwarts. Hatte wieder aufgefüllt. Waren "Lieferschwierigkeiten". Grunz.

July 3, 2003

Echo is running fast enough now

I forgot to setup the test on equal terms, so OS X always had a little competitive advantage, due to my need to wedge in a dylib and generic /bin/echo not suffering this. Actually echo is running a smidgen fasternow it seems with the mullocator, probably because I reduced the setup time to almost nothing.

This is not a very exiting day or post :)

gawk benchmark runs faster too

Now with the slow startup of memory usage and the improved initialization I get
bash-2.05a$ time ./gawk.sh 

real    0m16.849s
user    0m14.650s
sys     0m1.940s
See Gawk benchmark, June 12, 2003 for older timings.

New .signature

Added the old Grace Hopper quote "It's always easier to ask forgiveness than it is to get permission." to my signature list. Given the current dark age with NDAs and software patents on everything, it's sounds far more subversive than it used to. And that was an old lady of the 1950s...Grace deciding between Pizza Funghi and Spaghetti Bolognese

July 9, 2003

DSL unten seit Sonntag

T-Online meinte am Montag, "kurzfristig Störung". Heute (Mitwoch) ist von der Störung bei der Telekom gar nichts mehr bekannt, zu Hause zeigt das Modem, aber das es immer noch nicht in Sync ist.

Typisch Telekom. Drei Anrufe, drei verschiedene Antworten. Ob die schon Eliza dort haben ?

Ich poste das hier "vonne Firma" :)

July 11, 2003

DSL wieder da

Hurra, nur fünf Tage ohne Internet. :)

July 13, 2003

OpenGroupware.org

Check out http://www.opengroupware.org for a free GroupWare server. Also check out these nice screenshots, now why did I mention just these :)

July 14, 2003

4973, the prime of the beast

Well I thought it kind of cute, to use 4973 as the prime in a lookup table. Unfortunately that turned out to be too small a number for my purposes. So I looked around for some higher primes, sidetracking I found this Michael Daniel Whiting - March 28th 1934 , which I don't know is just very, very bizarre.

July 16, 2003

Safari.app benchmark

I ran Safari with the tracer, produced 20 MBs worth of malloc library info and then let Apple's malloc compete against the Mullocator. The results are a bit disappointing as the mullocator is not twice as fast as Safari, only 60% faster, which means that i will have to look into tweaking some parameters, as twice as fast really should be doable.

I suspect that I can improve realloc some, as the memcpy routine is never inlined apparently on PPC, by wrtiting my own memcpy. Looked around the net and already found an Altivec memcpy. I wonder how much memory one needs to move, so that it becomes a win, as context switches for non-Altivec code are bound to become much slower. (Sames goes for using doubles in memcpy).

July 20, 2003

Too much work at work to do have any Mulle progress

At work I am trying to set up a two-ISP failover firewall/bridge combination using iptools2 and netfilter on a GNU/Linux box (using Debian now :) ). Works ALMOST with the exception that for whatever reason UDP packets from one(!) server of our local Class-C net are dropped by the ISPs router, but only if the firewalling bridge is in the middle. TCP traffic passes without problem.

Looks like a Linux problem so far ARGH! (Can't be my mistake now, can it :))

July 22, 2003

Apple should fix X-Code

Paraphrasing one of my earliest postings on macosx-dev@omnigroup.com- which brought me quite a bit of heat :)

I am none too happy with the UI of X-Code, so I mailed a megabyte worth full of suggestions to Apple on the X Code UI. Ok Ok, not 1 MB full of text, only four pages with lots of pictures.

I think I am not breaking any NDA here, by presenting a mock up on how i think X-Code should look like, as there are screenshots of X-Code available at Apple.

It will be interesting to see if there is any feedback at all. Best feedback would be of course to see the ideas appear in the final release. One can always hope. :)

Continue reading "Apple should fix X-Code" »

July 23, 2003

Safari.app benchmark - it ain't my problem

At least it looks like it. I seem to spend all my time in the routine that fetches a new page from memory and formats it for allocation. What is actually happening is that Mac OS X is busy zerofilling pages all the time. Running both benchmarks side by side I see with top -a
 PID COMMAND      %CPU   TIME    FAULTS   PAGEINS  COW_FAULTS MSGS_SENT  MSGS_RCVD  BSDSYSCALL MACHSYSCALL CSWITCH
 1289 Mulle        13.7%  0:04.23  3998     0        0          387        387        13245      387         1564
 1293 Apple         7.1%  0:04.92  4244     0        0          1256       1256       13245      1256        1784

As you can see at the end of the run, the Mullocator actually allocated less pages (FAULTS) and did much less Mach Calls, which is good. But speedwise I am still stuck around 60%. I suspect I will not convince the Darwinists that zero filling pages on a consumer machine is a waste of effort. :)

COW_FAULT (mooh) is a copy on write fault by the way, just looked it up.

July 24, 2003

Zero filling, the OS's problem ?

The best argument for zero filling pages in a single user setting I have heard so far is this (from darwin-dev@lists.apple.com)

http://www.macintouch.com/o98security.html

Basically it goes like this. Program TextEdit.app is used to write some text. That text ends up in the back of a memory page. When the program ends, that page is reused in another program lets say LISP or some such program that saves out complete memory pages (dumps an image). Now if that memory page is only partially overwritten the data edited in TextEdit.app might very well be appended at the end of that image file and if you then send this image to someone else, you may have sent some data out you rather wouldn't have liked to.

This Office effect is dealt on other systems deal by ignoring it (is this true ?), but Mac OS X is conscientious and zeroes out the memory page.

July 26, 2003

Zero filling, small finale

Well so the kernel does zero fill pages. I get the impression no one except me cares about this (in my eyes) pretty useless waste of machine resources (and therefore my valuable time). Even worse this puts a natural limit on the Mullocator, at least when new memory needs to be acquired. In certain benchmarks, you just can't go any faster because you are starting to hit that brick wall.

In most not so long running programs the zero filling is absolutely noticable. It's effects tend to peter off, if a program settles into a malloc free pattern with a stable amount of memory used.

So there isn't much I can do about the Safari.app benchmark.

msync KILLPAGES and a post from Jim Magee

With msync( KILLPAGES ...) you can give the kernel a hint, that a page is unused and does not need to be swapped out. This way your app can still retain the memory and if space runs tight in the system that memory can be made available.

Now this ain't a cheap operation, so I figured I start using that when 4 MB worth of free memory have accumulated,

Here's a post from Jim Magee (IMO Apple's best guy) about msync from the darvin-developers mailing list:

Continue reading "msync KILLPAGES and a post from Jim Magee" »

July 29, 2003

Small Progress on the Mullocator

Did something that I always wished other libraries would do, that is to expose the locks. This way you can avoid the locking hell, when doing
for( i = 0; i < 10000; i++) 
   malloc( 8);
Looks pretty much finished now. An open question is, what to do with it. GPL it, LGPL it, sell it, patent it ? I'd ideally like to test it some more. Maybe I'll port it to Linux and replace the standard malloc implementation with and see what happens.

This conflicts with my tendency to procrastinate and to then take on something totally different and forget the old crap. :)

July 30, 2003

Your help is needed. Give!

In the ongoing battle to enlighten the world about the evils of zerofilling memory pages, you can make your contribution right now! If you have a machine at your disposal, that is not a G4-400 Mhz G3-350 Mhz, iBook 500 Mhz or iMac 800 Mhz you immediately qualify.

How's that ? Pretty easy requirements! Please compile and run the following code on a system that is close to doing nothing, turn of Mail, turn off iTunes and what ever else might be sucking up CPU time. Compile this with cc -o page-clean-test page-clean-test.m -framework Foundation.

Please send the output result to nat@mulle-kybernetik.com (Harvest be damn SPAM bot!) Please write me the kind of system you ran the test on. If you didn't use Mac OS X 10.2, please tell me also.

Here comes the source...

Continue reading "Your help is needed. Give!" »

July 31, 2003

Tried to install the Mac OS X Developer Documentation somewhere else

I am short of space on my root partition, so I tried this
  • Copied the DevDocumentation.pkg down locally from the Packages folder.
  • Show Package Contents on it, moved down to the Info.plist and edited it with Property List Editor
  • Set IFPkgFlagRootVolumeOnly to No
  • Created a /tmp folder on the Volume I wanted to install to.
Now I could install the documentation on that Volume. It ended with an error though, because the post install script throws up as it can't setup a chroot environment on that volume. As I just care for the HTML / PDF dox at the moment, it's OK for now.

About July 2003

This page contains all entries posted to Nat!'s Web Journal in July 2003. They are listed from oldest to newest.

June 2003 is the previous archive.

August 2003 is the next archive.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type 3.34