Re: CMS-Blog system

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Le jeudi 04 septembre 2008 à 10:31 +0100, Stut a écrit :
> On 4 Sep 2008, at 06:56, Yannick Warnier wrote:
> 
> > Le mercredi 03 septembre 2008 à 22:07 +0100, Luke a écrit :
> >> seperate databases is a hassle, since you have to mess with multiple
> >> connections, I would go with the one database. Just cut down on data
> >> storage, use userids instead of usernames for identification in the  
> >> tables
> >> and such.
> >
> > Not only is it a hassle, it is also a major system bottleneck on most
> > filesystems. If using MySQL for example, each database creates one
> > directory. If you get to 10.000 directories in /var/lib/mysql for
> > example (based on Debian systems), you will start to feel the weight  
> > of
> > having so many items in only one directory. If you ever reach 30.000,
> > you'll start to think it *really* was a bad idea.
> > Not to mention any database backup will be accordingly slower.
> > Personal recommendation: don't go for the multiple database solution  
> > if
> > you plan to have more than 100 and you can avoid it.
> 
> How bad this is depends on the OS and filesystem you're using. One of  
> the sites I manage has a directory with over 300k files in it, and  
> it's never a problem unless I want to list the contents (which I never  
> do!). Accessing the files (for backups or other purposes) is just as  
> fast as it is with only a few files. That's a CentOS box using ext3.

Yes, I know. I'm talking about a Debian system with ext3, so I wouldn't
really consider it as a "low" configuration/OS/FS, but I'm reporting,
nevertheless, that it can have important drawbacks.

On the other hand, 120.000 files in the same directory seemed to be the
limit on one of the disks we have (the system reported: max number of
inodes assigned, impossible to create new file). I'm sure there are also
ways to improve performance by setting ext3 to use larger inodes, but
you have to plan that from the start.

> It's possible the limitation you're seeing is related to MySQL rather  
> than the filesystem, but I've never had anywhere near that number of  
> databases on a single box so I can't speak to that.

I think that isn't MySQL (system usage shows the system itself is
overwhelmed, apart from MySQL).

Thanks for the suggestions anyway.

Yannick


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux