Analyzing wired memory?

Alan Cox alc at rice.edu
Tue Feb 8 18:57:04 UTC 2011


On 2/8/2011 12:27 PM, Robert Watson wrote:
>
> On Tue, 8 Feb 2011, Alan Cox wrote:
>
>> On Tue, Feb 8, 2011 at 6:20 AM, Ivan Voras <ivoras at freebsd.org> wrote:
>>
>>> Is it possible to track by some way what kernel system, process or 
>>> thread has wired memory? (including "data exists but needs code to 
>>> extract it")
>>>
>> No.
>>
>>
>>> I'd like to analyze a system where there is a lot of memory wired 
>>> but not accounted for in the output of vmstat -m and vmstat -z. 
>>> There are no user processes which would lock memory themselves.
>>>
>>> Any pointers?
>>>
>> Have you accounted for the buffer cache?
>
> John and I have occasionally talked about making procstat -v work on 
> the kernel; conceivably it could also export a wired page count for 
> mappings where it makes sense.  Ideally procstat would drill in a bit 
> and allow you to see things at least at the granularty of "this page 
> range was allocated to UMA".

I would certainly have found this useful on a few occasions, and would 
gladly help out with implementing it.  For example, it would help us in 
understanding the kmem_map fragmentation caused by ZFS.  That said, I'm 
not sure how you will represent the case where UMA allocates physical 
memory directly and uses the direct map to access it.

Alan



More information about the freebsd-hackers mailing list