Shared Memory size

Peter Polkinghorne Peter.Polkinghorne at
Wed Jan 13 10:32:12 GMT 1999

[I sent this to the Samba mailing list with no response on 7 jan 1999 - so 
reposting with added info here...]

The shared mem size option is set to 102400 by default and change is 

The man page (1.9.18p10) says:

This parameter is only useful when Samba has  been  compiled
	with  FAST_SHARE_MODES.  It specifies the size of the shared
	memory (in bytes) to use between smbd processes. You  should
	never  change  this  parameter  unless  you have studied the
	source and know what you are doing. This parameter  defaults
	to  1024  multiplied by the setting of the maximum number of
	open files in the file local.h in  the  Samba  source  code.
	MAX_OPEN_FILES  is  normally  set  to 100, so this parameter
	defaults to 102400 bytes.

and John Blair's excellent book indicates it is a hacker option.

As far as I can see there is no other documentation on this option.

However I have a server (used for software distribution) to 100+ NT clients 
and it clearly ran out of shared memory eg:

Jan  7 14:55:37 smbd[27486]: ERROR:set_share_mode shmops->
shm_alloc fail!
Jan  7 14:55:37 smbd[27486]: ERROR shm_alloc : alloc of 56 
bytes failed
Jan  7 14:55:37 smbd[27486]: ERROR:set_share_mode shmops->
shm_alloc fail!
Jan  7 14:55:41 smbd[28154]: PANIC ERROR:del_share_mode 
hash bucket 3 empty

Can I just up the amount of shared memory?

Is there any guideline for amount consumed per oplock?

I am running under Solaris 2.5.1 if that helps.

EXTRA info: well I doubled the shared memory size to 200k & that works - have 
used 61% at a maximum at present - so may be docuemntation should change?

Also because of the way shared memory works on Solaris I have to reboot to 
make the change take effect!


| Peter Polkinghorne, Computer Centre, Brunel University, Uxbridge, UB8 3PH,|
| Peter.Polkinghorne at   +44 1895 274000 x2561       UK          |

More information about the samba-technical mailing list