Matty
2005-Sep-15 17:01 UTC
[dtrace-discuss] Measuring major/minor faults with vminfo provider?
Howdy, Does anyone happen to know which probes can be used to find the processes responsible for non-zero values in the mpstat major (mjf) and minor (minf) fault columns? The vminfo provider section of the DTrace users guide describes several awesome probes ( execpgout, anonpgout, pgin, pgout and maj_fault) for correlating paging activity to processes, but I can''t seem to find a probe that provides information on major and minor page faults. Also, is there a way to get the file associated with the execpgin/execpgout or fspgin/fspgout activity? Thanks, - Ryan ============================================================== Matty : UNIX Administrator : GPG ID: 92D5DFFF Home/BLOG : http://daemons.net/~matty Public Key : http://daemons.net/~matty/public_key.txt Fingerprint : 4BEC 6145 30A6 BCE6 5602 FF11 4954 165D 92D5 DFFF ===============================================================
Adam Leventhal
2005-Sep-15 18:55 UTC
[dtrace-discuss] Measuring major/minor faults with vminfo provider?
Hi Ryan,> Does anyone happen to know which probes can be used to find the processes > responsible for non-zero values in the mpstat major (mjf) and minor (minf) > fault columns? The vminfo provider section of the DTrace users guide > describes several awesome probes ( execpgout, anonpgout, pgin, pgout and > maj_fault) for correlating paging activity to processes, but I can''t seem > to find a probe that provides information on major and minor page faults.>From the code in mpstat.c, it looks like the minf column combines hat_faultand as_fault and majf comes from maj_fault: http://cvs.opensolaris.org/source/xref/usr/src/cmd/stat/mpstat/mpstat.c#222 It doesn''t look like we ever use increment hat_fault in the kernel (please someone correct me if I''ve missed something) so it''s really just as_fault. You can get those by enabling the as_fault and maj_fault probes in the vminfo provider. It might be worth filing a bug to evaluate the appropriateness of using hat_fault if it, in fact, never used in the kernel. I''ve filed a bug against the DTrace documentation to provide the mapping between sysinfo and vminfo probes and the columns in various stat tools -- going to the source is not a great answer (well actually, it''s a fantastic answer, but just not for most Solaris users). 6324666 describe mapping between stat tools and sysinfo/vminfo probes> Also, is there a way to get the file associated with the execpgin/execpgout > or fspgin/fspgout activity?You should be able to get the file for the execpgin (for example) by doing something like this: ---8<--- pgin.d ---8<--- fbt::pageio_setup:entry { self->vp = args[2]; } vminfo:::execpgin /self->vp/ { printf("execpgin %s", stringof(self->vp->v_path)); } fbt::pageio_setup:return /self->vp/ { self->vp = NULL; } ---8<--- pgin.d ---8<--- Let me know if that works. Adam -- Adam Leventhal, Solaris Kernel Development http://blogs.sun.com/ahl
Matty
2005-Sep-15 19:35 UTC
[dtrace-discuss] Measuring major/minor faults with vminfo provider?
On Thu, 15 Sep 2005, Adam Leventhal wrote:> Hi Ryan, > >> Does anyone happen to know which probes can be used to find the processes >> responsible for non-zero values in the mpstat major (mjf) and minor (minf) >> fault columns? The vminfo provider section of the DTrace users guide >> describes several awesome probes ( execpgout, anonpgout, pgin, pgout and >> maj_fault) for correlating paging activity to processes, but I can''t seem >> to find a probe that provides information on major and minor page faults. > >> From the code in mpstat.c, it looks like the minf column combines hat_fault > and as_fault and majf comes from maj_fault: > > http://cvs.opensolaris.org/source/xref/usr/src/cmd/stat/mpstat/mpstat.c#222 > > It doesn''t look like we ever use increment hat_fault in the kernel (please > someone correct me if I''ve missed something) so it''s really just as_fault. > You can get those by enabling the as_fault and maj_fault probes in the > vminfo provider.Oh man -- this is awesome! Thanks!> It might be worth filing a bug to evaluate the appropriateness of using > hat_fault if it, in fact, never used in the kernel. I''ve filed a bug against > the DTrace documentation to provide the mapping between sysinfo and vminfo > probes and the columns in various stat tools -- going to the source is not > a great answer (well actually, it''s a fantastic answer, but just not for most > Solaris users).This would be amazingly useful for system and application adminstrators.> > 6324666 describe mapping between stat tools and sysinfo/vminfo probes > >> Also, is there a way to get the file associated with the execpgin/execpgout >> or fspgin/fspgout activity? > > You should be able to get the file for the execpgin (for example) by > doing something like this: > > ---8<--- pgin.d ---8<--- > > fbt::pageio_setup:entry > { > self->vp = args[2]; > } > > vminfo:::execpgin > /self->vp/ > { > printf("execpgin %s", stringof(self->vp->v_path)); > } > > fbt::pageio_setup:return > /self->vp/ > { > self->vp = NULL; > } > > ---8<--- pgin.d ---8<--- > > Let me know if that works.It looks like Solaris 10 GA gets a bit angry with this: $ /usr/sbin/dtrace -s page.d dtrace: script ''page.d'' matched 3 probes dtrace: error on enabled probe ID 2 (ID 7283: vminfo:genunix:pageio_setup:execpgin): invalid address (0x0) in action #1 dtrace: error on enabled probe ID 2 (ID 7283: vminfo:genunix:pageio_setup:execpgin): invalid address (0x0) in action #1 dtrace: error on enabled probe ID 2 (ID 7283: vminfo:genunix:pageio_setup:execpgin): invalid address (0x0) in action #1 dtrace: error on enabled probe ID 2 (ID 7283: vminfo:genunix:pageio_setup:execpgin): invalid address (0x0) in action #1 dtrace: error on enabled probe ID 2 (ID 7283: vminfo:genunix:pageio_setup:execpgin): invalid address (0x0) in action #1 dtrace: error on enabled probe ID 2 (ID 7283: vminfo:genunix:pageio_setup:execpgin): invalid address (0x0) in action #1 dtrace: error on enabled probe ID 2 (ID 7283: vminfo:genunix:pageio_setup:execpgin): invalid address (0x0) in action #1 dtrace: error on enabled probe ID 2 (ID 7283: vminfo:genunix:pageio_setup:execpgin): invalid address (0x0) in action #1 dtrace: error on enabled probe ID 2 (ID 7283: vminfo:genunix:pageio_setup:execpgin): invalid address (0x0) in action #1 dtrace: error on enabled probe ID 2 (ID 7283: vminfo:genunix:pageio_setup:execpgin): invalid address (0x0) in action #1 Is this normal?
Adam Leventhal
2005-Sep-15 19:47 UTC
[dtrace-discuss] Measuring major/minor faults with vminfo provider?
On Thu, Sep 15, 2005 at 03:35:10PM -0400, Matty wrote:> It looks like Solaris 10 GA gets a bit angry with this: > > $ /usr/sbin/dtrace -s page.d > dtrace: script ''page.d'' matched 3 probes > dtrace: error on enabled probe ID 2 (ID 7283: > vminfo:genunix:pageio_setup:execpgin): invalid address (0x0) in action #1 > dtrace: error on enabled probe ID 2 (ID 7283: > vminfo:genunix:pageio_setup:execpgin): invalid address (0x0) in action #1 > dtrace: error on enabled probe ID 2 (ID 7283: > vminfo:genunix:pageio_setup:execpgin): invalid address (0x0) in action #1 > dtrace: error on enabled probe ID 2 (ID 7283: > vminfo:genunix:pageio_setup:execpgin): invalid address (0x0) in action #1 > dtrace: error on enabled probe ID 2 (ID 7283: > vminfo:genunix:pageio_setup:execpgin): invalid address (0x0) in action #1 > dtrace: error on enabled probe ID 2 (ID 7283: > vminfo:genunix:pageio_setup:execpgin): invalid address (0x0) in action #1 > dtrace: error on enabled probe ID 2 (ID 7283: > vminfo:genunix:pageio_setup:execpgin): invalid address (0x0) in action #1 > dtrace: error on enabled probe ID 2 (ID 7283: > vminfo:genunix:pageio_setup:execpgin): invalid address (0x0) in action #1 > dtrace: error on enabled probe ID 2 (ID 7283: > vminfo:genunix:pageio_setup:execpgin): invalid address (0x0) in action #1 > dtrace: error on enabled probe ID 2 (ID 7283: > vminfo:genunix:pageio_setup:execpgin): invalid address (0x0) in action #1 > > Is this normal?Hm. No. Try adding a predicate that self->vp->v_path is non-NULL and see if you get any helpful data. Adam -- Adam Leventhal, Solaris Kernel Development http://blogs.sun.com/ahl
Eric Schrock
2005-Sep-15 19:59 UTC
[dtrace-discuss] Measuring major/minor faults with vminfo provider?
FWIW, vnode path information is far more accurate/prevalent in Nevada builds 21 and later thanks to the putback of: 6175313 io provider exposes our reluctance to set vnode paths On S10, there are many more ways to end up with a NULL ''v_path'', and is likely why this is more of an issue for S10. Although the v_path is never guaranteed to be non-NULL (and still will be for things like sockets), so you should always do something like: printf("%s", vp->v_path ? stringof(vp->v_path) : "<unknown>"); When accessing it. The vnode_t -> fileinfo_t translator does just this for the io provider. - Eric On Thu, Sep 15, 2005 at 12:47:51PM -0700, Adam Leventhal wrote:> On Thu, Sep 15, 2005 at 03:35:10PM -0400, Matty wrote: > > It looks like Solaris 10 GA gets a bit angry with this: > > > > $ /usr/sbin/dtrace -s page.d > > dtrace: script ''page.d'' matched 3 probes > > dtrace: error on enabled probe ID 2 (ID 7283: > > vminfo:genunix:pageio_setup:execpgin): invalid address (0x0) in action #1 > > dtrace: error on enabled probe ID 2 (ID 7283: > > vminfo:genunix:pageio_setup:execpgin): invalid address (0x0) in action #1 > > dtrace: error on enabled probe ID 2 (ID 7283: > > vminfo:genunix:pageio_setup:execpgin): invalid address (0x0) in action #1 > > dtrace: error on enabled probe ID 2 (ID 7283: > > vminfo:genunix:pageio_setup:execpgin): invalid address (0x0) in action #1 > > dtrace: error on enabled probe ID 2 (ID 7283: > > vminfo:genunix:pageio_setup:execpgin): invalid address (0x0) in action #1 > > dtrace: error on enabled probe ID 2 (ID 7283: > > vminfo:genunix:pageio_setup:execpgin): invalid address (0x0) in action #1 > > dtrace: error on enabled probe ID 2 (ID 7283: > > vminfo:genunix:pageio_setup:execpgin): invalid address (0x0) in action #1 > > dtrace: error on enabled probe ID 2 (ID 7283: > > vminfo:genunix:pageio_setup:execpgin): invalid address (0x0) in action #1 > > dtrace: error on enabled probe ID 2 (ID 7283: > > vminfo:genunix:pageio_setup:execpgin): invalid address (0x0) in action #1 > > dtrace: error on enabled probe ID 2 (ID 7283: > > vminfo:genunix:pageio_setup:execpgin): invalid address (0x0) in action #1 > > > > Is this normal? > > Hm. No. Try adding a predicate that self->vp->v_path is non-NULL and see > if you get any helpful data. > > Adam > > -- > Adam Leventhal, Solaris Kernel Development http://blogs.sun.com/ahl > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org-- Eric Schrock, Solaris Kernel Development http://blogs.sun.com/eschrock