On Sun, Feb 20, 2022 at 03:44:37PM -0300, Alceu Rodrigues de Freitas Junior 
wrote:

> 
> Hello there,
> 
> I've being doing Perl development on OpenBSD for a while now, and one thing
> that I usually note is that is takes a noticeable difference of time to
> execute Perl modules instalation on Linux and OpenBSD (the latter is
> slower). For comparison, I have no experience on doing the same on FreeBSD,
> but I do know that IPC on Microsoft Windows sucks much more (as expected).
> 
> I've being trying to figure out what is going on, without much success.
> 
> As you might know, the cpan client and Perl modules make heavy user of the
> make program and IPC pipes for communication.
> 
> For many times when running a setup, usually the step where make is executed
> with a fork() and it's STDOUT is read by the CPAN client, I can see that the
> process just "hangs" there: low CPU usage occurs during that, but the
> process doesn't advance for some reason that I wasn't able to identify so
> far (and maybe that's on me due the lack of knowledge on OpenBSD tools for
> that).
> 
> I did some research on Google and on this mailing list archive, without
> finding anything that would help. But I did find some somehow related
> messages about:
> 
> https://marc.info/?l=openbsd-misc&m=115607682301736&w=2
> https://marc.info/?l=openbsd-misc&m=134263510531642&w=2
> https://marc.info/?l=openbsd-misc&m=146995681921920&w=2
> 
> Is there any configuration/tools that I could use to identify what is going
> on and improve the performance? I've being seeing this behavior since
> OpenBSD 5.x, when I started running CPAN Smokers.
> 
> As another example of how this is usually done with Perl, here is a link for
> a very common module that is used for tasks like that inside a CPAN Smoker:
> 
> https://metacpan.org/pod/Capture::Tiny
> 
> Thanks in advance,
> Alceu

A good tool to investigate  these kind of issues is ktrace.

Typically you'd run

        $ ktrace -i <command>

The -i options instructs ktrace to also captures system calls in child
processes of command.

and then

then 
        $ kdump -R

to look at what is captured in ktrace.out. There are many options to
influence what is captured and what is displayed. Look into the man
pages for details.

        -Otto

Reply via email to