Re: mempools conversions, more ..

From: Andres Kroonmaa <andre@dont-contact.us>
Date: Fri, 6 Oct 2000 00:06:54 +0200

On 6 Oct 2000, at 4:29, Adrian Chadd <adrian@creative.net.au> wrote:

> > IMO, strings (non just any variable size buffer!) should be allocated
> > with the buffer size stored in the first two bytes of the string. This
> > way, we do not have to remember which pool was used for the string. I
> > may be thinking some other program, but I think there was a String class
> > in Squid that can be trained to do that (if not already).
>
> .. if only C used pascal strings rather than NUL-terminated strings, life
> would be a whole lot easier. I haven't checked out the string code just
> yet, I was planning on going through and MemPool'ing the obvious suspects
> before I run off and do the harder things.
>
> Andreas, you're doing malloc stuff right now. How many malloc/sec at
> a given request rate are you seeing on average?

 some stats can be seen in my profiling output
 (http://www.online.ee/~andre/squid/profil/sample.html)

 From current running (quite idle) squid,
 Given (1 min averages):

 comm_accept 1749 29.15 /sec
 comm_open 700 11.67 /sec
 comm_close 1550 25.83 /sec
 comm_connect_addr 1421 23.68 /sec
 storeRelease 1045 17.42 /sec
 comm_udp_sendto 894 14.90 /sec

 We do:

 memPoolAlloc 201818 3363.63 /sec
 memPoolFree 197610 3293.50 /sec
 xfree 23207 386.78 /sec
 xmalloc 57803 963.38 /sec
 xcalloc 12083 201.38 /sec
 xstrncpy 21615 360.25 /sec
 xstrdup 35825 597.08 /sec
 xstrndup 1530 25.50 /sec
 xrealloc 2 0.03 /sec

 hell of alot, I'd say.

------------------------------------
 Andres Kroonmaa <andre@online.ee>
 Delfi Online
 Tel: 6501 731, Fax: 6501 708
 Pärnu mnt. 158, Tallinn,
 11317 Estonia
Received on Thu Oct 05 2000 - 16:16:25 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:12:41 MST