What does "dynamic variable drops with non-empty dirty list" mean in dtrace?

1.6k Views Asked by At

I am tracing a process on OSX 10.13 using dtruss trying to understand why it freezes up while doing a socket connect. However when it reaches the connect the tracer freezes and then displays 783 dynamic variable drops with non-empty dirty list on the screen. So it's not much help in understanding why the process is freezing!

What does "dynamic variable drops with non-empty dirty list" mean? and how might i get insight into why my process is freezing up using dtruss/dtrace?

I'm on osx 10.13

1

There are 1 best solutions below

0
On

Did you try the -b bufsize option mentioned in the comments?

In a custom DTrace script (not the dtruss wrapper), I was able to solve a similar problem by tweaking the 'cleanrate' and 'dynvarsize' options:

#pragma D option cleanrate=50hz
/*
    "dirty" variable drops per <my use case>
    default -> ~20k
    10 Hz -> ~15k
    20 Hz -> ~10k
    30 Hz -> ~2k
    40 Hz -> ~1k
    50 Hz (max) -> < 200
*/

#pragma D option dynvarsize=400000     
/*
     10,000 @ 50 Hz -> ~25k+
    100,000 @ 50 Hz -> ~20k  
    200,000 @ 50 Hz -> ~3k
    300,000 @ 50 Hz -> ~1k
    400,000 @ 50 Hz -> 0
    400,000 @ 25 Hz -> ~2k
    500,000 @ 25 Hz -> ~1k
*/

I figured this out by reading http://blogs.sun.com/roller/resources/bmc/dtrace_tips.pdf

https://community.oracle.com/thread/1921528 refers to the same problem and document.

Looking at /usr/bin/dtruss on macOS,

          -b bufsize      # dynamic variable buf size

corresponds to dynvarsize.