Forums / Developer / Multiple simultaneous requests and cache generation

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

eZ debug

Timing: Jan 20 2025 06:01:18
Script start
Timing: Jan 20 2025 06:01:18
Module start 'content'
Timing: Jan 20 2025 06:01:19
Module end 'content'
Timing: Jan 20 2025 06:01:19
Script end

Main resources:

Total runtime1.5537 sec
Peak memory usage4,096.0000 KB
Database Queries191

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0061 589.1016180.8125
Module start 'content' 0.00611.4179 769.9141539.7188
Module end 'content' 1.42400.1296 1,309.6328332.7422
Script end 1.5536  1,642.3750 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.2671210.0002
Check MTime0.00150.0969210.0001
Mysql Total
Database connection0.00070.044110.0007
Mysqli_queries1.476895.05401910.0077
Looping result0.00180.11471890.0000
Template Total1.515397.520.7577
Template load0.00180.115920.0009
Template processing1.513597.415320.7568
Template load and register function0.00010.008710.0001
states
state_id_array0.00230.147210.0023
state_identifier_array0.00140.089520.0007
Override
Cache load0.00150.0964160.0001
Sytem overhead
Fetch class attribute can translate value0.00140.092630.0005
Fetch class attribute name0.00180.117540.0005
XML
Image XML parsing0.00130.083430.0004
class_abstraction
Instantiating content class attribute0.00000.000540.0000
General
dbfile0.00870.5613350.0002
String conversion0.00000.000430.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
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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 11
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs