[pmwiki-users] speeding up pages and pagelists

Frank Graffagnino frank.graffagnino at metecs.com
Thu Jan 5 11:51:24 CST 2012


I have a couple of questions I'm hoping the community can help me with.
 Our pmwiki site has pages that sometimes take between 2 - 8 seconds to
load.  I've used stopwatch, and then done some research, which led me to
enable the following in my local config:

# pagelist caching
$WorkDir = '/home/website_Download/work.d';
$EnableHTMLCache = 1;
$PageCacheDir = $WorkDir;
$PageListCacheDir = $WorkDir;

# search and pagelist exclusions
$SearchPatterns['default'][] = '!\.GroupHeader$!';
$SearchPatterns['default'][] = '!\.GroupFooter$!';
$SearchPatterns['default'][] = '!Profiles\..*-Contrib$!';
$SearchPatterns['default'][] = '!Profiles\..*-LastAction$!';

$group = FmtPageName('$Group',$pagename);
if ($group != 'Development') {
    $SearchPatterns['default'][] = '!^Site\.!';
    $SearchPatterns['all'][]     = '!^Site\.!';
    $SearchPatterns['normal'][]  = '!^Site\.!';
}

# Page indexing
$EnablePageIndex = 1;


With these on, I can confirm that pagelist caching does appear to be
working, as I see the save and load in the stopwatch output.  however, on
pages with multiple pagelists, I get multiple PageStore::ls calls for each
item in every pagelist, which takes a ton of time.  Also, I see the httpd
processor usage go all the way to 100% during a GET on these pages.  I've
attached my stopwatch output below, and also an example of one of the
pagelist templates i am using.  Questions:

1. With pagelist caching enabled, why is there an PageStore::ls for every
single result?  Should that be in the cache?
2. Is the spike in CPU usage for each pageview normal?  Could something
like PHP accelerator help?
3. I have EnableHtmlCache on, but it doesn't appear to do anything.  Is
this because the pages require login?
4. Is there anything I can do to get rid of all those PageStore::ls calls?
5. Is there anything I'm doing in my template that is ineffecient?

Thanks in advance for any help or answers you can provide.  Also, any
personal experience or advice trying to speed up these page views is
appreciated.  Stopwatch output and template below.

0: 00.00 MarkupToHTML begin
1: 00.05 FPLTemplate: Chain begin
2: 00.05 FPLTemplate: FPLTemplateLoad
3: 00.05 FPLTemplate: FPLTemplateDefaults
4: 00.05 FPLTemplate: FPLTemplatePageList
5: 00.05 MakePageList pre
6: 00.05 PageListCache begin load key=1783098ec26df5f43fd5bcac95c061aa
7: 00.05 PageListCache end load
8: 00.05 PageListSources begin
9: 00.05 PageListSources end count=10
10: 00.05 PageListSort pre ret=6 order=-MemoryBandwidth
11: 00.05 MakePageList items count=10, filters=PageListSort
12: 00.06 MakePageList post count=10, readc=10
13: 00.06 PageListSort begin
14: 00.06 PageListSort sort
15: 00.08 PageListSort end
16: 00.08 MakePageList end
17: 00.08 FPLTemplate: FPLTemplateSliceList
18: 00.08 FPLTemplate: FPLTemplateFormat
19: 00.10 MarkupToHTML begin
20: 00.15 PageStore::ls begin wiki.d/{$FullName}
21: 00.18 PageStore::ls merge wiki.d/{$FullName}
22: 00.18 PageStore::ls end wiki.d/{$FullName}
23: 00.18 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
24: 00.18 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
25: 00.18 PageStore::ls end $FarmD/wikilib.d/{$FullName}
26: 00.18 PageStore::ls begin wiki.d/{$FullName}
27: 00.20 PageStore::ls merge wiki.d/{$FullName}
28: 00.20 PageStore::ls end wiki.d/{$FullName}
29: 00.20 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
30: 00.20 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
31: 00.20 PageStore::ls end $FarmD/wikilib.d/{$FullName}
<... repeats a ton of times. Edited for brevity ... >

509: 03.82 MarkupToHTML end
510: 03.82 FPLTemplate: Chain end
511: 03.82 MarkupToHTML end
512: 03.83 MarkupToHTML begin
513: 03.96 MarkupToHTML end
514: 03.96 MarkupToHTML begin
515: 03.99 MarkupToHTML end
516: 05.11 now



[[#blpflistFG]]
(:if equal {<$Group}:)
(:table width="100%" cellspacing=0 style="border:1px solid black;
background-color:#dde;":)
(:cellnr style="padding: 3px 5px; border-bottom:1px solid black; font-size:
small;" :)'''Host'''
(:cell style="padding: 3px 5px;" :)'''OS'''
(:cell style="padding: 3px 5px;" :)'''kernel'''
(:cell style="padding: 3px 5px;" :)'''bit'''
(:cell style="padding: 3px 5px;" :)'''cpus'''
(:cell style="padding: 3px 5px;" :)'''GHz'''
(:cell style="padding: 3px 5px;" :)'''CPU model'''
(:cell style="padding: 3px 5px;" :)'''RAM'''
(:cell style="padding: 3px 5px;" :)'''Video Card'''
(:cell style="padding: 3px 5px;" :)'''Video RAM'''
(:cell style="padding: 3px 5px;" :)'''Driver'''
(:cell style="padding: 3px 5px;" :)'''BLPF'''
(:ifend:)
(:if [ exists {=$FullName} && auth read {=$FullName} ]:)
(:cellnr style="padding: 0px 6px; font-size: x-small;"
:)[[{=$FullName}|{{=$FullName}$:hostname}]]
(:cell style="padding: 0px 6px; font-size: x-small;" :){{=$FullName}$:os}
(:cell style="padding: 0px 6px; font-size: x-small;"
:){{=$FullName}$:kernel}
(:cell style="padding: 0px 6px; font-size: x-small;" :){{=$FullName}$:bits}
(:cell style="padding: 0px 6px; font-size: x-small;"
:){{=$FullName}$:processors}
(:cell style="padding: 0px 6px; font-size: x-small;"
:){{=$FullName}$:cpu_speed}
(:cell style="padding: 0px 6px; font-size: x-small;"
:){{=$FullName}$:cpu_model}
(:cell style="padding: 0px 6px; font-size: x-small;" :){{=$FullName}$:RAM}
(:cell style="padding: 0px 6px; font-size: x-small;"
:){{=$FullName}$:video_card}
(:cell style="padding: 0px 6px; font-size: x-small;"
:){{=$FullName}$:video_card_mem}
(:cell style="padding: 0px 6px; font-size: x-small;"
:){{=$FullName}$:video_card_driver}
(:cell style="padding: 0px 6px; font-size: x-small;" :){{=$FullName}$:blpf}
(:ifend:)
(:if equal {>$Group}:)
(:cellnr colspan=12 text-align=right style="padding: 8px 12px 0 0;":)Last
Updated {=$LastModified}
(:tableend:)
(:ifend:)
[[#blpflistFGend]]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20120105/20043051/attachment.html>


More information about the pmwiki-users mailing list