LinuxQuestions.org
Help answer threads with 0 replies.
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, 01: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, 01:48 PM   #2
X-LFS-2010
Member
 
Registered: Apr 2016
Posts: 382

Rep: Reputation: Disabled
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, 08:32 PM   #3
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Yawnstown, Ohio
Distribution: Mojave
Posts: 9,349
Blog Entries: 36

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

Rep: Reputation: 2638Reputation: 2638Reputation: 2638Reputation: 2638Reputation: 2638Reputation: 2638Reputation: 2638Reputation: 2638Reputation: 2638Reputation: 2638Reputation: 2638
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, 01:01 PM   #5
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Yawnstown, Ohio
Distribution: Mojave
Posts: 9,349
Blog Entries: 36

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

Rep: Reputation: 2638Reputation: 2638Reputation: 2638Reputation: 2638Reputation: 2638Reputation: 2638Reputation: 2638Reputation: 2638Reputation: 2638Reputation: 2638Reputation: 2638
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, 12:35 PM   #7
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Yawnstown, Ohio
Distribution: Mojave
Posts: 9,349
Blog Entries: 36

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, 05: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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 02:05 AM
Page Faults vs. Page Ins golmschenk Programming 2 07-16-2010 03:32 AM
Page faults Oded Kahana Linux - Newbie 2 09-14-2008 01:14 PM
Page faults in Wine? navaburo Linux - Desktop 0 08-20-2006 05:24 PM
major problems, everything segmentation faults! Cyric Slackware 49 07-14-2006 05:27 PM

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

All times are GMT -5. The time now is 04:42 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration