Re: [PHP] How many is too many?
This depends on the filesystem used, but I would recomend you to organized them by year. Now you have few hundred articles, two or three years later it might be 1000, and reorganize it then would be much harder then to create the directories now. Monty wrote: This is a more general server question: I know that having a large number of files in one folder can slow down a web server, but, how many would it take for this to be a problem? Wondering if I should store all articles for a content site in one big 'articles' folder with each article having it's own folder within (/articles/article_id/), or if I should organize them by year then article name (/articles/2002/article_id). The site will only produce a few hundred articles a year. I'd like the keep the file structure shallow and simple if possible, but, if it could potentially slow the server down by putting so many folder in one I'll split them up more. Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How many is too many?
I'm storing somewhere over 100,000 separate articles on my site, using ht://dig to index them. They're organized as //MM/nn. No performance problems to speak of on a pretty popular non-commercial site (2-3 pageviews/sec, 24x7) whether they just browse through the directories or or use ht://dig to retrieve the text. -Original Message- From: Monty [mailto:monty3;hotmail.com] Sent: Friday, October 25, 2002 12:40 AM To: [EMAIL PROTECTED] Subject: [PHP] How many is too many? This is a more general server question: I know that having a large number of files in one folder can slow down a web server, but, how many would it take for this to be a problem? Wondering if I should store all articles for a content site in one big 'articles' folder with each article having it's own folder within (/articles/article_id/), or if I should organize them by year then article name (/articles/2002/article_id). The site will only produce a few hundred articles a year. I'd like the keep the file structure shallow and simple if possible, but, if it could potentially slow the server down by putting so many folder in one I'll split them up more. Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How many is too many?
IMHO it depends on the O/S and filesystem. For example, there's an fs for Linux called Reiser FS that uses semibalanced binary trees to speed up file organization, so that even with high file counts you shouldn't experience major delays. Some other filesystems have hard limits on the number of files that can be stored in the root directory, so you should keep that in mind as well. On Fri, 2002-10-25 at 19:16, Mark Charette wrote: I'm storing somewhere over 100,000 separate articles on my site, using ht://dig to index them. They're organized as //MM/nn. No performance problems to speak of on a pretty popular non-commercial site (2-3 pageviews/sec, 24x7) whether they just browse through the directories or or use ht://dig to retrieve the text. -Original Message- From: Monty [mailto:monty3;hotmail.com] Sent: Friday, October 25, 2002 12:40 AM To: [EMAIL PROTECTED] Subject: [PHP] How many is too many? This is a more general server question: I know that having a large number of files in one folder can slow down a web server, but, how many would it take for this to be a problem? Wondering if I should store all articles for a content site in one big 'articles' folder with each article having it's own folder within (/articles/article_id/), or if I should organize them by year then article name (/articles/2002/article_id). The site will only produce a few hundred articles a year. I'd like the keep the file structure shallow and simple if possible, but, if it could potentially slow the server down by putting so many folder in one I'll split them up more. Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How many is too many?
I read in here once or twice that it's worth worrying about at the 1000's mark, not 100's. However, hashing them into years (/2002/), or categories (/sports/), or alphabetically (/a/, /b/, /c/), or by author might prove beneficial froma content management point of view. Then logical end choice you make will depend on your site, and how people use it. For the amount of articles you're talking about, you'd definitely only need one level of hashing. Justin on 25/10/02 2:40 PM, Monty ([EMAIL PROTECTED]) wrote: This is a more general server question: I know that having a large number of files in one folder can slow down a web server, but, how many would it take for this to be a problem? Wondering if I should store all articles for a content site in one big 'articles' folder with each article having it's own folder within (/articles/article_id/), or if I should organize them by year then article name (/articles/2002/article_id). The site will only produce a few hundred articles a year. I'd like the keep the file structure shallow and simple if possible, but, if it could potentially slow the server down by putting so many folder in one I'll split them up more. Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How many is too many?
Why not store them in a database with one php script selecting them? Monty wrote: This is a more general server question: I know that having a large number of files in one folder can slow down a web server, but, how many would it take for this to be a problem? Wondering if I should store all articles for a content site in one big 'articles' folder with each article having it's own folder within (/articles/article_id/), or if I should organize them by year then article name (/articles/2002/article_id). The site will only produce a few hundred articles a year. I'd like the keep the file structure shallow and simple if possible, but, if it could potentially slow the server down by putting so many folder in one I'll split them up more. Thanks! -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How many is too many?
I'm storing the article text and details in a database, but, all the assets (these articles have lots of photos) need to be organized into folders. So logically I want to create a folder for each article using the article ID number. But I want to be sure if I have within the Article folder about 700 other folders that contain all the assets for every article that that won't slow down the server. This site will not be visited by millions necessarily, but, I still want to be sure I'm setting up the file system as efficiently as possible. Thanks! From: [EMAIL PROTECTED] (Leif K-Brooks) Newsgroups: php.general Date: Fri, 25 Oct 2002 00:55:48 -0400 To: Monty [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP] How many is too many? Why not store them in a database with one php script selecting them? Monty wrote: This is a more general server question: I know that having a large number of files in one folder can slow down a web server, but, how many would it take for this to be a problem? Wondering if I should store all articles for a content site in one big 'articles' folder with each article having it's own folder within (/articles/article_id/), or if I should organize them by year then article name (/articles/2002/article_id). The site will only produce a few hundred articles a year. I'd like the keep the file structure shallow and simple if possible, but, if it could potentially slow the server down by putting so many folder in one I'll split them up more. Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php