Forums / Developer / Cache handling is making NAS systems slow

Cache handling is making NAS systems slow

Author Message

Tony Wood

Sunday 01 June 2003 6:01:55 am

A couple of issues really.

The '/' in content settings is ignored when you set in '[ContentSettings]'

So if you put CacheDir=/var/cache/sitename/content the system removes the first '/'.
Normally this would not be a problem, but when you main site is on an external RAID array you want all your disk intensive files to to local say in /var/cache. ln -s is a way round this problem and works, but really it should be a ini command.

Another thing that is noticable is that content is the only element addressed by CachDir, really this ini setting should affect 'ini' 'template' and 'template-block'.

I also notice that template-block is only created once and not for every server instance of eZpublish. This means that template block can only exist on a single datasource.

btw Database on muliple servers work well, its just the cache files that slows things down a bit.

Comments please

Tony

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future

Bård Farstad

Monday 02 June 2003 4:11:00 am

Tony,

I agree on your comments. All these issues should be fixed. eZ publish should be able to have the var/ folder placed anywhere on the filesystem.

Cache block should automatically use the siteaccess to create cache files, so they would be unique pr siteaccess.

--bård

Documentation: http://ez.no/doc

Tony Wood

Monday 02 June 2003 4:21:07 am

Thanks,

Will these make it into 3.1? I hope so :) as NFS is around 100 times slower than direct access and GFS is too pricey.

tia

tony

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future

Bård Farstad

Tuesday 03 June 2003 2:58:41 am

I've just commited a fix which enables CacheDir to be set absolute. All cache directories are then created in the desired folder, except ini cache. There is a problem with circular dependencies if we want to read from the ini file where the ini cache is beeing saved.

--bård

Documentation: http://ez.no/doc

Tony Wood

Tuesday 03 June 2003 3:40:13 am

Thanks :)

Does this mean that template-block will also be created in the CacheDir? Will this mean that if two machines are connected to a central data store on NAS the cache files will be created on both machine in /var/cache. (or the like). Meaning that template, template-block etc are created locally on both machines.

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future

Bård Farstad

Tuesday 03 June 2003 5:01:47 am

Yes, template cache files are created locally ( if that's your setup ). This means a bit more overhead in cache creation, but the speed improvements in cached views is worth it.

We use a rsynct script at ez.no which syncs the files between the machines ( uploaded files etc.. ). With this setup you don't need to use NFS and friends. Mabye that's a solution for your NFS speed issues?

--bård

Documentation: http://ez.no/doc

Tony Wood

Tuesday 03 June 2003 5:24:46 am

Thanks,

Let me have a go with the new code and see where it gets me, I have moved NFS from 100 to a 1000 network card so is running a little faster. I'll take a look at rsync too, I need something pretty generic so it can work easily on all sites.

I'll report back.

Thanks again

tony

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future

Gabriel Ambuehl

Tuesday 03 June 2003 10:15:10 am

Just how is GFS pricey if there's even a GPL edition of it, OpenGFS?

Visit http://triligon.org

Tony Wood

Tuesday 03 June 2003 11:12:32 am

Its more than i can justify, here an article on it http://www.hoise.com/primeur/02/articles/monthly/AE-PR-12-02-39.html

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future