Andres Kroonmaa wrote:
> correct, I should have said match approximately. mmap of libs, stack
> and shared mem are all very small for squid compared to its mem usage.
> perhaps accounting for some few MB of vm. Still, VSZ and malloc usage
> should match pretty closely, not be different in times.
Please remember that any non-small allocation are allocated using mmap()
by malloc, and is not counted in the "arena" (but in holding blocks).
> this probably depends on OS. solaris for eg. mmaps 1M of stack per
> thread into process space, which is really used on demand, by attaching
> real ram pages to reserved ones when need arises. My squid box is using
> actually about 4K per thread, but reserved size is 1M per thread.
On Linux the reservation seems to be done on demand, starting at 16K.
> so if something is counting for reserved mmapping space, then it gets
> lots of VM accounted to this.
And most OS:es (except for Solaris) allows one to configure the OS to
ignore reservation and only look at the actual demand. (usually called
swap space over commit).
> and we don't, do we? dlmalloc when using mmap is accounting for mmap
> in mallinfo, by difference between space in arena and "total in use",
> which can go over 100% when using mmap.
No, Squid does not make direct use of mmap(). Only indirectly via
malloc() which is accounted for in mallinfo (the sk holding blocks).
/Henrik
Received on Fri Oct 27 2000 - 18:18:20 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:12:53 MST