Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Mar 1996 17:02:10 +0100 (MET)
From:      Luigi Rizzo <luigi@labinfo.iet.unipi.it>
To:        msmith@atrad.adelaide.edu.au (Michael Smith)
Cc:        questions@freebsd.org
Subject:   Before and after the cure (was Re: malloc upgrade)
Message-ID:  <199603061602.RAA08501@labinfo.iet.unipi.it>
In-Reply-To: <199603052355.KAA20299@genesis.atrad.adelaide.edu.au> from "Michael Smith" at Mar 6, 96 10:24:57 am

next in thread | previous in thread | raw e-mail | index | archive | help
I'd like to suggest people who don't have memory to burn to upgrade their
libc.so to use the new malloc. There's simply no comparison when programs
malloc() small chunks of memory. Note in particular the awful behaviour
when the allocation size is near 2048 bytes...

How about making an updated libc.so.2.2 available on ftp.freebsd.org ?

------------------

Old malloc (1.1.5, 2.1R):

    studenti:~ ./a 1024
    Allocated 1 MB
    USER       PID %CPU %MEM   VSZ  RSS  TT  STAT STARTED       TIME COMMAND
    luigi    13245 16.0  8.0  2204 2456  ph  S+    4:50PM    0:00.14 ./a 1024
    Allocated 2 MB
    USER       PID %CPU %MEM   VSZ  RSS  TT  STAT STARTED       TIME COMMAND
    luigi    13245  7.3 14.0  4252 4280  ph  S+    4:50PM    0:00.28 ./a 1024
    Allocated 3 MB
    USER       PID %CPU %MEM   VSZ  RSS  TT  STAT STARTED       TIME COMMAND
    luigi    13245  6.7 20.7  6300 6332  ph  S+    4:50PM    0:00.42 ./a 1024

    ...

    studenti:~ ./a 2048
    Allocated 1 MB
    USER       PID %CPU %MEM   VSZ  RSS  TT  STAT STARTED       TIME COMMAND
    luigi    14629 11.0  8.1  4252 2488  ph  S+    5:01PM    0:00.13 ./a 2048
    Allocated 2 MB
    USER       PID %CPU %MEM   VSZ  RSS  TT  STAT STARTED       TIME COMMAND
    luigi    14629  8.6 14.1  8348 4332  ph  D+    5:01PM    0:00.27 ./a 2048
    Allocated 3 MB
    USER       PID %CPU %MEM   VSZ  RSS  TT  STAT STARTED       TIME COMMAND
    luigi    14629  4.8 20.7 12444 6344  ph  S+    5:01PM    0:00.40 ./a 2048

    ...

    studenti:~ ./a 4096
    Allocated 1 MB
    USER       PID %CPU %MEM   VSZ  RSS  TT  STAT STARTED       TIME COMMAND
    luigi    13306  8.0  4.7  2204 1424  ph  S+    4:50PM    0:00.08 ./a 4096
    Allocated 2 MB
    USER       PID %CPU %MEM   VSZ  RSS  TT  STAT STARTED       TIME COMMAND
    luigi    13306  2.8  8.0  4252 2456  ph  S+    4:50PM    0:00.13 ./a 4096
    Allocated 3 MB
    USER       PID %CPU %MEM   VSZ  RSS  TT  STAT STARTED       TIME COMMAND
    luigi    13306  2.9 11.4  6300 3480  ph  S+    4:50PM    0:00.18 ./a 4096


New malloc (2.2-snap etc.)

    prova# ./a 1024
    Allocated 1 MB
    USER       PID %CPU %MEM   VSZ  RSS  TT  STAT STARTED       TIME COMMAND
    luigi    13184  0.0  1.5  1188  452  p1  S+    4:51PM    0:00.04 ./a 1024
    Allocated 2 MB
    USER       PID %CPU %MEM   VSZ  RSS  TT  STAT STARTED       TIME COMMAND
    luigi    13184  1.5  1.5  2220  464  p1  S+    4:51PM    0:00.05 ./a 1024
    Allocated 3 MB
    USER       PID %CPU %MEM   VSZ  RSS  TT  STAT STARTED       TIME COMMAND
    luigi    13184  0.8  1.6  3252  472  p1  S+    4:51PM    0:00.06 ./a 1024

    ...

    prova# ./a 2048
    Allocated 1 MB
    USER       PID %CPU %MEM   VSZ  RSS  TT  STAT STARTED       TIME COMMAND
    luigi    13211  0.0  1.5  1188  444  p1  S+    5:00PM    0:00.03 ./a 2048
    Allocated 2 MB
    USER       PID %CPU %MEM   VSZ  RSS  TT  STAT STARTED       TIME COMMAND
    luigi    13211  2.6  1.5  2220  456  p1  S+    5:00PM    0:00.05 ./a 2048
    Allocated 3 MB
    USER       PID %CPU %MEM   VSZ  RSS  TT  STAT STARTED       TIME COMMAND
    luigi    13211  1.1  1.5  3252  464  p1  S+    5:00PM    0:00.06 ./a 2048

    ...

    prova# ./a 4096
    Allocated 1 MB
    USER       PID %CPU %MEM   VSZ  RSS  TT  STAT STARTED       TIME COMMAND
    luigi    13193  0.0  1.4  1180  436  p1  S+    4:51PM    0:00.03 ./a 4096
    Allocated 2 MB
    USER       PID %CPU %MEM   VSZ  RSS  TT  STAT STARTED       TIME COMMAND
    luigi    13193  1.5  1.5  2204  440  p1  S+    4:51PM    0:00.04 ./a 4096
    Allocated 3 MB
    USER       PID %CPU %MEM   VSZ  RSS  TT  STAT STARTED       TIME COMMAND
    luigi    13193  0.4  1.5  3228  440  p1  S+    4:51PM    0:00.05 ./a 4096

	Luigi
====================================================================
Luigi Rizzo                     Dip. di Ingegneria dell'Informazione
email: luigi@iet.unipi.it       Universita' di Pisa
tel: +39-50-568533              via Diotisalvi 2, 56126 PISA (Italy)
fax: +39-50-568522              http://www.iet.unipi.it/~luigi/
====================================================================



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199603061602.RAA08501>