|
Posted by ImOk on 07/30/06 15:53
Miguel Cruz wrote:
> > b007uk@gmail.com wrote:
> >> Thank you!
> >> Maybe I won't need to use mysql after all!
> >> File names are words or frases that may have digits, separated by '-',
> >> like this: this-is-one-file.txt this-1-is-another.txt and-more.txt
> >> ill try to change '-' to '/' and save it like that:
> >> ./t/this/is/one/file.txt
> >> it should work
> >> Thank you for the idea again!
> >
> > If you do this you will have to make a lot of directories all the time.
> >
> > If the names are pretty unpredictable like that, how about just taking
> > the md5() of the name and using the first character of that? That way
> > you get 16 buckets to spread them out over.
> >
> > miguel
>
> Or take first 2 or 3 digits and get a hash-space of 256 or 4096
> subdirectories and filesystem will be still humming fast with 1,000,000
> files.
>
> roman
The solutions offered about breaking down into subdirectories is a good
one. I use it.
But ever hear the term throw more hardware at it? Sometimes brute force
is the cheapest way to go.
1) Buy a higher end machine.
2) You can extend current machine by spreading files across multiple
storage servers or multiple partitions.
Navigation:
[Reply to this message]
|