LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 06-04-2018, 12:17 PM   #1
jack malkovick
LQ Newbie
 
Registered: Jun 2018
Posts: 2

Rep: Reputation: Disabled
monitoring major page faults cause


Hello

How could I monitor the cause of the major page faults in my app?
At least the virtual address in process space where they happen.
I know they are happening, but I'm using a couple of memory mapped files and I don't know which one of them are producing the corresponding disk activity.

Thank you
 
Old 06-05-2018, 12:48 PM   #2
X-LFS-2010
Member
 
Registered: Apr 2016
Posts: 510

Rep: Reputation: 58
sounds to me like you have bad libraries (your version of libc that supports "memory mapped files", broken)

it's not memory mapped if the red led disk light is on is it? nope.

HOWEVER: remember that if you "sync" or if the file changes that the kernel may "do maintenance". memory mapped file does not mean loaded into memory. it's still subject to kernel maintenance which could mean writing cached data because ... "there's nothing else to do right now".
 
Old 06-05-2018, 07:32 PM   #3
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
collectl may be able to help.
sysstat utilities been utilized?
snmp ?
 
Old 06-05-2018, 08:39 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
I would be a bit surprised if this sort of info was exposed to userland.
I see there is a kernel trace event for "page_fault_user" that has a field for address - probably the guy you're looking for, but needs kernel tracing set up for it and filtering for PID. Not to mention a kernel with the appropriate option enabled.
 
Old 06-06-2018, 12:01 PM   #5
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
http://collectl.sourceforge.net/Documentation.html
 
Old 06-06-2018, 05:42 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Last I looked collectl gets its info (primarily) from /proc and sysfs - with luck Mark will drop by and comment authoritatively.
 
Old 06-07-2018, 11:35 AM   #7
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by syg00 View Post
Last I looked collectl gets its info (primarily) from /proc and sysfs - with luck Mark will drop by and comment authoritatively.
He has the best answers!.
 
Old 06-10-2018, 04:10 PM   #8
jack malkovick
LQ Newbie
 
Registered: Jun 2018
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thanks for your replies. I used trace-cmd, but unfortunately not all kernel versions have support for page-fault events...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Major Page Faults bhushan.karia Linux - Server 1 07-22-2015 01:05 AM
Page Faults vs. Page Ins golmschenk Programming 2 07-16-2010 02:32 AM
Page faults Oded Kahana Linux - Newbie 2 09-14-2008 12:14 PM
Page faults in Wine? navaburo Linux - Desktop 0 08-20-2006 04:24 PM
major problems, everything segmentation faults! Cyric Slackware 49 07-14-2006 04:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 11:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration