Multiple simultaneous requests and cache generation

Author Message

Piotrek Karaś

Wednesday 17 December 2008 11:18:29 am

Hi all,

Can anyone tell me, or at least give me a hint where to look for the answer:

Whenever <b>cache-block</b> or <b>view-cache</b> are expired or physically cleared, what's eZ approach in generating new ones: will all the simultaneous requests compete in generating cache-blocks or view-cache, or will the first one set some sort of lock, making all other requests wait for it being generated? Or maybe any other approach?

This seems to be performance-wise <b>important for heavy-traffic sites</b>, as many competing requests could kill a server in case of accidental cache clear, for example.

Any comments or clarification on this subject greatly appreciated!

Cheers,
Piotrek

<i>PS. This is a question forwarded from a potential heavy-traffic eZ client, so it would be great if I could get back to them with some feedback... ;)</i>

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

André R.

Monday 29 December 2008 4:04:07 am

A lock is used on view cache, but this is subject to change at least in the cluster code:
http://issues.ez.no/IssueView.php?Id=14204&activeItem=16

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

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 20 2025 08:00:54
Script start
Timing: Jan 20 2025 08:00:54
Module start 'layout'
Timing: Jan 20 2025 08:00:54
Module start 'content'
Timing: Jan 20 2025 08:00:56
Module end 'content'
Timing: Jan 20 2025 08:00:56
Script end

Main resources:

Total runtime1.1361 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0058 589.3047152.6406
Module start 'layout' 0.00580.0038 741.945339.4766
Module start 'content' 0.00961.1250 781.4219534.6250
Module end 'content' 1.13460.0015 1,316.046912.1250
Script end 1.1361  1,328.1719 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.2761160.0002
Check MTime0.00130.1149160.0001
Mysql Total
Database connection0.00070.063710.0007
Mysqli_queries1.086095.5853540.0201
Looping result0.00050.0475520.0000
Template Total1.100496.920.5502
Template load0.00240.208720.0012
Template processing1.098096.646620.5490
Template load and register function0.00010.009610.0001
states
state_id_array0.00190.164210.0019
state_identifier_array0.00080.072720.0004
Override
Cache load0.00190.1715160.0001
Sytem overhead
Fetch class attribute can translate value0.00120.102120.0006
Fetch class attribute name0.00110.097640.0003
XML
Image XML parsing0.00120.106420.0006
class_abstraction
Instantiating content class attribute0.00000.000740.0000
General
dbfile0.00220.1934240.0001
String conversion0.00000.000740.0000
Note: percentages do not add up to 100% because some accumulators overlap

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
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 11
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs