Increasing amount of open files in freeBSD 4.3-STABLE

Increasing amount of open files in freeBSD 4.3-STABLE

Post by Luke Robert » Wed, 09 May 2001 17:40:42



I run a Samba 2.2.0 Fileserver for a small network.

Sometimes Samba opens more files than FreeBSD likes and this generally
upsets the FreeBSD machine. It complains about too many open files until the
machine hogging the 2000+ files logs off. Then all is ok again.

Does anybody know what Kernel config line I need to set to increase the
amount of possible open files?

Thanks,

Luke

--
----------------------------------------------------------------------
For e-mail replies: Remove [noSPAMplease] from my e-mail address
----------------------------------------------------------------------

 
 
 

Increasing amount of open files in freeBSD 4.3-STABLE

Post by Michael Doss » Wed, 09 May 2001 22:37:37




Quote:> Sometimes Samba opens more files than FreeBSD likes and this generally
> upsets the FreeBSD machine. It complains about too many open files until the
> machine hogging the 2000+ files logs off. Then all is ok again.

"too many files": use fstat to see what files are open.

to increase the number of open files:

# vi /usr/src/sys/i386/conf/YOUR_KERNEL_CONFIG_FILE_HERE

maxusers        128

and then recompile your kernel. or: you do it by sysctl:

/sbin/sysctl -w kern.maxfiles=4096

and if you are satisfied, put it in /etc/sysctl.conf

Cheers,mic

--
Michael Dosser
This host:   up 98 days  20:35 hours
SIGSIG -- signature too long (core dumped)

 
 
 

Increasing amount of open files in freeBSD 4.3-STABLE

Post by Luke Robert » Thu, 10 May 2001 03:11:33


Quote:> > Sometimes Samba opens more files than FreeBSD likes and this generally
> > upsets the FreeBSD machine. It complains about too many open files until
the
> > machine hogging the 2000+ files logs off. Then all is ok again.

> "too many files": use fstat to see what files are open.

The problem actually only occurs when we update our MusicMatch Jukebox MP3
library. When we do this the music match jukebox (running on a windwos 2000
machine) opens all MP3's on the FreeBSD samba server and this results in too
many open files. When this happens I see a huge file list in fstat. Almost
like the samba server or the windows 2000 client leave the files open to
long (or close them too late). So I thought the solution would be simple:
allow about 20000 open files ;-)

Funny enough after using your solution (i allow 16384 files) fstat (and
smbstatus) shows all files opening and closing like lightning and the result
is that there are hardly any open files during the Music Match music library
update function...... I'm baffled but your suggestion has helped us
enormously!

Thanks again!

Luke

 
 
 

Increasing amount of open files in freeBSD 4.3-STABLE

Post by Matt Anderso » Thu, 10 May 2001 06:38:28


So what was the solution???  That does not seem to be here anywhere!

Matt Anderson


>> > Sometimes Samba opens more files than FreeBSD likes and this generally
>> > upsets the FreeBSD machine. It complains about too many open files
>> > until
> the
>> > machine hogging the 2000+ files logs off. Then all is ok again.

>> "too many files": use fstat to see what files are open.

> The problem actually only occurs when we update our MusicMatch Jukebox MP3
> library. When we do this the music match jukebox (running on a windwos
> 2000 machine) opens all MP3's on the FreeBSD samba server and this results
> in too many open files. When this happens I see a huge file list in fstat.
> Almost like the samba server or the windows 2000 client leave the files
> open to long (or close them too late). So I thought the solution would be
> simple: allow about 20000 open files ;-)

> Funny enough after using your solution (i allow 16384 files) fstat (and
> smbstatus) shows all files opening and closing like lightning and the
> result is that there are hardly any open files during the Music Match
> music library update function...... I'm baffled but your suggestion has
> helped us enormously!

> Thanks again!

> Luke

 
 
 

Increasing amount of open files in freeBSD 4.3-STABLE

Post by Philip Hallstr » Thu, 10 May 2001 06:53:07


sysctl -w kern.maxfiles=4352

(or however many you want).

Then to make it happen across reboots add the following to
/etc/sysctl.conf

kern.maxfiles=4352



>So what was the solution???  That does not seem to be here anywhere!

>Matt Anderson


>>> > Sometimes Samba opens more files than FreeBSD likes and this generally
>>> > upsets the FreeBSD machine. It complains about too many open files
>>> > until
>> the
>>> > machine hogging the 2000+ files logs off. Then all is ok again.

>>> "too many files": use fstat to see what files are open.

>> The problem actually only occurs when we update our MusicMatch Jukebox MP3
>> library. When we do this the music match jukebox (running on a windwos
>> 2000 machine) opens all MP3's on the FreeBSD samba server and this results
>> in too many open files. When this happens I see a huge file list in fstat.
>> Almost like the samba server or the windows 2000 client leave the files
>> open to long (or close them too late). So I thought the solution would be
>> simple: allow about 20000 open files ;-)

>> Funny enough after using your solution (i allow 16384 files) fstat (and
>> smbstatus) shows all files opening and closing like lightning and the
>> result is that there are hardly any open files during the Music Match
>> music library update function...... I'm baffled but your suggestion has
>> helped us enormously!

>> Thanks again!

>> Luke

 
 
 

Increasing amount of open files in freeBSD 4.3-STABLE

Post by Luke Robert » Thu, 10 May 2001 10:30:50


Quote:> So what was the solution???  That does not seem to be here anywhere!

I suppose I could have been a bit clearer ;-)

/sbin/sysctl -w kern.maxfiles=16384

I also added this line to /etc/sysctl.conf so the machine reboots like this.
I didn't compile my kernel with the maxusers option.

Cheers,

Luke

--
----------------------------------------------------------------------
For e-mail replies: Remove [noSPAMplease] from my e-mail address
----------------------------------------------------------------------

 
 
 

1. FreeBSD 3.5-STABLE to 4.3-STABLE

Hello,

I'm trying to update a box of mine. It was initially 3.4-R, but
i've managed to update it to 3.5-stable.
What is the best way to update against 4.x series ?
I've tried to cvsup to 4.0-R and 4.3-S, but had some errors
while making buildworld. The /usr/src/UPDATING wasn't very
helpful because of those errors in buildworld. Any hints ?

I could reinstall 4.3 from an ISO image, but there are real
users and i don't want to loose them. What's is the procedure
to recover users from a backup /etc dir ?
1. copy passwd, master.passwd, group over
2. start pwd_mkdb
3. edit login.conf and add passwd-format=des (3.x uses DES)
4. start cap_mkdb
Right or wrong ?

Thanks in advance, Radoy

--
Error FE6B - Nonexistent - This comment does not exist,
and therefore you cannot read it. Please go away quietly.

2. Yet Another Poor Sap with Promise Ultra 100TX2 Problems

3. Xamian on FreeBSD 4.3 || X 4.1.0 on FreeBSD 4.3

4. "LARP" Port 91?

5. Mounting an ext2fs filesystem on FreeBSD 4.3-STABLE

6. SCO5 P166: Floppy activity locks sytsem

7. Gnome under FreeBSD 4.3 Stable

8. FDISK - recognizing 4GB HARD DRIVE

9. Trouble installing jdk12_beta on FreeBSD 4.3-STABLE

10. Maximum file count and file size under FreeBSD 4.3

11. Can't find 4.3-STABLE

12. how to build the world for 4.3 stable...

13. Linksys EtherFast PCM100 on 4.3-STABLE