Bug 200316 - [dtrace] don't have compiler inline vdev_queue_max_async_writes so zfs write throttle tuning works
Summary: [dtrace] don't have compiler inline vdev_queue_max_async_writes so zfs write ...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 10.1-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: Allan Jude
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2015-05-19 03:34 UTC by Lacey Powers
Modified: 2016-01-16 18:46 UTC (History)
3 users (show)

See Also:


Attachments
patch against 10.1-RELEASE to fix the issue. (418 bytes, patch)
2015-05-19 03:34 UTC, Lacey Powers
no flags Details | Diff
q.d script to reproduce the issue (409 bytes, text/x-dsrc)
2015-05-19 03:35 UTC, Lacey Powers
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lacey Powers 2015-05-19 03:34:55 UTC
Created attachment 156921 [details]
patch against 10.1-RELEASE to fix the issue.

On unpatched systems vdev_queue_max_async_writes is inlined and hidden from dtrace. 

This prevents the use of the q.d async write tuning script, as outlined here

http://dtrace.org/blogs/ahl/2014/08/31/openzfs-tuning/

which makes it difficult to properly investigate and tune the ZFS write throttle on FreeBSD 10.1. 

On unpatched systems the script reports:

dtrace: failed to compile script ./q.d: line 6: probe description fbt::vdev_queue_max_async_writes:entry does not match any probes

Once patched, the output looks like this:

     min .--------------------------------. max      | count
     < 0 :  █                             : >= 30    | 174


     min .--------------------------------. max      | count
     < 0 :                                : >= 30    | 0


The attached patch adding __noinline fixes this. 

The problem can be reproduced on unpatched systems with the attached q.d script.

Thank you for your time and assistance in fixing this.
Comment 1 Lacey Powers 2015-05-19 03:35:35 UTC
Created attachment 156922 [details]
q.d script to reproduce the issue
Comment 2 commit-hook freebsd_committer freebsd_triage 2015-08-31 23:10:58 UTC
A commit references this bug:

Author: allanjude
Date: Mon Aug 31 23:10:43 UTC 2015
New revision: 287337
URL: https://svnweb.freebsd.org/changeset/base/287337

Log:
  Apply the noline attribute to vdev_queue_max_async_writes

  This makes it possible to analyze the performance of the new ZFS
  write throttle with dtrace

  PR:		200316
  Submitted by:	Lacey Powers <lacey.leanne@gmail.com>
  Reviewed by:	avg, smh, delphij (no objection)
  Approved by:	bapt (mentor)
  MFC after:	1 month
  Sponsored by:	ScaleEngine Inc.
  Differential Revision:	https://reviews.freebsd.org/D3472

Changes:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c
Comment 3 commit-hook freebsd_committer freebsd_triage 2016-01-16 18:40:31 UTC
A commit references this bug:

Author: allanjude
Date: Sat Jan 16 18:39:55 UTC 2016
New revision: 294188
URL: https://svnweb.freebsd.org/changeset/base/294188

Log:
  MFC: r287337
    Apply the noline attribute to vdev_queue_max_async_writes

    This makes it possible to analyze the performance of the new ZFS
    write throttle with dtrace

  PR:		200316
  Sponsored by:	FreeBSD Mastery: Advanced ZFS

Changes:
_U  stable/10/
  stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c