From owner-freebsd-questions Thu Sep 7 14:30:41 2000 Delivered-To: freebsd-questions@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 60BC237B422 for ; Thu, 7 Sep 2000 14:30:38 -0700 (PDT) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id e87LUV307162; Thu, 7 Sep 2000 14:30:31 -0700 (PDT) Date: Thu, 7 Sep 2000 14:30:31 -0700 From: Alfred Perlstein To: Agent Drek Cc: questions@FreeBSD.ORG Subject: Re: really 'big' smbd Message-ID: <20000907143031.J18862@fw.wintelcom.net> References: <20000907103123.E18862@fw.wintelcom.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.4i In-Reply-To: ; from drek@bigstudios.com on Thu, Sep 07, 2000 at 05:10:22PM -0400 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Agent Drek [000907 14:13] wrote: > On Thu, 7 Sep 2000, Alfred Perlstein wrote: > > > * Agent Drek [000907 10:23] wrote: > > > hey there, > > > > > > I looking to find out what's going on with my server. under constant usage > > > of samba throughout the day it will run out of swap. There is very little > > > samba activity it's just that it seems to be caching every request in > > > memory/swap . eventually everything overflows. I've asked for help on the > > > samba lists but AFAIK other people with the same version of samba do > > > not experience this problem ... so it's my bad somewhere with the OS > > > I think. > > > > You may want to try running 'limit' to limit the memory size before > > starting smbd. > > > > -Alfred > > > > limit seems to be csh only via setrlimit which says that it will just > segfault the offending process when it tries to get too big. I'm not > sure that this is the solution I'm looking for ,,, maybe it is ... I'm > just scared to try it without knowing more ... > > could you elaborate on your suggestion? no, how about trying my suggestion? ~ % cat t.c #include int main(void) { int x; printf("enter number of bytes to allocate"); scanf("%d", &x); printf("allocating %d bytes...\n", x); if (malloc(x * sizeof(char)) == NULL) perror("malloc"); else printf("ok.\n"); } ~ % limit cputime unlimited filesize unlimited datasize 512kB stacksize 64MB coredumpsize unlimited memoryuse 512kB memorylocked unlimited maxproc 4115 descriptors 8232 sockbufsize unlimited ~ % ./a.out enter number of bytes to allocate300000 allocating 300000 bytes... ok. ~ % ./a.out enter number of bytes to allocate513000 allocating 513000 bytes... malloc: Cannot allocate memory If smbd can't handle running out of memory then that's a smbd bug. -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] "I have the heart of a child; I keep it in a jar on my desk." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message