Dear monks,

Here is my scenario: I have hundreds of plain text files, and they are 1,000 GB totally. My stask is very simple, do a sequential reading by <IN> once, and put some variables in Hash (maybe 20,000,000 records). To determine the bottleneck of my task, I perform two little experiments as below:

  1. simply read a file (500mb) sequentially by <IN> takes around 15 secs. After I add one line such as $hash{$_}=1, it takes me around 20 secs. ---> it's reasonable to think the bottle neck is CPU's computing power.
  2. After promoting my PERL's priority to High, the PERL thread's CPU utilization reduces to 90% only ---> maybe it implies that my system's IO is too slow to feed data to my CPU ?

I'm finding an utility/script/method to examine my real bottle neck IO (hardware) or CPU (perl script) ? It seems that the traditional Benchmark helps little. Any advice would be very very appreciated!

by the way, my system's hardware configuration is: Athlon 64 2800 with 2GB RAM. UDMA 133 IDE harddisk. OS Windows 2003.

20050404 Unconsidered by Corion. Was considered by RazorbladeBidet: Retitle: Determining the performance bottleneck on Windows (edit:45 keep:11 del:0)


In reply to How do I measure my bottle ? by cbrain

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.