mathys@dover.sps.mot.com (Yves Mathys) (02/27/91)
Stay away from Domain/OS malloc !
Intrigued by an abnormal slow down of a circuit simulator on
Apollo, I did some testing on the 'malloc' package.
I am surprised how *bad* it is !
Up to 50 times slower than GNU malloc !
The test consisted of a small application requesting and freeing memory
up to 10 Megabytes on a 16 Megabytes system. I also ran a memory
intensive circuit simulation.
I tested out three ways of allocating memory:
o Domain/OS malloc package (default)
o GNU malloc
o Aegis heap allocation (rws_$)
I run the test program using the default Display Manager and also using
X owning the display, surprisingly, in the X mode the
Domain/OS malloc package almost collapsed ! when GNU malloc is a bit
longer to allocate 10 Megabytes.
The first test asks for 4 Megabytes, the default package
forces the system to do a lot of swapping to get the memory even
though there is 16 Megabytes available of RAM.
Doing the same test on a SUN3 reports that SUN took care of
their allocation package algorithm (see below), knowing it is going to
affect many applications, what Apollo simply ignored.
Using GNU malloc made a circuit simulation allocating a lot of memory
run 3 times faster, simply by limiting swapping.
I am aware that my test case does not fully evaluate the
malloc package but I am convinced that the Domain/OS malloc package is
really poor.
Results:
=======
test1 test2 test3
======================================================
Dom/OS 4 50 5
Dom/OS(X) 60 104 5
GNU alloc 2 2 6
GNU alloc+X 2 14 9
AEGIS
(rws_(heap)) 3 12 31
-------------------------------------------------------
SUN 3 3 4 7
SUN 3
GNU alloc 3 5 13
------------------------------------------------------
SPICE circuit simulator
-----------------------
Domain/Os GNU
------------------------------------------------------
b330 950/398/32(+) 309/395/6
------------------------------------------------------
(+) output of /bin/time
test1 : request 4 Megabytes in 1<<j (0..9)
test2 : request 10 Megabytes linearly 1..1K
test3 : loop on { request 0.5 Megabytes by 2**n, free it}
Domain/OS: on test2, the program's heap grows up to 17 Megabytes
for a 10 Megabytes request
Host systems have 16 Megabytes of memory
Yves Mathys
Motorola Inc
SSDT
mathys@dover.sps.mot.com
--
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
Yves Mathys
Motorola Inc/Sector CAD
mathys@scad.sps.mot.comthompson@PAN.SSEC.HONEYWELL.COM (John Thompson) (02/27/91)
<<forwarded message>> > Stay away from Domain/OS malloc ! > ... > Up to 50 times slower than GNU malloc ! > > The test consisted of a small application requesting and freeing memory > up to 10 Megabytes on a 16 Megabytes system. I also ran a memory > intensive circuit simulation. What version of Domain/OS please? This looks _VERY_ similar to the results we got (and posted, I believe) at 10.0 / 10.1. If this is also at 10.2 or 10.3, I'd be very interested. If this is 10.1, I'd suggest you upgrade immediately if not sooner. Regardless, I'd suggest that you _please_ give O/S revisions when posting messages of this sort. -- jt -- John Thompson Honeywell, SSEC Plymouth, MN 55441 thompson@pan.ssec.honeywell.com Me? Represent Honeywell? You've GOT to be kidding!!!