Date: Sat, 20 Jan 2018 03:39:44 +0700 From: Eugene Grosbein <eugen@grosbein.net> To: Yuri <yuri@rawbw.com>, Freebsd hackers list <freebsd-hackers@FreeBSD.org> Subject: Re: Does the kernel assign CPU affinity automatically? Message-ID: <5A625790.3010703@grosbein.net> In-Reply-To: <38c78eec-b598-dc44-8422-ab8fdec0a735@rawbw.com> References: <38c78eec-b598-dc44-8422-ab8fdec0a735@rawbw.com>
next in thread | previous in thread | raw e-mail | index | archive | help
20.01.2018 2:03, Yuri wrote: > I noticed that my particularly large process always runs on the same CPU through its lifetime (based on top). You should not trust your eyes looking at top(1) output because scheduler quantum is pretty short and a process can be switched many times per second between top's screen updates. Instead, you should use sysctl kern.cp_times providing detailed ever incrementing counters for per-core idle/kernel/interrupt/nice/normal ticks (ticks have 1/stathz frequency, see sysctl kern.clockrate) to draw graphs or make comparisons. They allow you to check if such heavy process makes even load on every CPU core or not.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5A625790.3010703>