Pathologically Eclectic Rubbish Lister | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I wonder why you have 3 million files.
Do you really need each of those chunks of data to have a name accessible to all other applications, and the metadata of last access, modified, and inode-changed, and permissions and ownership maintained by the operating system? Or perhaps, what you should do instead is create a database that stores only the metadata you need for each item, along with the item itself. PostgreSQL's "binary" columns should handle any data that you might stick into a file, and will scale and replicate nicely. And with a unique index on the data column, you won't even need to "MD5" the data to ensure only one version... just try to insert it, and if it fails, it's already there. Nice atomic test. In reply to Re: (OT) should i limit number of files in a directory
by merlyn
|
|