in reply to Re: Perl threads loss of performance with system call
in thread Perl threads loss of performance with system call

This is what I actually tried to do at the very beginning. However, if you keep an eye on your "top", you will see that at most 2-3 threads are running concurrently at any time, while most of them are inactive. Indeed, the total execution time is longer with "sleep 0.001" (or echo A), than it is with "sleep 1".
  • Comment on Re^2: Perl threads loss of performance with system call

Replies are listed 'Best First'.
Re^3: Perl threads loss of performance with system call
by bliako (Abbot) on Jul 14, 2021 at 12:34 UTC

    i use htop. I did not see what you describe. All cores were active. Still we are talking about very small time intervals. In any event you now have some tools to debug this and confirm any suspicions you may have. For example taskset will report on the current cpu (relocations are common though).

    bw, bliako