Threaded 6.4 code compiled under 9.0 uses a lot more memory?..

Karl Pielorz kpielorz_lst at tdx.co.uk
Tue Oct 30 12:10:33 UTC 2012



--On 30 October 2012 22:59 +1100 Jan Mikkelsen <janm at transactionware.com> 
wrote:

>> -O2 -pthread -lc_r
>>
>> They're now compiled under 9.0-S with just:
>>
>> -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.

That seems the most fitting explanation so far - aside from seeing if I can 
cut back on the number of threads, I presume there's no "issue" with having 
that many kicking around - the RES size is still quite 'small' (still 
waiting to see if anything is 'leaking') - and if ~700 threads happily ran 
under user mode pthreads - it should still perform at least 'similarly' 
with kernel threading?

-Karl


More information about the freebsd-hackers mailing list