Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Sep 2006 11:07:52 -0500
From:      Dan Nelson <dnelson@allantgroup.com>
To:        Ian Smith <smithi@nimnet.asn.au>
Cc:        "Tamouh H." <hakmi@rogers.com>, questions@freebsd.org, Giorgos Keramidas <keramida@freebsd.org>
Subject:   Re: Top not showing cpu usage even remotely accurately
Message-ID:  <20060915160752.GC55663@dan.emsphone.com>
In-Reply-To: <Pine.BSF.3.96.1060915193930.29169A-100000@gaia.nimnet.asn.au>
References:  <20060914142023.GB91336@dan.emsphone.com> <Pine.BSF.3.96.1060915193930.29169A-100000@gaia.nimnet.asn.au>

next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Sep 15), Ian Smith said:
> On Thu, 14 Sep 2006, Dan Nelson wrote:
>  > I would guess that maybe xmms (or some other threaded app) is your
>  > hidden CPU consumer.  The kernel does not calculate %CPU correctly
>  > for libkse-threaded programs, and they usually show up as 0% all
>  > the time.  The TIME column does update correctly, though.  If you
>  > switch to libthr with libmap.conf, you'll get accurate threaded
>  > %CPU reporting.
> 
> I assume then that libkse is what the three multi-thread programs I'm
> running (xmms, mozilla-bin and mysqld) are now using, where for each
> of them `ldd $program | grep thr` shows
>  libpthread.so.1 => /usr/lib/libpthread.so.1
> 
> So can/should I set in (a new) /etc/libmap.conf generally:
>      libpthread.so.1         libthr.so.1
>      libpthread.so           libthr.so
> 
> or would it be better to just target these specific programs, eg:
> 
> [/usr/X11R6/lib/mozilla/mozilla-bin/]  # assuming loaded with full path?
>      libpthread.so.1         libthr.so.1
>      libpthread.so           libthr.so
> 
> Are there any likely downsides to using libthr instead?  Esp. mysqld?

Ya, libkse was the name of the default thread library before it was
renamed to "libpthread".  I use a global map (like in your first
example) myself.  I have a lightly-used mysql database on my machine
and haven't noticed any problems with it or any other threaded apps.

-- 
	Dan Nelson
	dnelson@allantgroup.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060915160752.GC55663>