7.8 Speculation Options and Tuning

If a speculative buffer is full when a speculative tracing action
is attempted, no data is stored in the buffer and a drop count is
incremented. In this situation, dtrace
generates a message similar to the following:

dtrace: 38 speculative drops

Speculative drops do not prevent the full speculative buffer from
being copied into the principal buffer when it is committed.
Similarly, speculative drops can occur even if drops were
experienced on a speculative buffer that were ultimately
discarded. Speculative drops can be reduced by increasing the
speculative buffer size, which is tuned by using the
specsize option. The
specsize option can be specified with any size
suffix. The resizing policy of this buffer is dictated by the
bufresize option.

Speculative buffers might be unavailable when
speculation is called. If buffers that have not
yet been committed or discards exist, dtrace
generates a message similar to the following:

dtrace: 1 failed speculation (no speculative buffer available)

You can reduce the likelihood of failed speculations of this
nature by increasing the number of speculative buffers by
specifying the nspec option. The value of
nspec defaults to 1.

Also, speculation can fail if all speculative
buffers are busy. In this case, an error message similar to the
following is displayed:

dtrace: 1 failed speculation (available buffer(s) still busy)

This error message indicates that speculation
was called after commit was called for a
speculative buffer, but before that buffer was actually committed
on all CPUs. You can reduce the likelihood of failed speculations
of this nature by increasing the rate at which CPUs are cleaned by
using the cleanrate option. The value of
cleanrate defaults to 101.