FAQ
Hi list!



I've got a performance issue with embperl since a long time.

My main webpage is a status page with 5 sections which are 5 different
epl files.

My first approach was to use an .shtml file and include all 5 pages.

The page takes about 3 seconds to load which is definitly too long!!!

So I changed it to an embperl file and used includes which doesn't help
either.

I don't think that the database (oracle 9ir2) queries cause the problem
because the select statements just query views (which contain 0-10 rows
approx.).



How can I track down which part of code is causing this and/or benchmark
parts of my code???



Any suggestions???



Greetings Alex





#############################

status.epl:

#############################



[!

use strict;

use nactools;

Execute ({ inputfile => 'nacadminlib.epl', import => 1 });

!]



<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"

"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >



<meta http-equiv="Refresh" content="300">



[- page_header() -]



<body>

<table>

<tr><td class="title">Network Status (auto-refresh every 5
minutes)</td></tr>

</table>

<br>

[-

Execute('down-devices.epl');

Execute('down-interfaces.epl');

Execute('new-interfaces.epl');

Execute('mod-interfaces.epl');

Execute('old-interfaces.epl');

-]

</body>

</html>

#############################


*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
Hinweis: Dieses E-mail kann vertrauliche und geschützte Informationen enthalten.
Sollten Sie nicht der beabsichtigte Empfänger sein, verständigen Sie bitte den Absender und löschen Sie dieses E-mail dann sofort.

Notice: This e-mail contains information that is confidential and may be privileged.
If you are not the intended recipient, please notify the sender and then delete this e-mail immediately.
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*

