0

I have a website with a lot of small images (no larger than 300 kb). They're all in a single folder, and now they're around 40.000, but they keep increasing very fast. When I open a page of my website, each page will load 6 of those images. I can have also 1000 or more people connected together on my website.

Do you think this way of storing small files will slow down performances of my server? I thought about these possible solutions, but I'm not sure which of those is the best: - Store these pictures in folders, maybe a folder for each day, so we'll have no more than 5000 picture in each folder; - Store pictures in my DB in blob fields.

My server uses CentOS 6.5 as operating system.

Which solution do you think will be the best?

70ny
  • 748
  • 1
  • 7
  • 22
  • "best" in terms of speed? Use files and not store in MySQL - although I've no citation. – ʰᵈˑ Dec 01 '14 at 16:52
  • yes, in termos of "speed". Ok for the choice of files but ... hierarchy in folders? How many subfolders could I use? – 70ny Dec 01 '14 at 17:00
  • 1
    Depends if you like organisation - how the files can be grouped together. Personally, I would do something like `images/january`, `images/february` etc - but then you could map the location of each image with MySQL. I've not much experience with file systems and it could be a question more suited over at http://unix.stackexchange.com/ – ʰᵈˑ Dec 01 '14 at 17:03

0 Answers0