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 .

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 29 2025 23:52:12
Script start
Timing: Jan 29 2025 23:52:12
Module start 'layout'
Timing: Jan 29 2025 23:52:12
Module start 'content'
Timing: Jan 29 2025 23:52:12
Module end 'content'
Timing: Jan 29 2025 23:52:12
Script end

Main resources:

Total runtime0.0134 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0044 588.2656151.2266
Module start 'layout' 0.00440.0018 739.492236.7031
Module start 'content' 0.00630.0058 776.195394.2969
Module end 'content' 0.01200.0013 870.492233.9766
Script end 0.0134  904.4688 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002216.2053140.0002
Check MTime0.00107.1647140.0001
Mysql Total
Database connection0.00064.633410.0006
Mysqli_queries0.001712.471530.0006
Looping result0.00000.067710.0000
Template Total0.00107.510.0010
Template load0.00085.782410.0008
Template processing0.00021.688810.0002
Override
Cache load0.00054.004610.0005
General
dbfile0.001612.138480.0002
String conversion0.00000.046340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs