Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-10119

Split attachments directory into subdirectories

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Major Major
    • 4.0.0-a1
    • 3.0.8
    • None
    • None

      This has been brought up recently in support forums:

      http://www.phpbb.com/community/viewtopic.php?f=46&t=2124047
      http://www.phpbb.com/community/viewtopic.php?f=46&t=2125804
      http://www.phpbb.com/community/viewtopic.php?f=64&t=2126028

      FreeBSD UFS has a hard limit of ~32k files per directory. Most filesystems' performance degrades when they have a huge number of files per directory regardless.

      A two-level structure, using for example the first two characters of md5 of the file name for the subdirectory name, would likely be sufficient.

      Maybe using post id + file name would produce a more even distribution. Obviously if something like upload time or random noise can be incorporated it would be better still.

            CHItA CHItA
            Oleg Oleg [X] (Inactive)
            Votes:
            5 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: