From owner-freebsd-fs@FreeBSD.ORG Mon Mar 22 04:55:59 2010 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE0CD1065670 for ; Mon, 22 Mar 2010 04:55:59 +0000 (UTC) (envelope-from mckusick@mckusick.com) Received: from chez.mckusick.com (chez.mckusick.com [64.81.247.49]) by mx1.freebsd.org (Postfix) with ESMTP id 790938FC1A for ; Mon, 22 Mar 2010 04:55:59 +0000 (UTC) Received: from chez.mckusick.com (localhost [127.0.0.1]) by chez.mckusick.com (8.14.3/8.14.3) with ESMTP id o2M4txXr082327; Sun, 21 Mar 2010 21:55:59 -0700 (PDT) (envelope-from mckusick@chez.mckusick.com) Message-Id: <201003220455.o2M4txXr082327@chez.mckusick.com> To: Ivan Voras In-reply-to: Date: Sun, 21 Mar 2010 21:55:59 -0700 From: Kirk McKusick Cc: freebsd-fs@freebsd.org Subject: Re: UFS files in a directory limit? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Mar 2010 04:55:59 -0000 > To: freebsd-fs@freebsd.org > From: Ivan Voras > Date: Mon, 22 Mar 2010 01:08:31 +0100 > Subject: UFS files in a directory limit? > > hi, > > What is the limit on the number of files in a directory on UFS? I always > thought it is 32,767 (or near it) but now I see several directories on a > server with more than 36,000 files (yes it's inefficient, that's not the > point). The only limit on the size of a directory is the number of files that you can have in the filesystem. There is a limit of 2^16 directories within a directory due to the limit on the number of hard links. > On a similar topic, I presume there are no unexpected problems with > increasing vfs.ufs.dirhash_mem to ridiculous amounts like 100 MB? :) The only issue with making vfs.ufs.dirhash_mem very large is that you may exhaust the address space available to your kernel. Kirk McKusick