Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2003:
[Freeciv-Dev] Re: (PR#6925) Measure memory management overhead
Home

[Freeciv-Dev] Re: (PR#6925) Measure memory management overhead

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] Re: (PR#6925) Measure memory management overhead
From: "Raimar Falke" <i-freeciv-lists@xxxxxxxxxxxxx>
Date: Sun, 23 Nov 2003 01:45:39 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=6925 >

On Sat, Nov 22, 2003 at 03:20:01PM -0800, Vasco Alexandre da Silva Costa wrote:
> 
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=6925 >
> 
> > [i-freeciv-lists@xxxxxxxxxxxxx - Sat Nov 22 22:50:04 2003]:
> > 
> > 
> > The issue of memory handling overhead comes up quite often. The last
> > time in the safe-genlist thread. It is time to fill the discussion
> > with some facts. From the profile of an autogame on a Linux system it
> > we know that the overhead is quite small. The question is what
> > overhead other systems have. Since not all systems support profiling
> > the following patch was made.
> > 
> > The overhead depends on the malloc implmentation (is in the libc) and
> > to a lesser extends on the OS.  If you have a non-glibc system please
> > apply the patch and run the autogame. The most interresting systems
> > here are Win32 and commerical unix versions with their native libc
> > version.
> > 
> > The absolute numbers are not important. Also the autogame isn't
> > important (the attached just works).
> > 
> > You get an output like this:
> > 
> > [0 malloc    ] calls= 5784117 time=4.518493s 
> > [1 realloc   ] calls=  104447 time=0.251182s 
> > [2 strdup    ] calls=    4890 time=0.003150s 
> > [3 free      ] calls= 5708727 time=3.779969s 
> > [4 null      ] calls=11602181 time=4.518997s 
> > [5 total     ] calls=       1 time=762.919344s 
> > (8.552794-4.518997)/762.919344 = 0.528732%
> > 
> > Please mail this and your libc and OS version. I for example have used
> > glibc-2.2 and linux-2.4.
> 
> Freaky. I didn't get the same number of calls:
> 
> [0 malloc    ] calls= 5784119 time=3.958480s
> [1 realloc   ] calls=  104447 time=0.223444s
> [2 strdup    ] calls=    4891 time=0.001654s
> [3 free      ] calls= 5708729 time=3.251998s
> [4 null      ] calls=11602186 time=4.310892s
> [5 total     ] calls=       1 time=595.190819s
> (7.435576-4.310892)/595.190819 = 0.524989%

A difference of 5 calls.

> I ran it like this:
> ./ser -r mem.rc
> start

"start" is not needed.

> Using current CVS HEAD. glibc-2.3.2, linux 2.4.22.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Microsoft DNS service terminates abnormally when it recieves a response
  to a DNS query that was never made.
  Fix Information: Run your DNS service on a different platform."
    -- MS service information on bugtraq




[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: (PR#6925) Measure memory management overhead, Raimar Falke <=