(Fwd) Re: Summary: Re: Memory allocation under Aix 4.2

From: Andy Lee <andrew.lee@dont-contact.us>
Date: Fri, 17 Jul 1998 07:54:25 BST

Many thanks for all the replies , especially from Chet Murthy,Henrik
Nordstrom, Hennry Bekker, B. Richardson and Armin Kunaschick

There was two separate problems - firstly I can only get a single
process to use a maximum of 128MB even if I have 256MB installed.
Thanks for the memory code to check this - When I can knock squid
down I'll test this !

Secondly I hadn't realised how much memory squid was using given
7600Mb cache, 42MB cache_mem

The problem was that Squid had never cycled its cache so was still
growing. As it says in the squid notes "about 5MB of ram per 1GB of
Cache based on average object size of 20kb"

I had based my cache_mem on a note that you should "use about 1/3 of
real mem" but it has been pointed out that 8MB cache_mem is fine.

I have decreased cache size to 7000MB, decreased cache_mem to 8MB
Top now shows it stable with a size of 116MB , and its now cycling
its cache.

When I was getting the occasional xmalloc error (due to the cache
growing) I compiled 1.1.22 with gnumalloc and it crashed every 15
mins with the original settings. This was probably due to the config
parameter object size being changed from 20 to 13Kb and therefore has
more memory requirement for the same size cache.

 The xalloc is probably a red herring , but the suggestions to change
all occurrences of xmalloc to sqmalloc in the source seem good.

Thanks again

> I have been getting the unable to allocate x bytes errors under Squid
> 1.1.22 compiled on Aix4.2 using gcc 2.8.1 and running on 3/90 with
> 256MB ram with limits set to 0 for each user.
> Looking through the code it relies on calling xmalloc to allocate the
> memory required. Following through the normal headers (malloc.h)
> shows xmalloc takes three args from the man :
> caddr_t xmalloc (size, align, heap)
> int size ;
> int align;
> caddr_t heap ;
> and seems to require calls to xmfree to free the memory.
> Squid tries to use the gcc version of xmalloc which takes just one
> arg .
> I can't actually prove it but it seems using the standard configure
> and make under AIX gets confused over the xalloc. You then get the
> typical climb to 128MB resident memory size and die problem.
> I've now linked against libgnumalloc.a and added gmalloc.o to the
> XTRA_OBJS in the src squid Makefile (as recommended in the gnumalloc
> notes).
> The memory usage as shown by top is climbing more slowly ( It dies
> after about 1.5 hours)
> Question - does anyone know any aix memory bugs
> How stable is 1.2 - will it last more than 1.5 hours ?
> Any thoughts ?
> cheers
Andy Lee
Unix Support
National Power Plc
Received on Thu Jul 16 1998 - 23:59:52 MDT

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