• 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?

imthebest

Formerly Super120
#1
Hi,

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

Thanks,
Super120
 

Chris D

XenForo developer
Staff member
#2
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.
 

Chris D

XenForo developer
Staff member
#4
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.
 

imthebest

Formerly Super120
#5
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).
 

imthebest

Formerly Super120
#7
When you have some time (maybe when your board is quiet) you could try deleting the data/xengallery directory and rebuilding the thumbnails.
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:

Code:
#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
 

Chris D

XenForo developer
Staff member
#8
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.
 

imthebest

Formerly Super120
#9
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?
 

Chris D

XenForo developer
Staff member
#10
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.
 

imthebest

Formerly Super120
#11
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?
 

Chris D

XenForo developer
Staff member
#12
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.
 

imthebest

Formerly Super120
#13
Running the "Rebuild Attachment Thumbnails" may actually help, if the attachment thumbnails are set to be a smaller size than the XFMG thumbnails.
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?
 

imthebest

Formerly Super120
#15
This has been completed.

internal_data/attachments: 1.7GB

data/xengallery
Old: 2.6GB

New: 1.1GB

data/attachments
Old: 2.6GB
New: 186MB


AROUND ***4GB*** IN TOTAL SAVINGS!!!

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:

2. On your Gallery Statistics block I see: Disk Usage: 1.2GB which is so so what albums were using on vBulletin. However you're using like 6GB of disk space on my filesystem in folders like data/xengallery, data/attachments, internal_data/attachments, and so!!! (I didn't imported attached files from vBulletin nor I ever allowed people to upload attachments to my forum).
https://xenforo.com/community/threa...enforo-paid-deleted.49067/page-97#post-843544

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

All the best,
Super120
 

RoldanLT

Well-known member
#16
OLD.
/data/attachments/
12057 Total Files
190M Total Size

/data/xengallery/
19098 Total Files
829M Total Size

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

/data/xengallery/
19561 Total Files
405M Total Size
 

imthebest

Formerly Super120
#17
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: