Now, I've one loader putting data to a Thread::Queue and 8 threads reading from that Thread::Queue and writing to a single output file.
#-------------------------- # Insert Into File #-------------------------- sub insert_into_file{ my $fh = shift; my $record = shift; lock($x); $fh->print("$record\n"); }
The problem isn't with IO, see below the number of threads wanting for IO, its irrelevant...
$ iostat -xndz 1
    r/s    w/s   kr/s   kw/s wait actv wsvc_t asvc_t  %w  %b device
    1.0   21.0    8.0  958.5  0.1  0.7    4.0   33.2   9   9 md/d10
    0.0   21.0    0.0  958.5  0.0  0.6    0.0   30.6   0   7 md/d11
    1.0   21.0    8.0  958.5  0.0  0.5    0.0   24.5   0   8 md/d12
    1.0   26.0    8.0  959.5  0.0  0.7    0.0   24.6   0  10 c0t1d0
    0.0   26.0    0.0  959.5  0.0  0.8    0.0   30.3   0  10 c0t0d0

Wait: number of threads queued for I/O
Actv: number of threads performing I/O
wsvc_t: Average time spend waiting on queue
asvc_t: Average time performing I/O
%w: Only useful if one thread is running on the entire machine – time spent 
waiting for I/O
%b: Device utilization – only useful if device can do just 1 I/O at a time (invalid 
for arrays etc...)
Output of truss
syscall               seconds   calls  errors
read                     .560    7092
write                    .201    2363
lwp_park                3.621  132604
lwp_unpark              2.656  125751
yield                    .031    1148
                     --------  ------   ----
sys totals:             7.070  268958      0
usr time:              80.730
elapsed:               39.650

In reply to Re: Sun Solaris (SPARC processor) + Threads + performance/optimization by gulden
in thread Sun Solaris (SPARC processor) + Threads + performance/optimization by gulden

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.