From owner-freebsd-questions@FreeBSD.ORG Tue Dec 15 21:24:20 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 987F81065754 for ; Tue, 15 Dec 2009 21:24:19 +0000 (UTC) (envelope-from linda.messerschmidt@gmail.com) Received: from mail-fx0-f227.google.com (mail-fx0-f227.google.com [209.85.220.227]) by mx1.freebsd.org (Postfix) with ESMTP id A64868FC0C for ; Tue, 15 Dec 2009 21:24:18 +0000 (UTC) Received: by fxm27 with SMTP id 27so352636fxm.3 for ; Tue, 15 Dec 2009 13:24:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=oozTxAZzoxt0oj2aAEE8lFzLNihefuMS2Q1DtJGwtCY=; b=ZQjRKdG6DJQF6c6IoXhqVgccnzLaNdjljxiIP/qs5Hpqdu0fpGqrhVn2FSS1obzTIS 8SnppKWeF9+OwjFSO1HN+hg6fGJ4QEwR8RE2WHLnirN7WmdhJ2/RdiiIcnzpIWJXuqmG 9nixuusKzXWLapoPrGZ4Dwzb06CA+vTQ3LmOY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=yIN45uGfE4SkYUMdau5r0gWoHdeDTe9pXMNa7XsmNjKueas8j8K/G2b7Isp/JNjGI4 ra+uAO6hylljV4Qsoyr89oJ61oWTPFlmx41c7n9fOCf9r7pkqxqKwplmDGxFk7ET2FLV jlIVcYIzZQiMqiewJ0uOJ2ZbwYwMc3lxKAey0= MIME-Version: 1.0 Received: by 10.216.90.196 with SMTP id e46mr26620wef.194.1260912256427; Tue, 15 Dec 2009 13:24:16 -0800 (PST) In-Reply-To: <20091215175320.GR84026@dan.emsphone.com> References: <237c27100912100909i9c0eb95jd348eb594d86c744@mail.gmail.com> <20091214001304.GN84026@dan.emsphone.com> <237c27100912141931w1a9d50c0hf85b9b8e271902eb@mail.gmail.com> <20091215175320.GR84026@dan.emsphone.com> Date: Tue, 15 Dec 2009 16:24:16 -0500 Message-ID: <237c27100912151324x3003b810v6145e5f5cd163dbf@mail.gmail.com> From: Linda Messerschmidt To: Dan Nelson Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-questions Subject: Re: 8.0: OpenSSL stat()'s NLS 500+ times causing extreme system load X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Dec 2009 21:24:20 -0000 On Tue, Dec 15, 2009 at 12:53 PM, Dan Nelson wrote: > It's defined in src/lib/libc/Makefile, so you should be able to remove that > line, rebuild libc and reinstall, and see whether your performance issue > goes away. I tried that and as you predicted, all the bogus stat calls went away. Unfortunately the performance issue did not. :( Back to the drawing board for me! Upon further inspection, it seems as though for each check, Nagios spawns a process that spawns a process that spawns a process that runs the check. I did "ktrace -i -t w -p (nagiospid)" on Nagios for 30 seconds and the ktrace output contained records from 2365 different processes spawned in that 30 seconds. During that time, I would expect about 800 checks to have run, so it does seem like it's right at 3 processes per check. I just don't think the system can keep up with all that fork()ing without going all out; it's just a limit of the Nagios plugin architecture. But thank you very much for point me in the right direction!