1

I mean, if I have the following folder structure: www/lang/comp/ - more than a million files here. Will the worker slowed down by looking for a file? For example, https://example.com/lang/comp/comp-3453459.html

Is it will be better to divide such a folder into several smaller folders?

yurin
  • 111
  • 2
  • 3
    Nginx doesn't look for files, it just asks the OS to open a file. It depends how efficiently the OS handles very large directories. – Richard Smith May 27 '21 at 07:35

1 Answers1

1

Yes, the big folder can slow everything down.

It would depend on your filesystem, and there's a lot of good pointers and some advice here: Filesystem large number of files in a single directory

rvs
  • 4,027
  • 1
  • 25
  • 30