Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^5: Script exponentially slower as number of files to process increases

by xnous (Sexton)
on Jan 28, 2023 at 15:47 UTC ( [id://11149984] : note . print w/replies, xml ) Need Help??


in reply to Re^4: Script exponentially slower as number of files to process increases
in thread Script exponentially slower as number of files to process increases

I got my hands on a bare metal EPYC 16/32 server and fired up the scripts on it. Its sweet spot for kikuchiyo's script was between 768 and 864 forks, running for 3.2 seconds on 60K files. Above that it steadily worsened. Your mceiter2.pl script took around 7.3 seconds for every fork count between 32-128, dropping slowly afterwards. So, the CPU architecture indeed plays a major role in how (and how many) threads are handled.

Oh, by the way, the initial MCE script somehow OOM'ed my 32GB laptop, killing Xorg in the process, but I was cocky enough to have kept a 300-tab firefox session open during testing...

EDIT: After the $subdir overflow bug discovery in kikuchiyo's script, both his and marioroy's scripts perform roughly the same. Apologies are in order for not double-checking the results before posting triumphant benchmarks with 2048 threads on a 4-core machine...

  • Comment on Re^5: Script exponentially slower as number of files to process increases