Tips for managing a large number of files?

后端 未结 6 1853
走了就别回头了
走了就别回头了 2020-12-13 21:45

There are some very good questions here on SO about file management and storing within a large project.

Storing Images in DB - Yea or Nay?
Would

6条回答
  •  佛祖请我去吃肉
    2020-12-13 22:20

    I can't say much about how apache and PHP manage files, but I can say something about the ext3 file system. ext3 does not seem to have problems with large numbers of files in the same directory. I've tested it with up to a million files. Make sure the dir_index option is enabled on the file system before creating the directories. You can check by running dump2fs and change this option by running tune2fs. Hashing the files into a tree of subdirectories can still be useful because command line tools can still have problems listing the contents of the directory.

提交回复
热议问题