Forums / Developer / How to estimate filesystem size used by a subtree ?

How to estimate filesystem size used by a subtree ?

Author Message

H-Works Agency

Saturday 16 July 2011 6:05:56 am

Hey,

I have a rather unusual question about mysql and ezpublish :

I need to be able to tell how much space on the filesystem a certain subtree is using.

I know how to do that with /var but how to estimate database amount of data for a certain subtree ?

Thanx in advance for any help.

Cheers !

EZP is Great

Ivo Lukac

Sunday 17 July 2011 6:52:51 am

How about:

  • get the table size and number of rows in ezcontentobject_attribute table
  • calculate the average row size from the data above
  • get number of objects for each class in the subtree
  • calculate number of attributes with the data from previous line
  • finally, multiply average attribute row size with number of attributes 

A very rough estimate, but could do the trick.

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

H-Works Agency

Sunday 17 July 2011 9:11:14 am

Thats sounds like a good procedure, thank you for that Ivo.

I'll explore that way - maybe thru a shell script - and will post the results back here !

EZP is Great

Romeo Antony

Sunday 17 July 2011 3:56:18 pm

Very usefull post.

 

Thanks Ivo .

eZ debug

Timing: Jan 17 2025 22:49:54
Script start
Timing: Jan 17 2025 22:49:54
Module start 'content'
Timing: Jan 17 2025 22:49:55
Module end 'content'
Timing: Jan 17 2025 22:49:55
Script end

Main resources:

Total runtime0.7054 sec
Peak memory usage4,096.0000 KB
Database Queries199

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0071 587.8594180.8203
Module start 'content' 0.00710.6021 768.6797600.6406
Module end 'content' 0.60920.0962 1,369.3203337.6797
Script end 0.7054  1,707.0000 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00370.5245210.0002
Check MTime0.00140.1957210.0001
Mysql Total
Database connection0.00100.141610.0010
Mysqli_queries0.638090.43911990.0032
Looping result0.00160.22591970.0000
Template Total0.680596.520.3402
Template load0.00210.298420.0011
Template processing0.678396.157820.3392
Template load and register function0.00010.014110.0001
states
state_id_array0.00080.111010.0008
state_identifier_array0.00070.094720.0003
Override
Cache load0.00180.2516290.0001
Sytem overhead
Fetch class attribute can translate value0.00120.172640.0003
Fetch class attribute name0.00110.153270.0002
XML
Image XML parsing0.00190.276440.0005
class_abstraction
Instantiating content class attribute0.00000.001980.0000
General
dbfile0.00320.4557410.0001
String conversion0.00000.001330.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/li.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/li.tplEdit templateOverride template
1content/datatype/view/ezxmltags/ul.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/ul.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 17
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs