Let me state upfront that I have no experience whatsoever with Sybase::BCP (or Sybase for that matter).

That said, if you are sure that the disk writes happen when you return from the sub (i.e. after your warning message), than I suspect that they are due to the destruction of one of your lexically scoped variables. $count is an unlikely candidate, so that leaves $bcp. Perhaps the destructor of Sybase:BCP is doing the spurious disk writes - it might be committing your changes. Is there no specific method to commit your changes to the DB? Then again, calling such a method would only move the disk writes a bit earlier in time, so that would not help much. BTW, can the amount of data you are entering into the DB justify the amount of disk activity you observe?

Not much help, I'm afraid, but perhaps this might point you in the right direction (in a vague, fuzzy kind of way :) ). Have a look at the Sybase::BCP destructor.

CU
Robartes-

Update: You might of course simply be experiencing a swapstorm, as fglock suggests, in which case you are probably out of luck.


In reply to Re: Sybase::BCP & iowait by robartes
in thread Sybase::BCP & iowait by Tanalis

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.