[horde] apache cpu usage?

Michael J Rubinsky mrubinsk at horde.org
Thu Feb 18 16:16:29 UTC 2016


Quoting avp at rokeyetee.com:

> Quoting Michael J Rubinsky <mrubinsk at horde.org>:
>
>> Quoting avp at rokeyetee.com:
>>
>>> I'm running Horde on a AWS t2.medium instance - HORDE GROUPWARE WEBMAIL
>>> EDITION 5.2.6
>>>
>>> I've got some funny apache behaviour that just doesn't seem right to
>>> me...
>>>
>>> When I run "apache2ctl status", 99% of the time all threads are in the
>>> "W"
>>> (Sending Reply) state:
>>>
>>>    Current Time: Thursday, 18-Feb-2016 10:02:53 NST
>>>    Restart Time: Thursday, 18-Feb-2016 09:49:25 NST
>>>    Parent Server Config. Generation: 1
>>>    Parent Server MPM Generation: 0
>>>    Server uptime: 13 minutes 27 seconds
>>>    Server load: 0.77 0.77 0.85
>>>    Total accesses: 1382 - Total Traffic: 7.7 MB
>>>    CPU Usage: u230.64 s11.47 cu0 cs0 - 30% CPU load
>>>    1.71 requests/sec - 9.8 kB/second - 5.7 kB/request
>>>    20 requests currently being processed, 8 idle workers
>>>  
>>> _WWWWWW_WWWWW__W_WWWWWW__W.K_...........
>>>
>>> It seems strange to me that "sending reply" would be the bottleneck?
>>>
>>> Also when I run top, I constantly see apache procs jumping to the top
>>> with
>>> up to 50% cpu usage.
>>>
>>> Most all the connections are ActiveSync.
>>
>> When an ActiveSync client is configured for "Push", the connection to
>> the webserver remains open while it runs the PING command. These
>> requests last up to the "hearbeat interval" that is negotiated between
>> the server and client unless there is a change detected, when the PING
>> requests ends and a new SYNC request is issued. It makes complete sense
>> that you would see ActiveSync connections remaining open.
>
> Thanks for the quick reply.
>
> I'm not questioning that the ActiveSync connections remain open - I  
> get that.  I'm questioning that the connections are in the "Sending  
> Reply" state?  And that my CPU usage seems too high to me?  I'm  
> wondering if there is some php being called to generate the reply  
> that is being sent but it is taking abnormally long/excessive cpu?   
> Just sort of guessing here...  How might I track down what is using  
> the cpu or why the connections are in the sending state?

It's probably in sending state because of the way PING connections  
work. The client sends the request, which the server reads and begins  
processing (by essentially just looping over calls that check for  
changes). It does this before sending ANY data back to the client. So,  
it read the request, and has yet to send the response.

As far as the CPU usage is concerned, I guess it depends on what  
requests are being handled. You could check that none of the sync  
clients are in any kind of loop by checking the sync log(s).



> Here are my activesync settings:
>
> $conf['activesync']['ping']['heartbeatmin'] = 60;
> $conf['activesync']['ping']['heartbeatmax'] = 2700;
> $conf['activesync']['ping']['heartbeatdefault'] = 480;
> $conf['activesync']['ping']['deviceping'] = true;
> $conf['activesync']['ping']['waitinterval'] = 10;
>
> I just changed waitinterval from 5 to 10.
>
> Any suggestions on what these should be?
>
> Any other tips/advice to lower CPU usage?  
>
> Thanks again.
>
>>
>>> What are recommended settings for apache when running Horde?
>>>
>>> Any other tips/advice to lower CPU usage?  
>>> Thanks.
>>>
>>>  
>>> --
>>> Horde mailing list
>>> Frequently Asked Questions: http://horde.org/faq/
>>> To unsubscribe, mail: horde-unsubscribe at lists.horde.org
>>
>> --
>> mike
>> The Horde Project
>> http://www.horde.org
>> https://www.facebook.com/hordeprojecthttps://www.twitter.com/hordeproject
>
> -- 
> Horde mailing list
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: horde-unsubscribe at lists.horde.org



-- 
mike
The Horde Project
http://www.horde.org
https://www.facebook.com/hordeproject
https://www.twitter.com/hordeproject
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5751 bytes
Desc: S/MIME Signature
URL: <http://lists.horde.org/archives/horde/attachments/20160218/d6e807a5/attachment-0001.bin>


More information about the horde mailing list