[xwiki-users] Just questions regarding filesystem storage feature
Hello, No issues here just needing some insights on filesystem storage ... I just moved to it (on 4.3-milestone-1), and ran script to migrate my attachments from db to filesystem. Though attachments seem to open perfectly well, I'm surprised by the difference in size: file "xwikiattachment_content.MYD" (I'm using MySql as you guess) is about 1,3GB, while my whole folder ${xwiki.data.dir}/storage is only about 600MB. What could explain such a big difference ? (apart from some attachments that may not have been migrated) Considering: "It is prudent to leave the attachments in the database since in most situations the attachment data is not bothersome just sitting in the database (The only risk of attachments left in the database is that they will bloat the size of the database files)" [1] Ok with that, but supposing that I checked my attachments are ok and I'm satisfied with fs storage (or I'm just using a test xwiki that I can blow away without risk), removing attachments from db means cleaning table xwikiattachment_content, is it right ? Can I remove other xwikiattachment* tables, or are they still used to reference the attachments ? (I guess they do but...) Thanks, Jeremie [1] - http://extensions.xwiki.org/xwiki/bin/view/Extension/Filesystem+Attachment+P...
Hi, On 10/29/2012 12:01 PM, Jeremie BOUSQUET wrote:
Hello,
No issues here just needing some insights on filesystem storage ...
I just moved to it (on 4.3-milestone-1), and ran script to migrate my attachments from db to filesystem.
Though attachments seem to open perfectly well, I'm surprised by the difference in size: file "xwikiattachment_content.MYD" (I'm using MySql as you guess) is about 1,3GB, while my whole folder ${xwiki.data.dir}/storage is only about 600MB. What could explain such a big difference ? (apart from some attachments that may not have been migrated)
I have never looked at the size difference in a mysql file to the accompanying filesystem data size. That seems like a large discrepency perhaps try doing a select length(xwikiattachment_content.xwa_content) on that table and add up the numbers? It's also possible that there was corruption at one time which lead to orphaned entries in the xwikiattachment_content table with no accompanying pointers from the xwikiattachment table. The content in that table is binary so it should not have any overhead, let alone over 2x. Note this issue: http://extensions.xwiki.org/xwiki/bin/view/Extension/Filesystem+Attachment+P... which might have caused some of the attachments not to import properly. This patch was just applied in version 2.1 of the attachment.
Considering: "It is prudent to leave the attachments in the database since in most situations the attachment data is not bothersome just sitting in the database (The only risk of attachments left in the database is that they will bloat the size of the database files)" [1]
Ok with that, but supposing that I checked my attachments are ok and I'm satisfied with fs storage (or I'm just using a test xwiki that I can blow away without risk), removing attachments from db means cleaning table xwikiattachment_content, is it right ? Can I remove other xwikiattachment* tables, or are they still used to reference the attachments ? (I guess they do but...)
I added documentation on how to do this, note that you probably should not do it until we have a satisfactory answer to the size discrepancy. http://extensions.xwiki.org/xwiki/bin/view/Extension/Filesystem+Attachment+P.... Thanks, Caleb
Thanks, Jeremie
[1] - http://extensions.xwiki.org/xwiki/bin/view/Extension/Filesystem+Attachment+P... _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Hello, Thanks for your answer Caleb, 2012/10/30 Caleb James DeLisle <[email protected]>:
Hi,
On 10/29/2012 12:01 PM, Jeremie BOUSQUET wrote:
Hello,
No issues here just needing some insights on filesystem storage ...
I just moved to it (on 4.3-milestone-1), and ran script to migrate my attachments from db to filesystem.
Though attachments seem to open perfectly well, I'm surprised by the difference in size: file "xwikiattachment_content.MYD" (I'm using MySql as you guess) is about 1,3GB, while my whole folder ${xwiki.data.dir}/storage is only about 600MB. What could explain such a big difference ? (apart from some attachments that may not have been migrated)
I have never looked at the size difference in a mysql file to the accompanying filesystem data size. That seems like a large discrepency perhaps try doing a select length(xwikiattachment_content.xwa_content) on that table and add up the numbers? It's also possible that there was corruption at one time which lead to orphaned entries in the xwikiattachment_content table with no accompanying pointers from the xwikiattachment table.
select sum(octet_length(xwa_content)) from xwikiattachment_content; +--------------------------+ | sum(octet_length(xwa_content)) | +--------------------------+ | 874936295 | +--------------------------+ That would be about 834Mo, so it's already far lower than size of related db file.
The content in that table is binary so it should not have any overhead, let alone over 2x.
Note this issue: http://extensions.xwiki.org/xwiki/bin/view/Extension/Filesystem+Attachment+P... which might have caused some of the attachments not to import properly. This patch was just applied in version 2.1 of the attachment.
It's the version I use for the import script so that should be ok.
Considering: "It is prudent to leave the attachments in the database since in most situations the attachment data is not bothersome just sitting in the database (The only risk of attachments left in the database is that they will bloat the size of the database files)" [1]
Ok with that, but supposing that I checked my attachments are ok and I'm satisfied with fs storage (or I'm just using a test xwiki that I can blow away without risk), removing attachments from db means cleaning table xwikiattachment_content, is it right ? Can I remove other xwikiattachment* tables, or are they still used to reference the attachments ? (I guess they do but...)
I added documentation on how to do this, note that you probably should not do it until we have a satisfactory answer to the size discrepancy.
Of course.
http://extensions.xwiki.org/xwiki/bin/view/Extension/Filesystem+Attachment+P....
Thanks, Caleb
Thanks, Jeremie
[1] - http://extensions.xwiki.org/xwiki/bin/view/Extension/Filesystem+Attachment+P... _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
participants (2)
-
Caleb James DeLisle -
Jeremie BOUSQUET