I have several Windows machines running the same Perl (This is perl 5, version 24, subversion 2 (v5.24.2) built for MSWin32-x64-multi-thread, Activestate) for many years. Sqlite3 (3.36.0 2021-06-18 18:36:39) with a 4GB indexed database containing one table with about a million rows. On three PCs (Ryzen 3600 with 16GB RAM Win 10 Pro, Ryzen 2700X with 16GB RAM Win 10 Pro, Xeon 5660 with 12 GB RAM Win 7 Pro) I get 100,000 selects in about 10-15 seconds. On the 4th PC (AMD A8-7500 with 16GB RAM Win 7 Pro) it barely crawls. Maybe 100 selects in 10 minutes.

The code is identical all places. The DB is a separate copy on each machine. No errors or obvious clues about why it is sooo slow. Even on an older laptop it gets comparable performance.

I have examined the Windows logs and find nothing amiss. No device manager flags. Crystal Disk reads the system drive (SSD) at about 450MB/sec and the data drive (HD) at about 180MB/sec. procexp and procmon don't show anything obvious. taskmgr shows 25% CPU usage, and 13GB free memory. I have examined all the BIOS params and see none that need adjustment.

I have run out of ideas on how to troubleshoot this issue. Seems clear that the OS is throttling Perl, but I can't pinpoint it.

Thoughts? Ideas? Suggestions? Not critical, not commercial, but surprising given everything else Perl on Windows has been fast. I could move it to Debian, but would like to figure this one out.

Thanks.


In reply to Windows Perl with sqlite3 by miner7777

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.