Search Discussions

  • Gerald Richter at Jun 15, 2004 at 10:23 am
    Briefvorlage> I don't think that the database (oracle 9ir2) queries cause the
    problem because the select statements just query views (which contain
    0-10 rows approx.).
    Do you use Apache::DBI ?

    Oracle need very long to make the inital connect and without connection caching you will get very slow responses

    Gerald

    How can I track down which part of code is causing this and/or
    benchmark parts of my code???

    Any suggestions???

    Greetings Alex


    #############################
    status.epl:
    #############################

    [!
    use strict;
    use nactools;
    Execute ({ inputfile => 'nacadminlib.epl', import => 1 });
    !]

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >

    <meta http-equiv="Refresh" content="300">

    [- page_header() -]

    <body>
    <table>
    <tr><td class="title">Network Status (auto-refresh every 5
    minutes)</td></tr>
    </table>
    <br>
    [-
    Execute('down-devices.epl');
    Execute('down-interfaces.epl');
    Execute('new-interfaces.epl');
    Execute('mod-interfaces.epl');
    Execute('old-interfaces.epl');
    -]
    </body>
    </html>
    #############################

    *"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
    Hinweis: Dieses E-mail kann vertrauliche und geschützte Informationen
    enthalten.
    Sollten Sie nicht der beabsichtigte Empfänger sein, verständigen Sie
    bitte den Absender und löschen Sie dieses E-mail dann sofort.

    Notice: This e-mail contains information that is confidential and may
    be privileged.
    If you are not the intended recipient, please notify the sender and
    then delete this e-mail immediately.
    *"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
    ---------------------------------------------------------------------------
    Gerald Richter ecos electronic communication services gmbh
    IT-Securitylösungen * Webapplikationen mit Apache/Perl/mod_perl/Embperl

    Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
    E-Mail: richter@ecos.de Voice: +49 6133 939-122
    WWW: http://www.ecos.de/ Fax: +49 6133 939-333
    ---------------------------------------------------------------------------
    ECOS BB-5000 Firewall- und IT-Security Appliance: www.bb-5000.info
    ---------------------------------------------------------------------------
  • Hartmaier Alexander at Jun 15, 2004 at 11:33 am
    Re!



    I figured out with Anthony Woods (thanks!!!) 'benchmark' suggestion which epl was causing the trouble:

    [+ localtime +]

    [- Execute('down-devices.epl'); -]

    [+ localtime +]

    [- Execute('down-interfaces.epl'); -]

    [+ localtime +]

    [- Execute('new-interfaces.epl'); -]

    [+ localtime +]

    [- Execute('mod-interfaces.epl'); -]

    [+ localtime +]

    [- Execute('old-interfaces.epl');-]

    [+ localtime +]



    The sql query for down-devices.epl takes about 5.5secs to complete.

    I was only able to lower the time to about 2secs but better than nothing ;-|



    Yes Gerald Apache::DBI is loaded ;-)



    I generate graph per request (interface and device utilitzation) and also want to speed up things there.

    I swapped from GD::Graph (png output) to SVG::TT::Graph::TimeSeries (svg output) with png fallback if the browser doesn't support svg.

    But its even slower than before!!! I don't understand this because png has to be brought into binary form and compressed.

    svg is plain text which should be fast in my opinion...

    How can i benchmark professional unter perl? are there modules for benchmarking and how to use them?



    Alex



    ________________________________

    Von: Gerald Richter
    Gesendet: Dienstag, 15. Juni 2004 12:20
    An: Hartmaier Alexander; embperl@perl.apache.org
    Betreff: Re: performace issues


    I don't think that the database (oracle 9ir2) queries cause the
    problem because the select statements just query views (which contain
    0-10 rows approx.).
    Do you use Apache::DBI ?



    Oracle need very long to make the inital connect and without connection caching you will get very slow responses



    Gerald




    How can I track down which part of code is causing this and/or
    benchmark parts of my code???

    Any suggestions???

    Greetings Alex


    #############################
    status.epl:
    #############################

    [!
    use strict;
    use nactools;
    Execute ({ inputfile => 'nacadminlib.epl', import => 1 });
    !]

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >

    <meta http-equiv="Refresh" content="300">

    [- page_header() -]

    <body>
    <table>
    <tr><td class="title">Network Status (auto-refresh every 5
    minutes)</td></tr>
    </table>
    <br>
    [-
    Execute('down-devices.epl');
    Execute('down-interfaces.epl');
    Execute('new-interfaces.epl');
    Execute('mod-interfaces.epl');
    Execute('old-interfaces.epl');
    -]
    </body>
    </html>
    #############################

    *"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
    Hinweis: Dieses E-mail kann vertrauliche und geschützte Informationen
    enthalten.
    Sollten Sie nicht der beabsichtigte Empfänger sein, verständigen Sie
    bitte den Absender und löschen Sie dieses E-mail dann sofort.

    Notice: This e-mail contains information that is confidential and may
    be privileged.
    If you are not the intended recipient, please notify the sender and
    then delete this e-mail immediately.
    *"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
    ---------------------------------------------------------------------------
    Gerald Richter ecos electronic communication services gmbh
    IT-Securitylösungen * Webapplikationen mit Apache/Perl/mod_perl/Embperl

    Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
    E-Mail: richter@ecos.de Voice: +49 6133 939-122
    WWW: http://www.ecos.de/ Fax: +49 6133 939-333
    ---------------------------------------------------------------------------
    ECOS BB-5000 Firewall- und IT-Security Appliance: www.bb-5000.info
    ---------------------------------------------------------------------------


    *"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
    Hinweis: Dieses E-mail kann vertrauliche und geschützte Informationen enthalten.
    Sollten Sie nicht der beabsichtigte Empfänger sein, verständigen Sie bitte den Absender und löschen Sie dieses E-mail dann sofort.

    Notice: This e-mail contains information that is confidential and may be privileged.
    If you are not the intended recipient, please notify the sender and then delete this e-mail immediately.
    *"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
  • Gerald Richter at Jun 24, 2004 at 5:53 am
    Briefvorlage>
    I generate graph per request (interface and device utilitzation) and
    also want to speed up things there.
    I swapped from GD::Graph (png output) to SVG::TT::Graph::TimeSeries
    (svg output) with png fallback if the browser doesn't support svg.
    But its even slower than before!!! I don't understand this because
    png has to be brought into binary form and compressed.
    svg is plain text which should be fast in my opinion...
    It depends on the implementation....
    How can i benchmark professional unter perl? are there modules for
    benchmarking and how to use them?
    There is a module called Benchmark and there is a module called Devel::DProf

    Both does not work under Embperl, but you should be able to take your code that generates the Images and your SQL queries and benchmark them outside the web server (which is in most cases much easierer)

    Gerald


    Alex




    Von: Gerald Richter
    Gesendet: Dienstag, 15. Juni 2004 12:20
    An: Hartmaier Alexander; embperl@perl.apache.org
    Betreff: Re: performace issues
    I don't think that the database (oracle 9ir2) queries cause the
    problem because the select statements just query views (which contain
    0-10 rows approx.).
    Do you use Apache::DBI ?

    Oracle need very long to make the inital connect and without
    connection caching you will get very slow responses

    Gerald

    How can I track down which part of code is causing this and/or
    benchmark parts of my code???

    Any suggestions???

    Greetings Alex


    #############################
    status.epl:
    #############################

    [!
    use strict;
    use nactools;
    Execute ({ inputfile => 'nacadminlib.epl', import => 1 });
    !]

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >

    <meta http-equiv="Refresh" content="300">

    [- page_header() -]

    <body>
    <table>
    <tr><td class="title">Network Status (auto-refresh every 5
    minutes)</td></tr>
    </table>
    <br>
    [-
    Execute('down-devices.epl');
    Execute('down-interfaces.epl');
    Execute('new-interfaces.epl');
    Execute('mod-interfaces.epl');
    Execute('old-interfaces.epl');
    -]
    </body>
    </html>
    #############################

    *"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
    Hinweis: Dieses E-mail kann vertrauliche und geschützte Informationen
    enthalten.
    Sollten Sie nicht der beabsichtigte Empfänger sein, verständigen Sie
    bitte den Absender und löschen Sie dieses E-mail dann sofort.

    Notice: This e-mail contains information that is confidential and may
    be privileged.
    If you are not the intended recipient, please notify the sender and
    then delete this e-mail immediately.
    *"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
    ---------------------------------------------------------------------------
    Gerald Richter ecos electronic communication services gmbh
    IT-Securitylösungen * Webapplikationen mit
    Apache/Perl/mod_perl/Embperl

    Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
    E-Mail: richter@ecos.de Voice: +49 6133 939-122
    WWW: http://www.ecos.de/ Fax: +49 6133 939-333
    ---------------------------------------------------------------------------
    ECOS BB-5000 Firewall- und IT-Security Appliance: www.bb-5000.info
    ---------------------------------------------------------------------------

    *"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
    Hinweis: Dieses E-mail kann vertrauliche und geschützte Informationen
    enthalten.
    Sollten Sie nicht der beabsichtigte Empfänger sein, verständigen Sie
    bitte den Absender und löschen Sie dieses E-mail dann sofort.

    Notice: This e-mail contains information that is confidential and may
    be privileged.
    If you are not the intended recipient, please notify the sender and
    then delete this e-mail immediately.
    *"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
    ---------------------------------------------------------------------------
    Gerald Richter ecos electronic communication services gmbh
    IT-Securitylösungen * Webapplikationen mit Apache/Perl/mod_perl/Embperl

    Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
    E-Mail: richter@ecos.de Voice: +49 6133 939-122
    WWW: http://www.ecos.de/ Fax: +49 6133 939-333
    ---------------------------------------------------------------------------
    ECOS BB-5000 Firewall- und IT-Security Appliance: www.bb-5000.info
    ---------------------------------------------------------------------------

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupembperl @
categoriesmodperl, perl
postedJun 15, '04 at 7:38a
activeJun 24, '04 at 5:53a
posts4
users2
websiteperl.apache.org

People

Translate

site design / logo © 2022 Grokbase