Open GoogleCodeExporter opened 8 years ago
I'm seeing the same CPU usage issue.
XMPPHP 0.1 RC1 (rev 70)
CentOS 5.2
PHP 5.2.6
Openfire 3.6.3
Original comment by aiden...@yahoo.com
on 2 Apr 2009 at 4:18
I'm nearly identical as aiden... seeing the same issue with RC1 and openFire
3.6.3
Original comment by mrk...@gmail.com
on 3 Apr 2009 at 2:50
It's fixed in SVN. I suppose it's time for a new release.
Original comment by nathanfr...@gmail.com
on 3 Apr 2009 at 8:22
Hi,
I saw one "5" (microseconds?) wait, if I'm not wrong... IMO it's not enough
(70%-80% CPU load here).
Something like (500) seems to reduce it to 10%-12% here.(better but not sure if
one idle daemon should use
more that 1% at all).
In any case, couldn't that be configured in some place instead making
processUntil() to use that configuration?
Just IMHO, ciao :-)
Original comment by stro...@stronk7.com
on 24 Apr 2009 at 11:38
Great news Fritzy. Any ETA on the new RC?
Original comment by mrk...@gmail.com
on 4 May 2009 at 8:53
I tried grabbing the latest from svn and it still had the same CPU usage
problem. I
found that by adding a usleep to __process() for a mini timeout, I was able to
go
from 99% CPU to 0.2% CPU which is a heck of a lot better.
private function __process($maximum=0) {
$remaining = $maximum;
do {
usleep(100000);
Original comment by paulside...@gmail.com
on 5 May 2009 at 12:53
Nice PaulSK. Fritz, any official keeper comments?
Original comment by mrk...@gmail.com
on 8 May 2009 at 8:57
I have found solution for me.
file XMLStream.php
new lines
} else if ($maximum == 0) {
$secs = 0;
$usecs = 200000; // sleep for 200 miliseconds, if no data
} else {
and in the my code
$xmpp->processUntil(array('message'), 0.1);
Original comment by alexxz2...@gmail.com
on 17 Aug 2009 at 5:08
Switching from 0.1rc2-r77 to svn dropped from 44% to 28% to 42%. But my bot
still
uses more processor than mythbackend while active(~10%).
The php.net/stream_select page suggests 200000 microseconds to lower cpu usage.
Patch attached for what I did. I'm no longer at the top of top.
Patch attached. It's not perfect just my hack.
Original comment by toddejoh...@gmail.com
on 24 Sep 2009 at 11:00
Attachments:
This issue is fixed in http://github.com/cweiske/xmpphp
Original comment by cwei...@cweiske.de
on 25 Feb 2010 at 6:27
issue #68 duplicates this one
Original comment by cwei...@cweiske.de
on 25 Feb 2010 at 6:28
Original issue reported on code.google.com by
bradwood...@gmail.com
on 1 Apr 2009 at 8:28