Date: Wed, 6 Jul 2016 18:55:56 -0700 From: Yuri <yuri@rawbw.com> To: Konstantin Belousov <kostikbel@gmail.com> Cc: Freebsd hackers list <freebsd-hackers@freebsd.org> Subject: Re: Why kinfo_getvmmap is sometimes so expensive? Message-ID: <0b5c9018-2b12-e993-a6df-06ecad6a7b07@rawbw.com> In-Reply-To: <20160707001913.GJ38613@kib.kiev.ua> References: <e6dc27c0-0454-0666-b3e1-887bd116a847@rawbw.com> <20160707001913.GJ38613@kib.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
On 07/06/2016 17:19, Konstantin Belousov wrote: > To calculate residency count for the process map entries, kernel has to > iterate over all pages. This operation was somewhat optimized in 10.3 > and HEAD, particularly for the large sparce mappings. But for large populated > mappings there is no other way then to check each page. > > You may confirm my hypothesis by setting sysctl > kern.proc_vmmap_skip_resident_count to 0 and see whether the CPU > consumption changed. Of course, you will not get the resident count > in the returned structure, after the knob is tweaked. Yes, this explains it. kern.proc_vmmap_skip_resident_count=0 made CPU consumption to go down. So, it is better to parse /proc/<pid>/map to get the process size. Thank you, Yuri
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0b5c9018-2b12-e993-a6df-06ecad6a7b07>
