From: Benjamin King <benjaminking@web.de>
To: Vince Weaver <vincent.weaver@maine.edu>
Cc: Milian Wolff <milian.wolff@kdab.com>, linux-perf-users@vger.kernel.org
Subject: Re: How to sample memory usage cheaply?
Date: Sat, 1 Apr 2017 18:27:38 +0200 [thread overview]
Message-ID: <20170401162738.GB8989@localhost> (raw)
In-Reply-To: <alpine.DEB.2.20.1704010952260.19001@macbook-air>
Hi Vince,
>> Also, the 'perf stat' output that I sent does not make much sense to me right
>> now. For example, when I add MAP_POPULATE to the flags for mmap, I only see
>> ~40 minor page faults, which I do not understand at all.
>
>have you tried accessing your file in random order? I think the kernel is
>likely doing some sort of readahead/prefetching. I think you can change
>that behavior with the madvise() syscall
No, I did not try that. Just reading in every 4096th byte. I did assume that
any way of populating the page table of my process would show up as a page
fault. I guess, I have to read a bit more on that...
Cheers,
Benjamin
next prev parent reply other threads:[~2017-04-01 16:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-30 20:04 How to sample memory usage cheaply? Benjamin King
2017-03-31 12:06 ` Milian Wolff
2017-04-01 7:41 ` Benjamin King
2017-04-01 13:54 ` Vince Weaver
2017-04-01 16:27 ` Benjamin King [this message]
2017-04-03 19:09 ` Benjamin King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170401162738.GB8989@localhost \
--to=benjaminking@web.de \
--cc=linux-perf-users@vger.kernel.org \
--cc=milian.wolff@kdab.com \
--cc=vincent.weaver@maine.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).