Date: Wed, 27 Mar 2013 12:19:18 +1100 From: Jan Mikkelsen <janm@transactionware.com> To: Alexander Yerenkow <yerenkow@gmail.com> Cc: Tony Li <tony.li@tony.li>, "freebsd-stable@freebsd.org" <freebsd-stable@freebsd.org>, Unga <unga888@yahoo.com> Subject: Re: FreeBSD 9.1 excessive memory allocations Message-ID: <D744FB2A-B5AB-4B30-80D0-3895E44677B0@transactionware.com> In-Reply-To: <CAPJF9w=ZpVzFrh-5yd6aHGRa-NuFB-PJ2ZAPEiL44ThXfNkEDw@mail.gmail.com> References: <1364322902.78474.YahooMailNeo@web161904.mail.bf1.yahoo.com> <175E75EE-8E85-49A4-838B-D79CE96CC3C4@tony.li> <CAPJF9w=ZpVzFrh-5yd6aHGRa-NuFB-PJ2ZAPEiL44ThXfNkEDw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 27/03/2013, at 7:08 AM, Alexander Yerenkow <yerenkow@gmail.com> = wrote: > 2013/3/26 Tony Li <tony.li@tony.li> >=20 >>=20 >>> I have a heavily threaded C application, developed on an Intel Core = i5 >> laptop (2 cores) running FreeBSD 8.1-RELEASE. >>>=20 >>> When this application compile and run on another Intel Core i7 = laptop (4 >> cores) running FreeBSD 9.1-RELEASE, this application immediately = starts >> grabbing memory by over 100MB per second and soon exit with not = enough RAM. >>=20 >=20 > Sorry, can't remember exactly, but you could search current- or = stable- > for something like you got. > This related IIRC with changes in thread subsystem, so basically each > thread will consume now more mem. > Search for details, your description is ringing some bell :) Yes, I remember that too. I think that was linking with libc_r so there = was only one kernel thread in the earlier version, but linked with = -pthread only in 9-whatever leading to an explosion in the number of = kernel threads. Unga: Have you changed linker options? If so, you may have increased the = number of kernel threads, increasing memory requirements. You could = experiment with -lkse instead of -lc_r, and calling = pthread_set_concurrency(). To manage the number of kernel threads. I = haven't tried it, so best of luck. Regards, Jan.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D744FB2A-B5AB-4B30-80D0-3895E44677B0>