Disk Usage and Database size.

Author Message

Richard Lundberg

Monday 03 August 2009 3:08:04 am

Hi,

I have several installations of eZpublish on a VPS, and all is fine apart from I am running out of disk storage. In terms of CPU and system resources, I am running at less than 50% and would like to use the VPS for further installations but need to free up some disk space.

There seems to be a big difference between the amount of disk usage quoted to me by Plesk for a domain, and the size of the database running each eZPuplish installation.

For example

Site 1: Disk usage 496MB, database size 274MB
Site 2: Disk usage 1,396MB, database size 486MB
Site 3: Disk usage 2,389MB, database size 587MB

Are files, such as images stored in the database, or simply referenced?

I have emptied the trash on all the sites, are there any other areas where I can trim the disk usage such as removing the original images? If so, is there a process to do this?

Any suggestions appreciated.

www.peakm3.com

Heath

Monday 03 August 2009 3:48:25 am

Hello Richard,

The short answer is Yes :)

[0] http://ezpedia.org/en/ez/disk_usage
[1] http://ezpedia.org/en/ez/database_usage

You may wish to clear your image alias cache files as well. We talked about this as well [2]

[2] http://ez.no/developer/forum/general/clear_cache_with_a_command_line

Cheers,
Heath

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

Gaetano Giunta

Monday 03 August 2009 3:57:51 am

Binary contents such as images, videos, flash, pdf or word files are stored on the filesystem, not in the database.

Other files that eZ publish generates automatically are
- log files (rotated and then removed automatically, little risk of filling disks with those)
- cache files - depending on your site design and numbre of contents, this can grow quite big

You can check out size of the individual subdirs of the 'var' directory to get a fine-grained picture.

There is no use in trying to empty the cache directories, as eZ publish would try to recreate all those files immediately.

Otoh deleting some contents that are not needed anymore in the site but have big binary files inside might be a good idea.

You could also look at the design elements, and see if you have leftover images/flash files that are not used anymore and take up disk space (you might develop a little script that parses apache access logs to find out unused design elements)

Developers often leave complete or partial backups of sites around when upgrading to new versions, those would be a good candidate for cleanup.

Last but not least, you could move to a "cluster" config, where eZ Publish stores cache files and binary files in a 2nd db. It would mean having a bigger db than you most likely have now, and a slightly slower site, as mysql is not best suited to serve a lot of huge blobs all the time, and in the end the cache files would be copied over to your filesystem anyway, so the space gained would depend on the cache/storage ratio...

Principal Consultant International Business
Member of the Community Project Board

Gaetano Giunta

Monday 03 August 2009 4:06:41 am

@heath - wouldn't clearing the image variations cache be a stopgap measure too, like cleaning the cache?
As far as I remember, image variations are generated on access, so that even if you have 50 variations defined, you will get only 2/3 variations used for any single image.
And as soon as the users and editors navigate around the site, most of those variations will be regenerated (unless of course the site design has changed and some variations are not used anymore that where in the past).

Principal Consultant International Business
Member of the Community Project Board

Heath

Monday 03 August 2009 4:13:31 am

@Gaetano

But since I know most forum users don't really ask very good questions I always try to give them a little extra.

Like how this command does reduce disk space consumed.

Now the choice of when to use it. That depends on the 'need', you may 'need' to flatten vps backups before packaging where this suggestion makes sense (say during a -nightly- vps vhost ezp site backup).

Cheers,
Heath

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

Gaetano Giunta

Monday 03 August 2009 4:29:49 am

@Heath: you are perfectly right, and I appreciate the thoroughness of the answers given in this thread.
I just wanted to make it clear to Richard that some kind of removed files will come back over time, so it is a very good idea for trimming backup size but not for trying to squeeze more sites living side by side on the same disk space.

Principal Consultant International Business
Member of the Community Project Board

Jozef Baum

Monday 03 August 2009 4:07:52 pm

@ Richard:

May I ask you what you see as the advantages of having more than one eZ Publish installation on your VPS?

eZ Publish is multisite. So it allows you to have to maintain only one installation to administer as many sites as you want, with as many databases as you want.

Reusing content of one site on another one is also very much easier if you have only one eZ Publish installation.

The individual siteaccess and design settings allow for a strict separation of all of your sites with only one eZ Publish installation.

Richard Lundberg

Saturday 08 August 2009 9:40:22 am

Josef,

I guess I am simply more comfortable with the "boundaries" between different clients set on the VPS rather than in eZPublish. Easier to migrate clients to different servers, set up email and I just havn't got my head around running eZPublish for multiple sites.

re Disk usage, all these suggestions has yielded some extra disk space, but I have found the major culprit is the Webalizer log files, (700MB + per site). Have changed Webalizer settings accordingly.......

thx to all for help.

www.peakm3.com

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