From owner-freebsd-current@FreeBSD.ORG Tue Jul 27 19:30:13 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8092B16A4CE for ; Tue, 27 Jul 2004 19:30:13 +0000 (GMT) Received: from endeavour.localnet.radiotube.org (enterprise.radiotube.org [81.0.166.237]) by mx1.FreeBSD.org (Postfix) with ESMTP id 40BAC43D3F for ; Tue, 27 Jul 2004 19:30:12 +0000 (GMT) (envelope-from sigsegv@leakingmemory.org) Received: from [127.0.0.1] (localhost [127.0.0.1])i6RJU9Ib001763; Tue, 27 Jul 2004 21:30:10 +0200 (CEST) (envelope-from sigsegv@leakingmemory.org) Message-ID: <4106AD40.5020500@leakingmemory.org> Date: Tue, 27 Jul 2004 21:30:08 +0200 From: Jan-Espen Pettersen User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.1) Gecko/20040723 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-current@freebsd.org X-Enigmail-Version: 0.84.2.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig83FCFEE4AB9F6C38C6FB791A" cc: sigsegv@leakingmemory.org Subject: out of inodes on md /tmp X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2004 19:30:13 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig83FCFEE4AB9F6C38C6FB791A Content-Type: multipart/mixed; boundary="------------090803090006030100070509" This is a multi-part message in MIME format. --------------090803090006030100070509 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit I ran into a problem when having a lot of small files in a memory disk filesystem /tmp, which is now turned on by default through /etc/defaults/rc.conf and /etc/rc.d/tmp . This caused /tmp to quickly run out of inodes. In this case it was a cvs update over ssh that triggered the problem. One way to solve this is to increase the size of /tmp (this was also required to solve my problem, since at least 130M was required for cvs update to complete). But increasing the size of /tmp to 512M was not enough to get a sufficient number of inodes. Therefore I suggest a change to /etc/rc.d/tmp and /etc/defaults/rc.conf to let bytes-per-inode be a configureable option through /etc/rc.conf The diff I have attached to this message is what I've used for a few days now. It seems to work for me. I don't know how many people who actually need such an option, since this is relatively easy to work around by other means. from (log) messages: Jul 24 11:34:02 endeavour kernel: pid 15026 (cvs), uid 1001 inumber 1407 on /tmp: out of inodes --------------090803090006030100070509 Content-Type: text/plain; name="md_tmp.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="md_tmp.diff" Index: etc/defaults/rc.conf =================================================================== RCS file: /usr/ncvs/src/etc/defaults/rc.conf,v retrieving revision 1.211 diff -u -r1.211 rc.conf --- etc/defaults/rc.conf 18 Jul 2004 18:01:47 -0000 1.211 +++ etc/defaults/rc.conf 24 Jul 2004 10:35:47 -0000 @@ -40,6 +40,7 @@ removable_interfaces="" # Removable network interfaces for /etc/pccard_ether. tmpmfs="AUTO" # Set to YES to always create an mfs /tmp, NO to never tmpsize="20m" # Size of mfs /tmp if created +tmpbpi="DEFAULT" # Bytes-per-inode of mfs /tmp if created varmfs="AUTO" # Set to YES to always create an mfs /var, NO to never varsize="32m" # Size of mfs /var if created populate_var="AUTO" # Set to YES to always (re)populate /var, NO to never Index: etc/rc.d/tmp =================================================================== RCS file: /usr/ncvs/src/etc/rc.d/tmp,v retrieving revision 1.32 diff -u -r1.32 tmp --- etc/rc.d/tmp 23 Mar 2004 23:22:35 -0000 1.32 +++ etc/rc.d/tmp 24 Jul 2004 11:06:45 -0000 @@ -35,15 +35,27 @@ name="tmp" +md_bpi="" + load_rc_config $name +if [ -n "$tmpbpi" ]; then + case "$tmpbpi" in + [Dd][Ee][Ff][Aa][Uu][Ll][Tt]) + ;; + *) + md_bpi="$tmpbpi" + ;; + esac +fi + # If we do not have a writable /tmp, create a memory # filesystem for /tmp. If /tmp is a symlink (e.g. to /var/tmp, # then it should already be writable). # case "${tmpmfs}" in [Yy][Ee][Ss]) - mount_md ${tmpsize} /tmp + mount_md ${tmpsize} /tmp ${md_bpi} chmod 01777 /tmp ;; [Nn][Oo]) @@ -57,7 +69,7 @@ echo "dropping into shell, ^D to continue anyway." /bin/sh else - mount_md ${tmpsize} /tmp + mount_md ${tmpsize} /tmp ${md_bpi} chmod 01777 /tmp fi fi --------------090803090006030100070509-- --------------enig83FCFEE4AB9F6C38C6FB791A Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFBBq1BH90qNYni6VoRAvFHAJ9p/j3jsSmL4SrOtUcszDacIL+yogCgleQ7 1IA/HagrC//S6rSWmIKHXoM= =6ybh -----END PGP SIGNATURE----- --------------enig83FCFEE4AB9F6C38C6FB791A--