From mexas@bristol.ac.uk  Mon Nov 18 09:32:41 2013
Return-Path: <mexas@bristol.ac.uk>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id 576DBA77
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 18 Nov 2013 09:32:41 +0000 (UTC)
Received: from eu1sys200aog117.obsmtp.com (eu1sys200aog117.obsmtp.com [207.126.144.143])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id AC23D2AAF
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 18 Nov 2013 09:32:40 +0000 (UTC)
Received: from mail-wg0-f53.google.com ([74.125.82.53]) (using TLSv1) by eu1sys200aob117.postini.com ([207.126.147.11]) with SMTP
	ID DSNKUoneo0tAgPdWeFT0Fodtt0SE2eh9BBVO@postini.com; Mon, 18 Nov 2013 09:32:40 UTC
Received: by mail-wg0-f53.google.com with SMTP id b13so5949753wgh.20
        for <FreeBSD-gnats-submit@freebsd.org>; Mon, 18 Nov 2013 01:32:18 -0800 (PST)
Received: from mech-cluster241.men.bris.ac.uk (mech-cluster241.men.bris.ac.uk. [137.222.187.241])
        by mx.google.com with ESMTPSA id uc12sm22311864wib.3.2013.11.18.01.32.17
        for <FreeBSD-gnats-submit@freebsd.org>
        (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Mon, 18 Nov 2013 01:32:18 -0800 (PST)
Received: from mech-cluster241.men.bris.ac.uk (localhost [127.0.0.1])
	by mech-cluster241.men.bris.ac.uk (8.14.7/8.14.6) with ESMTP id rAI9WGfD062849
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO)
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 18 Nov 2013 09:32:16 GMT
	(envelope-from mexas@mech-cluster241.men.bris.ac.uk)
Received: (from mexas@localhost)
	by mech-cluster241.men.bris.ac.uk (8.14.7/8.14.6/Submit) id rAI9WGJf062848;
	Mon, 18 Nov 2013 09:32:16 GMT
	(envelope-from mexas)
Message-Id: <201311180932.rAI9WGJf062848@mech-cluster241.men.bris.ac.uk>
Date: Mon, 18 Nov 2013 01:32:18 -0800 (PST)
From: Anton Shterenlikht <mexas@bris.ac.uk>
Sender: Anton Shterenlikht <mexas@bristol.ac.uk>
Reply-To: Anton Shterenlikht <mexas@bris.ac.uk>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: developers handbook, 10.7 Debugging Deadlocks - must include warning on DIAGNOSTIC adding too much overhead
X-Send-Pr-Version: 3.114
X-GNATS-Notify:

>Number:         184048
>Category:       docs
>Synopsis:       developers handbook, 10.7 Debugging Deadlocks - must include warning on DIAGNOSTIC adding too much overhead
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-doc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Nov 18 09:40:00 UTC 2013
>Closed-Date:    
>Last-Modified:  Tue Nov 19 01:47:27 UTC 2013
>Originator:     Anton Shterenlikht
>Release:        FreeBSD 11.0-CURRENT ia64
>Organization:
University of Bristol 
>Environment:
System: FreeBSD mech-cluster241.men.bris.ac.uk 11.0-CURRENT FreeBSD 11.0-CURRENT #8 r256683: Fri Oct 18 08:52:38 BST 2013 root@mech-cluster241.men.bris.ac.uk:/usr/obj/usr/src/sys/TZAV ia64


	
>Description:

http://www.freebsd.org/doc/en/books/developers-handbook/kerneldebug-deadlocks.html

My experience with ia64 -current shows that
kernel option DIAGNOSTIC adds too much overhead
to the system. It seems the extra debugging
consumes 100% of system resources and the system
can do nothing else. In particular, the symptoms are:

- kernel thread taskq, which consumes 100% CPU, e.g.:

  PID USERNAME   PRI NICE   SIZE    RES STATE   C   TIME     CPU COMMAND
    0 root         8    0     0K   416K CPU0    0 186:02 100.00% kernel{thread taskq}

- system extremely unresponsive, requiring over 1 min(!)
  to execute ls, df, ps, date, uptime, etc.

- lots of messages similar to:

Expensive timeout(9) function: 0x9ffc000000dca8b0(0) 0.036993424 s

	
>How-To-Repeat:
	
>Fix:

Removing DIAGNOSTIC gets the system back to usable.

I suggest adding a warning to the above page, something
like: "Be warned that option DIAGNOSTIC adds a lot of
extra overheads to the system, which can result in very
noticeable degradation of performance."
And then listing the above sysmptoms as examples of
degraded performance.
Or something like this.

I've discussed this with marcel@ and he agrees with me.

	

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-doc 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Tue Nov 19 01:47:12 UTC 2013 
Responsible-Changed-Why:  
reclassify. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=184048 
>Unformatted:
