From owner-freebsd-questions@FreeBSD.ORG Tue May 20 20:54:50 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B75991065685 for ; Tue, 20 May 2008 20:54:50 +0000 (UTC) (envelope-from wmoran@potentialtech.com) Received: from mail.potentialtech.com (internet.potentialtech.com [66.167.251.6]) by mx1.freebsd.org (Postfix) with ESMTP id 90B168FC16 for ; Tue, 20 May 2008 20:54:50 +0000 (UTC) (envelope-from wmoran@potentialtech.com) Received: from vanquish.ws.pitbpa0.priv.collaborativefusion.com (pr40.pitbpa0.pub.collaborativefusion.com [206.210.89.202]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.potentialtech.com (Postfix) with ESMTPSA id 9EA30EBC3B; Tue, 20 May 2008 16:54:49 -0400 (EDT) Date: Tue, 20 May 2008 16:54:37 -0400 From: Bill Moran To: "Brad Penoff" Message-Id: <20080520165437.36413c46.wmoran@potentialtech.com> In-Reply-To: References: X-Mailer: Sylpheed 2.4.8 (GTK+ 2.12.9; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: resident memory limit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 May 2008 20:54:50 -0000 In response to "Brad Penoff" : > > I have an application that runs on Linux or Mac OS X but seems to have > a problem when I run on FreeBSD (6.3 or 7). The issue is the memory > footprint for the application (osubw_sctpclien below) is quite large; > on Linux it can be as much as 950 MB in resident memory, according to > top. However, on FreeBSD I start to get ENOMEM always around the time > my resident memory size is about 200 MB. > > I read a few posts and have seen people fixing their problems by > adjusting kern.maxdsiz in /boot/loader.conf and/or by adding a swap > file. I've tried both and for my application, it still seems to be > limited to 200 MB resident memory regardless of maxdsize and swap file > setting. I wrote a toy application (malloctest below) that calls > malloc in a while(1) and breaks once it gets ENOMEM (doing another > while(1) so it doesn't exit); this application's memory size in top > always matches the kern.maxdsiz setting, however it has a very low > resident memory number, according to top. Have a look at /etc/login.conf and the associated man pages. -- Bill Moran http://www.potentialtech.com