Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Oct 2012 22:59:47 +1100
From:      Jan Mikkelsen <janm@transactionware.com>
To:        Karl Pielorz <kpielorz_lst@tdx.co.uk>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Threaded 6.4 code compiled under 9.0 uses a lot more memory?..
Message-ID:  <73635E29-D47C-4952-9958-1442970E7A4F@transactionware.com>
In-Reply-To: <A92CE63E6E6DB93B366F4A42@MightyAtom.tdx.co.uk>
References:  <A92CE63E6E6DB93B366F4A42@MightyAtom.tdx.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,


On 30/10/2012, at 10:12 PM, Karl Pielorz <kpielorz_lst@tdx.co.uk> wrote:

>=20
> Hi All,
>=20
> Can anyone think of any quick pointers as to why some code originally =
written under 6.4 amd64 - when re-compiled under 9.0-stable amd64 takes =
up a *lot* more memory when running?
>=20
> The code involved is a sendmail Milter, and a TCP server type program =
(that runs up a large number of threads [~700] at startup).
>=20
> Both were previously compiled with:
>=20
> -O2 -pthread -lc_r
>=20
> They're now compiled under 9.0-S with just:
>=20
> -O2 -pthread

libc_r is a user mode implementation of pthreads, so there is one actual =
kernel thread with a stack. You now have ~700 kernel threads on startup. =
Per-thread stack allocation will be different, and you could quite =
easily explain differences that way.

Regards,

Jan.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?73635E29-D47C-4952-9958-1442970E7A4F>