high CPU usage in FreeBSD for a PCIe card driver
Warner Losh
imp at bsdimp.com
Wed Jun 27 14:11:15 UTC 2018
No. It's not from mtx_lock. It's likely from lock contention. Since the
list ate the attachment, I can't check for sure, but high CPU usage in
locking primitives is a classic sign of poor lock design leading to
contention.
Warner
On Wed, Jun 27, 2018 at 6:28 AM, Steevan Rodrigues <steevanxperia at gmail.com>
wrote:
> Hi
>
> I come from Linux background and new to FreeBSD.
>
> I am investigating a high CPU usage issue on FreeBSD for PCIe driver of a
> card . The card can process data at a rate of 30 to 50 Gbps . However, I
> see very high CPU usage even when I run a single threaded user side
> application which uses this card .
>
> I ran hotkernel script from Dtrace toolkit. A portion of the output is
> given in the attached file dtraceDiff.txt. Here I see that lock_delay
> seems to be the reason for high CPU usage. Looks like it comes from mutex
> locks
>
> This driver uses mutex locks ( mtx_lock).
>
> The CPU usage is very high on a multicore (Xeon CPU) server node than a
> dual core (Intel i3) Desktop .
>
> It shows 30 to 40 % CPU usage on a Intel i3 ( 2 core 4 threads) and 60 to
> 70% CPU usage on a Xeon CPU with 12 core (24 threads) for same output
> data rate .
>
> I wonder whether usage of mtx_lock is the cause of high CPU usage ? Any
> pointers or suggestions welcome.
>
> Using FreeBSD 11.1 Release
>
> Thanks
>
> Steev
>
> _______________________________________________
> freebsd-hackers at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"
>
>
More information about the freebsd-hackers
mailing list