How to make all available CPU resource to Perl/MySQL in Win XP?

Discussion in 'Perl Misc' started by evillen@gmail.com, Oct 9, 2008.

  1. Guest

    Hi

    Sorry that this isn't really a 'Perl' problem, although there may be a
    Perl solution...

    I am developing a Perl & MySQL application - the problem I have is
    that the program takes a while to run and yet when I look at the CPU
    utilisation (with SysInternals Process Explorer) I see that the
    programs Perl.exe & mysqld-nt.exe are barely using 2% of CPU each.

    I have used the SysInternals Process Explorer's "Set Priority" feature
    & set both .exe's to Realtime24 but this had negligible effect.

    How can I force the .exe's to make better use of the CPU?

    Thanks for any helpful suggestions

    NJH
    , Oct 9, 2008
    #1
    1. Advertising

  2. "" <> writes:

    > I have used the SysInternals Process Explorer's "Set Priority" feature
    > & set both .exe's to Realtime24 but this had negligible effect.
    >
    > How can I force the .exe's to make better use of the CPU?


    You want a different algorithm so that you're not waiting on network IO
    / disc IO / other system calls / file locks / database locks.



    --
    Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/
    Joost Diepenmaat, Oct 9, 2008
    #2
    1. Advertising

  3. Guest

    On 9 Oct, 09:53, Joost Diepenmaat <> wrote:
    > "" <> writes:
    > > I have used the SysInternals Process Explorer's "Set Priority" feature
    > > & set both .exe's to Realtime24 but this had negligible effect.

    >
    > > How can I force the .exe's to make better use of the CPU?

    >
    > You want a different algorithm so that you're not waiting on network IO
    > / disc IO / other system calls / file locks / database locks.
    >
    > --
    > Joost Diepenmaat | blog:http://joost.zeekat.nl/| work:http://zeekat.nl/


    Can you recommend some way of detecting these 'gating processes' or
    'locks'?

    There is no Network IO & minimal Disk IO required by my program &
    there shouldn't be any files locked as it's all single user & local
    resources.

    When I look at Process Explorer I can't see that any other process
    hogging the CPU/RAM etc.

    Thanks
    , Oct 9, 2008
    #3
  4. Guest

    On 9 Oct, 11:03, bugbear <bugbear@trim_papermule.co.uk_trim> wrote:
    > wrote:
    > > On 9 Oct, 09:53, Joost Diepenmaat <> wrote:
    > >> "" <> writes:
    > >>> I have used the SysInternals Process Explorer's "Set Priority" feature
    > >>> & set both .exe's to Realtime24 but this had negligible effect.
    > >>> How can I force the .exe's to make better use of the CPU?
    > >> You want a different algorithm so that you're not waiting on network IO
    > >> / disc IO / other system calls / file locks / database locks.

    >
    > >> --
    > >> Joost Diepenmaat | blog:http://joost.zeekat.nl/|work:http://zeekat.nl/

    >
    > > Can you recommend some way of detecting these 'gating processes' or
    > > 'locks'?

    >
    > > There is no Network IO & minimal Disk IO required by my program &
    > > there shouldn't be any files locked as it's all single user & local
    > > resources.

    >
    > > When I look at Process Explorer I can't see that any other process
    > > hogging the CPU/RAM etc.

    >
    > Interesting - I wonder if there is a LOT of overhead
    > in the communication BETWEEN your two processes?
    >
    >    BugBear


    Hi Bugbear - do you have any suggestions about how I could determine/
    measure the overhead required between Perl & MySQL?
    , Oct 9, 2008
    #4
  5. Guest

    "" <> wrote:
    > >
    > > Interesting - I wonder if there is a LOT of overhead
    > > in the communication BETWEEN your two processes?
    > >

    >
    > Hi Bugbear - do you have any suggestions about how I could determine/
    > measure the overhead required between Perl & MySQL?


    $dbh->ping() foreach 1..1e5;

    I can do about 5000 pings per second.

    Xho

    --
    -------------------- http://NewsReader.Com/ --------------------
    The costs of publication of this article were defrayed in part by the
    payment of page charges. This article must therefore be hereby marked
    advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
    this fact.
    , Oct 9, 2008
    #5
  6. On 2008-10-09 09:49, <> wrote:
    > On 9 Oct, 09:53, Joost Diepenmaat <> wrote:
    >> "" <> writes:
    >> > I have used the SysInternals Process Explorer's "Set Priority" feature
    >> > & set both .exe's to Realtime24 but this had negligible effect.

    >>
    >> > How can I force the .exe's to make better use of the CPU?

    >>
    >> You want a different algorithm so that you're not waiting on network IO
    >> / disc IO / other system calls / file locks / database locks.

    >
    > Can you recommend some way of detecting these 'gating processes'


    What are 'gating processes'?

    > or 'locks'?


    See chapter 7 of the MySQL manual.


    > There is no Network IO & minimal Disk IO required by my program &


    How did you determine that there is "minimal disk I/O"? Disk I/O is
    frequently the bottleneck of database applications. How much time does
    Mysql spend in disk I/O?

    hp
    Peter J. Holzer, Oct 11, 2008
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. _mario lat
    Replies:
    3
    Views:
    4,078
    Johnny Hansen
    Oct 13, 2004
  2. pavunkumar

    How , system cpu and user cpu times calculates

    pavunkumar, Feb 27, 2009, in forum: C Programming
    Replies:
    1
    Views:
    340
  3. Krist
    Replies:
    6
    Views:
    725
    Arne Vajhøj
    May 7, 2010
  4. Finding CPU stats on Win?

    , Apr 15, 2005, in forum: Perl Misc
    Replies:
    1
    Views:
    72
    guice666
    Apr 15, 2005
  5. perl.exe consuming all cpu

    , Mar 18, 2006, in forum: Perl Misc
    Replies:
    2
    Views:
    126
Loading...

Share This Page