Before I start playing mix-and-match with kernels, I would prefer some
feedback on mod_perl and the script's code.

It doesn't sleep in the main loop, but it should block on
my @ready = $select->can_read(1);
and not block on
if ( $sock->read(my $data, POSIX::BUFSIZ*10) ){

since the socket is set with Blocking => 0.

A JPEG (in a 25fps stream) arrives every 40,000 microseconds.

Christopher


On Mon, Jul 25, 2011 at 6:43 PM, Fred Moyer <f...@redhotpenguin.com> wrote:
> On Mon, Jul 25, 2011 at 4:02 PM, Christopher Stanton
> <christopher.stan...@codaxus.com> wrote:
>> Neither install is running within VMWare.
>
> Might be worthwhile trying a different rate though, or going tickless.
>  Perl 5.8.8 isn't that much (if at all) slower than 5.12.  Looks like
> the FC14 kernel is tickless:
>
> http://docs.fedoraproject.org/en-US/Fedora/14/pdf/Power_Management_Guide/Fedora-14-Power_Management_Guide-en-US.pdf
>
>
>> On Mon, Jul 25, 2011 at 5:55 PM, Fred Moyer <f...@redhotpenguin.com> wrote:
>>> This may not be related, but when I was working with Centos 5 in a
>>> Vmware environment, I ran into an issue of high cpu since the default
>>> clock rate with Linux 2.6 is 1000Hz.  I changed to a 100Hz clock rate
>>> and got much lower cpu usage.
>>>
>>> I'm not sure if that is your issue, perhaps FC14 was using less than a
>>> 1000Hz clock rate.  You might try a tickless kernel, or dig further
>>> into what clock rate your kernel is using.
>>>
>>> I don't know where the authoritative source for this information is,
>>> but here's what I found with a search:
>>>
>>> http://yate.null.ro/pmwiki/index.php?n=Main.YateAndVMWare
>>>
>>> On Mon, Jul 25, 2011 at 3:43 PM, Christopher Stanton
>>> <christopher.stan...@codaxus.com> wrote:
>>>> I have a MJPEG streaming system which uses mod_perl in the web
>>>> interface to supply the final stream to the client.
>>>>
>>>> I am seeing high cpu utilization under RHEL5.6 which I don't see on
>>>> FC14. We are talking sub 10% on FC14 vs 80% on EL5. This is on
>>>> different hardware, but not that different. And on EL5 the httpd
>>>> session is way higher (cpu wise) than the supplying proxy. On FC14 on
>>>> my test rig I see (for a 25fps stream) 15-18% CPU for the proxy which
>>>> can handle multiplexing etc and 5.5-8% for the mod_perl httpd session.
>>>>
>>>> I think this is an issue with that platform, but I haven't seen
>>>> any/many reports. Does anyone have a sec to look at the source? I
>>>> don't think I have implemented this is a horrible inefficient way but
>>>> who knows. It is true, I could have byte markers and then know the
>>>> size of the JPEG I am expecting rather than just splitting on the
>>>> boundary field, but in tests (and production) it seemed to work ok.
>>>>
>>>> http://svn.codaxus.com/flexTPS/2.x.x/trunk/portal/2.4.x/site/perl/nph-mjpeg_stream.pl
>>>>
>>>> Any comments or critiques would be appreciated,
>>>> Christopher
>>>>
>>>> ----------------------------------------------------------------------
>>>>
>>>> On FC14:
>>>> Requires: httpd >= 2.2.17-1
>>>> Requires: mod_perl >= 2.0.4-11
>>>> Requires: mod_ssl >= 1:2.2.17-1
>>>> Requires: perl >= 5.12.3-141
>>>> Requires: perl-CGI >= 3.51-1
>>>> Requires: perl-Digest-SHA1 >= 2.12-4
>>>> Requires: perl-XML-Filter-BufferText >= 1.01-9
>>>> Requires: perl-XML-Simple >= 2.18-7
>>>> Requires: perl-XML-Validator-Schema >= 1.10-5
>>>> Requires: perl-Tree-DAG_Node >= 1.06-8
>>>> Requires: perl-LDAP >= 0.40-2
>>>> Requires: perl-Crypt-SSLeay >= 0.58-1
>>>> Requires: ffmpeg >= 0.6-4
>>>>
>>>> On EL5:
>>>> Requires: httpd >= 2.2.3-45
>>>> Requires: mod_perl >= 2.0.4-6
>>>> Requires: mod_ssl >= 2.2.3-45
>>>> Requires: perl >= 5.8.8-32
>>>> Requires: perl-Digest-SHA1 >= 2.11-1
>>>> Requires: perl-XML-Filter-BufferText >= 1.01
>>>> Requires: perl-XML-Simple >= 2.14-4
>>>> Requires: perl-XML-Validator-Schema >= 1.10-1
>>>> Requires: perl-Tree-DAG_Node >= 1.06
>>>> Requires: perl-LDAP >= 0.33-3
>>>> Requires: perl-Crypt-SSLeay >= 0.51-11
>>>> Requires: ffmpeg >= 0.6.1-1
>>>>
>>>
>>
>

Reply via email to