Sanshin Trading | 7 Feb 2011 19:21

(unknown)


David Ross | 16 Feb 2011 07:53
Picon
Favicon

Samba and low memory on NetBSD/atari


I recently got up and running with Samba 3.5.6.  (Previously I had been using 3.0)  Unfortunately on 3.5.6,
both smbd and winbindd fail to start:

eval: /usr/pkg/sbin/smbd: not enough memory
eval: /usr/pkg/sbin/winbindd: not enough memory

I have 16MB of physical memory and 256MB of swap.  Anyone know an easy way to determine if the issue with Samba
might be resolved simply by increasing available swap space?  I imagine this may not be the case if the
allocation that is failing really wants a large chunk of contiguous and/or physical memory.  Any other
tips that may help smbd/winbindd load?

Next time I do an install I'll try increasing swap and perhaps building everything with -Os rather than -O2.

David Ross
dross <at> pobox.com
  		 	   		  
David Brownlee | 18 Feb 2011 19:08
Gravatar

Re: Samba and low memory on NetBSD/atari

On 16 Feb 2011 06:53, "David Ross" <dross <at> pobox.com> wrote:

> I recently got up and running with Samba 3.5.6.  (Previously I had been using 3.0)  Unfortunately on
3.5.6, both smbd and winbindd fail to start:
>
> eval: /usr/pkg/sbin/smbd: not enough memory
> eval: /usr/pkg/sbin/winbindd: not enough memory
>
> I have 16MB of physical memory and 256MB of swap.  Anyone know an easy way to determine if the issue with
Samba might be resolved simply by increasing available swap space?  I imagine this may not be the case if
the allocation that is failing really wants a large chunk of contiguous and/or physical memory.  Any
other tips that may help smbd/winbindd load?
>
> Next time I do an install I'll try increasing swap and perhaps building everything with -Os rather than -O2.
>

Have you run unlimit, or your shell's equivalent?

If that is not the issue a quick way to add 256m swap could be to run
dd if=/dev/zero of=/var/swap bs=1m count=256 progress=1
Then chmod it 600, add it to fstab & swapctl to add it (or reboot).

Alternatively could it be that samba need shared memory & that is failing?
If you ktrace -id samba & then kdump the generated files you should be
able to see what system call failed (close to the end :)

David Ross | 18 Feb 2011 22:21
Picon
Favicon

RE: Samba and low memory on NetBSD/atari


sh doesn't seem to have any limits.

If I just try to start the binary directly without having it in a shell script, I get:
/usr/pkg/sbin/smbd: Cannot allocate memory.

(This is after running unlimit in my current shell, tcsh)

But now it's looking like the binary itself is just so large it just never even starts...

Attempting to start it with ktrace:
atari: {12} ktrace -id /usr/pkg/sbin/smbd
ktrace: exec of '/usr/pkg/sbin/smbd' failed: Cannot allocate memory

Looking in /usr/pkg/sbin, both smbd and winbindd seem to be the most massive binaries, by far.  (10MB and 8MB
respectively)  I only have 16MB of physical memory in the machine...

I guess the thing to do would be to recompile with -Os.  It would seem sensible that you can't load a NetBSD
binary that's so large it won't fit in available physical memory.  =)  Though if there's a way around that,
let me know!

David Ross
dross <at> pobox.com

----------------------------------------
> Date: Fri, 18 Feb 2011 18:08:34 +0000
> Subject: Re: Samba and low memory on NetBSD/atari
> From: abs <at> absd.org
> To: dross <at> pobox.com
> CC: port-atari <at> netbsd.org
(Continue reading)


Gmane