Forums / Setup & design / Apache problems (response + memory usage)

Apache problems (response + memory usage)

Author Message

Atle Pedersen

Monday 06 August 2007 7:25:55 am

Hi everbody,

just wondering if anyone has encountered similar problems, and/or has an idea what might be wrong with a server showing very poor performance.

Symptoms are:
Top shows a lot more Virtual memory than on some other installations (roughly twice as much) and with very little shared memory, causing the server to be able to handle to few processes before it starts swapping.

When MaxClients are reached, the server uses a very long time to handle connection timeouts. This also happens when MaxClients are set low enough to avoid swapping.

Do anyone recognise these symptoms, or have suggestions to tests worth running?

The installation is a Xen virtual server running Debian Etch on dual AMD64.
Apache 1.3.34-4.1
Version: 6:4.4.7-0.dotdeb.1
MySQL 5.0.32-7etch1

Lazaro Ferreira

Monday 06 August 2007 8:13:00 am

Hi,

Are the Apache process taking a lot of memory running ezpublish websites ?

Lazaro
http://www.mzbusiness.com

Atle Pedersen

Tuesday 07 August 2007 7:21:33 am

Earlier, tests showed that using a php accelerator only gave a very slight performance boost. So we had no accelerator running. But we wanted to test with an accelerator, and this actually helped a great deal. The server became much more responsive and can now handle much more load than earlier.

The strange thing though, is that each process now uses even more virtual memory. Around 200 MB per process. And shared memory is only around 35MB per process. To me these numbers make no sense any more. It seems that memory allocated for each process is much higher than is actually used. (70 clients on 2GB and still free mem)

The PHP accelerator helped a great bit. But I still don't understand what's going on.

Lazaro Ferreira

Tuesday 07 August 2007 12:13:55 pm

Hi,

trying again...

we have had this kind of problem in the past, they were related to ezpublish or php bugs

which ezpublish version are you using ?

Lazaro
http://www.mzbusiness.com

Kim Johansen

Tuesday 07 August 2007 1:30:30 pm

Hi Atle,

It's a lots of things that can cause the problem you are experiences. You should go through your configuration for Apache/PHP, and make sure your not giving away more memory then you got. You can use pmap to see what Apache use all the memory to.

You should also monitor system resources over time by some tools like Munin. I will make it much easier to see the consequence's when doing small changes on your server, and easier to see whats causing the problem.

Also make sure your running your vm with paravirtualization, and not full virtualization.

Try out Free eZ Publish 4.0 Trial Hosting for 14 days:
http://webdealhosting.com/ez-publish-trial-hosting

High quality eZ Publish Hosting since 2001!

Bruce Morrison

Tuesday 07 August 2007 4:29:42 pm

Hi all

Here is the output from top of a relatively busy system we manage. Running eZ 3.8.8, apache 2, php 4.4

The figures seem to differ considerably from what has been described.

 PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
17051 apache    15   0 63872  28m  17m S   22  0.9   0:19.86 httpd
17598 apache    15   0 64028  27m  16m S   13  0.9   0:11.69 httpd
18173 apache    16   0 65568  29m  17m R    5  1.0   0:10.45 httpd
19052 apache    16   0 63976  24m  13m S    2  0.8   0:02.83 httpd
19016 apache    15   0 63980  24m  13m S    1  0.8   0:09.90 httpd
17968 apache    15   0 64136  29m  18m S    0  1.0   0:08.28 httpd
18177 apache    15   0 63068  24m  14m S    0  0.8   0:09.56 httpd
18698 apache    15   0 62480  23m  14m S    0  0.8   0:04.13 httpd

Perhaps you can post some raw figures / config ? What is your php.ini memory_limit set at?

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

eZ debug

Timing: Jan 18 2025 14:53:46
Script start
Timing: Jan 18 2025 14:53:46
Module start 'content'
Timing: Jan 18 2025 14:53:47
Module end 'content'
Timing: Jan 18 2025 14:53:47
Script end

Main resources:

Total runtime1.0152 sec
Peak memory usage4,096.0000 KB
Database Queries207

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0066 587.8281180.8281
Module start 'content' 0.00670.8213 768.6563653.0469
Module end 'content' 0.82790.1872 1,421.7031341.0547
Script end 1.0152  1,762.7578 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00420.4155210.0002
Check MTime0.00150.1513210.0001
Mysql Total
Database connection0.00070.066510.0007
Mysqli_queries0.927991.40372070.0045
Looping result0.00190.18302050.0000
Template Total0.975496.120.4877
Template load0.00260.251220.0013
Template processing0.972895.827020.4864
Template load and register function0.00010.008710.0001
states
state_id_array0.00090.090010.0009
state_identifier_array0.00120.117120.0006
Override
Cache load0.00210.2081410.0001
Sytem overhead
Fetch class attribute can translate value0.00210.205550.0004
Fetch class attribute name0.00100.097880.0001
XML
Image XML parsing0.00380.375450.0008
class_abstraction
Instantiating content class attribute0.00000.001690.0000
General
dbfile0.01651.6266330.0005
String conversion0.00000.000730.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
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
10content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 25
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs