1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

data/xengallery using more space than internal_data/attachments?

Discussion in 'Media Gallery Support' started by imthebest, Apr 14, 2015.

  1. imthebest

    imthebest Formerly Super120


    The size of my data/xengallery directory is 2.6GB and the size of my internal_data/attachments is 1.7GB. Considering that the former is being used for XFMG thumbnails while the latter for XFMG full size images only (because I have disabled attachments on my forum), is it normal for thumbnails to use more space than the full size images? We're talking about almost 1GB of difference.

    This gallery was an import from vBulletin 3.8

  2. Chris D

    Chris D XenForo Developer Staff Member

    Sounds a bit high, though it can be partly explained by some video thumbnails being duplicated.

    There are some outstanding bugs relating to Gallery video thumbnails which is ultimately going to be re-working how video thumbnails fundamentally work.
  3. imthebest

    imthebest Formerly Super120

    No video has been allowed on my XFMG installation since day 1.
  4. Chris D

    Chris D XenForo Developer Staff Member

    When you have some time (maybe when your board is quiet) you could try deleting the data/xengallery directory and rebuilding the thumbnails.

    I would certainly expect the file size of that directory to be lower. I don't have an immediate answer as to why it might not be in your case.
  5. imthebest

    imthebest Formerly Super120

    I'll test this out soon and let you know.

    Do it matters if I'm using GD or ImageMagick? I'm using GD and on my vBulletin forum I was also using GD (if I remember correctly).
  6. Chris D

    Chris D XenForo Developer Staff Member

    All thumbs are generated with GD regardless. It uses a different image processor to XF.
  7. imthebest

    imthebest Formerly Super120

    Doing that will also reduce the disk usage of data/attachments which is basically a clone of data/xengallery? Or do I need to also remove data/attachments in order to get the same effects on that folder?

    Currently it's like this:

    #du -h data/xengallery
    2.6GB    xengallery
    #find data/xengallery -type f | wc -l
    41,052 files
    #du -h data/attachments
    2.6GB    attachments
    #find data/attachments -type f | wc -l
    40,219 files
  8. Chris D

    Chris D XenForo Developer Staff Member

    If you want to remove anything from data/attachments you would have to do that manually.

    If you literally have no attachments, yeah, it would be safe to delete the contents of that directory.

    The XFMG thumbnail rebuild won't rebuild anything in the data/attachments directory, but if you ever ran the XenForo attachment thumbnail rebuild then it would rebuild all of the thumbnails including those added by add-ons.
  9. imthebest

    imthebest Formerly Super120

    1. So in other words and to make it clear, if I literally have no attachments at all, it's safe to empty the directory data/attachments?

    2. After doing so, I'm not going to see anything inside the directory data/attachments anymore unless (a) I enable the attachments system or (b) I manually rebuild the XF attachment thumbnails?

    3. When people add new media, isn't XF going to replicate again the contents of data/xengallery into data/attachments?
  10. Chris D

    Chris D XenForo Developer Staff Member

    1. Correct.

    2. When new media is added, that media will have a thumbnail created in data/attachments. However, yes, the ones you have deleted will stay deleted unless you manually rebuild the XF thumbnails.
  11. imthebest

    imthebest Formerly Super120

    Chris I have decided not to remove anything at data/attachments just to be "compatible" with the XF structure and design. So now what I'm going to do is:

    1. Run "Rebuild XenForo Media Gallery Thumbnails" and then "Rebuild XenForo Media Gallery Album Thumbnails" in order to hopefully reduce the size of data/xengallery. Should I run both rebuilders or just the first one which will also perform the job of the second?

    2. Run "Rebuild Attachment Thumbnails" to hopefully reduce the size of data/attachments?
  12. Chris D

    Chris D XenForo Developer Staff Member

    You would have to delete the existing contents of data/xengallery first to see any benefit. And you would only need to run the "Rebuild XenForo Media Gallery Thumbnails". There's no need to rebuild the album thumbnails.

    Running the "Rebuild Attachment Thumbnails" may actually help, if the attachment thumbnails are set to be a smaller size than the XFMG thumbnails.
  13. imthebest

    imthebest Formerly Super120

    They have been set since day 1 to 100 that 's why I also don't understand why data/attachments have the same size of data/xengallery (300x300). Anyway before running "Rebuild Attachment Thumbnails" do I also need to empty the folder data/attachments first?
  14. Chris D

    Chris D XenForo Developer Staff Member

    You might as well, yes.
  15. imthebest

    imthebest Formerly Super120

    This has been completed.

    internal_data/attachments: 1.7GB

    Old: 2.6GB

    New: 1.1GB

    Old: 2.6GB
    New: 186MB


    Now maybe you understand why I was complaining so hard about the duplication at data/attachments... but now I don't care :p

    I suggest you to review what your vBulletin 3.x importer does after finishing with the import... it looks like somehow it was doing something wrong when it comes to first time thumbnails generation and I suspected this since day 1:


    Anyway everything seems fine now. Again, thank you very much for your patience and your A+ support.

    All the best,
    51463 likes this.
  16. RoldanLT

    RoldanLT Well-Known Member

    12057 Total Files
    190M Total Size

    19098 Total Files
    829M Total Size

    New after rebuild, 60+ media added before I re run the rebuild though.
    12045 Total Files
    97M Total Size

    19561 Total Files
    405M Total Size
  17. imthebest

    imthebest Formerly Super120

    Is your gallery from a migration, too? If so, which system you migration from? Did you changed the thumbnail sizes before running the rebuilders?
    Last edited: Apr 17, 2015
  18. RoldanLT

    RoldanLT Well-Known Member

Share This Page