From owner-freebsd-questions@FreeBSD.ORG Tue Mar 29 02:11:34 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EA20616A4CE for ; Tue, 29 Mar 2005 02:11:34 +0000 (GMT) Received: from smtpq1.home.nl (smtpq1.home.nl [213.51.128.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id DBBA543D46 for ; Tue, 29 Mar 2005 02:11:33 +0000 (GMT) (envelope-from danny@ricin.com) Received: from [213.51.128.134] (port=59341 helo=smtp3.home.nl) by smtpq1.home.nl with esmtp (Exim 4.30) id 1DG6Cb-0006sp-2k for freebsd-questions@freebsd.org; Tue, 29 Mar 2005 04:11:33 +0200 Received: from cp464173-a.dbsch1.nb.home.nl ([84.27.215.228]:61221 helo=desktop.homenet) by smtp3.home.nl with esmtp (Exim 4.30) id 1DG6CZ-0001ws-Pr for freebsd-questions@freebsd.org; Tue, 29 Mar 2005 04:11:31 +0200 From: Danny Pansters To: freebsd-questions@freebsd.org Date: Tue, 29 Mar 2005 04:11:24 +0200 User-Agent: KMail/1.8 References: <6EDD6E31-9FF1-11D9-8CB8-000A27B3B070@eastlink.ca> In-Reply-To: <6EDD6E31-9FF1-11D9-8CB8-000A27B3B070@eastlink.ca> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200503290411.24852.danny@ricin.com> X-AtHome-MailScanner-Information: Please contact support@home.nl for more information X-AtHome-MailScanner: Found to be clean Subject: Re: Max files in unix folder from PIL process X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Mar 2005 02:11:35 -0000 On Tuesday 29 March 2005 03:25, David Pratt wrote: > Hi. I am creating a python application that uses PIL to generate > thumbnails and sized images. It is beginning to look the volume of > images will be large. This has got me to thinking. Is there a number > that Unix can handle in a single directory. I am using FreeBSD4.x at > the moment. I am thinking the number could be as high 500,000 images in > a single directory but more likely in the range of 6,000 to 30,000 for > most. I did not want to store these in Postgres. I will most likely to > break these into directories by size ie. thumbnail, small, medium, > large, etc. . That will at least take it down by a factor of the > number of sizes used but still the possibility of a very large number > (maximum to perhaps 100,000 or more) There is really no other way that > I can think of to categorize these at the moment. Should this pose a > problem on the filesystem? How will it affect the use of Unix tools? > Will there be access problems that affect speed? This is unchartered > territory for me so hope someone who has been there, done that can > provide some of what they learned from experience. Many thanks. I'd say hardcode a split-up at about ~5000 images per dir and renice if needed. Test with python whether reading one huge dir or reading and concatting several smaller (say 5000 files) dirs works better. Apparantly you got the pr0n, err, data, .. so you're in a position to test just what you're wondering about. If you want speed, stay away from databases/sql I think. I only have experience with my own pr0n, err, data, and its far less than what you want to deal with (pil works great though). My EUR 0.02 Dan