From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 30 12:10:33 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 92777CDE for ; Tue, 30 Oct 2012 12:10:33 +0000 (UTC) (envelope-from kpielorz_lst@tdx.co.uk) Received: from mail.tdx.com (mail.tdx.com [62.13.128.18]) by mx1.freebsd.org (Postfix) with ESMTP id 230498FC16 for ; Tue, 30 Oct 2012 12:10:32 +0000 (UTC) Received: from MightyAtom.tdx.co.uk (storm.tdx.co.uk [62.13.130.251]) (authenticated bits=0) by mail.tdx.com (8.14.3/8.14.3/) with ESMTP id q9UCAUch035124 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO); Tue, 30 Oct 2012 12:10:31 GMT Date: Tue, 30 Oct 2012 12:10:23 +0000 From: Karl Pielorz To: Jan Mikkelsen Subject: Re: Threaded 6.4 code compiled under 9.0 uses a lot more memory?.. Message-ID: <233A9B7A1632D8758F378A74@MightyAtom.tdx.co.uk> In-Reply-To: <73635E29-D47C-4952-9958-1442970E7A4F@transactionware.com> References: <73635E29-D47C-4952-9958-1442970E7A4F@transactionware.com> X-Mailer: Mulberry/4.0.8 (Win32) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Cc: freebsd-hackers@freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Oct 2012 12:10:33 -0000 --On 30 October 2012 22:59 +1100 Jan Mikkelsen 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