Skip to contentSkip to conversation

Perfctr-Xen framework for permonace analysis

DISCUSSION Ruslan Nikolaev 4 participants 8 messages May 12, 2011 – Aug 15, 2011

lore
Share & tools
lore
#0 lore raw

Hi

I want to make an announcement about new perfomance monitoring framework.

Perfctr-Xen framework that enables per-thread performance analysis in Xen. Current version is capable of properly virtualizing counters in both paravirtualized and HVM modes. It is based on perfctr (which is a library and kernel module for non-virtualized guests), ported to Xen, and extended to work properly in virtualized environment. Both accumulative and interrupt modes counting (profiling) are supported.

The advantage of Perfctr-Xen is that it does not require specific HVM extensions which are needed for vpmu driver, can work in paravirtualized mode, and it also quite universal: works with many common tools such as PAPI, HPCToolkit, TAU PerfExplorer. It supports proper per-domain and per-thread virtualization. It is light-weight, supports wide range of CPUs, does not require save-and-restore for accumulative mode of counting (it uses counter offsetting), avoids expensive hypercalls and counter re-programming in certain circumstances (when threads are counting the same type of events). In addition, some techniques are employed to account for the overhead caused by the framework itself. This makes measurements quite accurate.

Perfctr-Xen consists of series of patches that need to be applied to Xen, Linux, perfctr. There are available at:
http://people.cs.vt.edu/~rnikola/

The code is available under LGPL. It would be great to discuss if and how it can be integrated into Xen.

The publication regarding Perfctr-Xen is at:
http://portal.acm.org/citation.cfm?id=1952687

Thanks,
Ruslan Nikolaev

#1 lore raw
Quoted 22 lines · Ruslan Nikolaev

Hi

I want to make an announcement about new perfomance monitoring framework.

Perfctr-Xen framework that enables per-thread performance analysis in Xen. Current version is capable of properly virtualizing counters in both paravirtualized and HVM modes. It is based on perfctr (which is a library and kernel module for non-virtualized guests), ported to Xen, and extended to work properly in virtualized environment. Both accumulative and interrupt modes counting (profiling) are supported.

The advantage of Perfctr-Xen is that it does not require specific HVM extensions which are needed for vpmu driver, can work in paravirtualized mode, and it also quite universal: works with many common tools such as PAPI, HPCToolkit, TAU PerfExplorer. It supports proper per-domain and per-thread virtualization. It is light-weight, supports wide range of CPUs, does not require save-and-restore for accumulative mode of counting (it uses counter offsetting), avoids expensive hypercalls and counter re-programming in certain circumstances (when threads are counting the same type of events). In addition, some techniques are employed to account for the overhead caused by the framework itself. This makes measurements quite accurate.

Quoted 6 lines

Perfctr-Xen consists of series of patches that need to be applied to Xen, Linux, perfctr. There are available at:
http://people.cs.vt.edu/~rnikola/

The code is available under LGPL. It would be great to discuss if and how it can be integrated into Xen.

Could it reasonably replace the oprofile stuff we have already? I wouldn't want yet another perfctr subsystem/interface unless it supplants an existing one. We need a revolving door policy here I think.

-- Keir

Quoted 10 lines

The publication regarding Perfctr-Xen is at:
http://portal.acm.org/citation.cfm?id=1952687

Thanks,
Ruslan Nikolaev

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#2 lore raw

Well, at least it can peacefully coexist with oprofile. AFAIK, XenOProf has some limitations (system wide monitoring only), and works only with OProfile. Many people would also prefer to use PAPI/HPCToolkit/PerfExplorer. HPCToolkit itself is quite sophisticated framework with elaborated functionality. It is quite comparable to OProfile. PerfExplorer is also a very interesting project. PAPI is used by developers to do wide range of measurements which are not necessarily possible with OProfile. The key feature of Perfctr-Xen is that it allows to do all levels of performance monitoring, it does not restrict to profiling.

This framework and xenoprof provide orthogonal solutions which both can be used in different circumstances.

Thanks,
Ruslan Nikolaev

Quoted 81 lines · Keir Fraser

From: Keir Fraser <[email protected]>
Subject: Re: [Xen-devel] Perfctr-Xen framework for permonace analysis
To: "Ruslan Nikolaev" <[email protected]>, [email protected]
Date: Friday, May 13, 2011, 12:09 AM

Quoted 3 lines · Ruslan Nikolaev

Hi

I want to make an announcement about new perfomance

monitoring framework.

Quoted 2 lines

Perfctr-Xen framework that enables per-thread

performance analysis in Xen.

Quoted 1 line

Current version is capable of properly virtualizing

counters in both

Quoted 1 line

paravirtualized and HVM modes. It is based on perfctr

(which is a library and

Quoted 1 line

kernel module for non-virtualized guests), ported to

Xen, and extended to work

Quoted 1 line

properly in virtualized environment. Both accumulative

and interrupt modes

Quoted 3 lines

counting (profiling) are supported.

The advantage of Perfctr-Xen is that it does not

require specific HVM

Quoted 1 line

extensions which are needed for vpmu driver, can work

in paravirtualized mode,

Quoted 1 line

and it also quite universal: works with many common

tools such as PAPI,

Quoted 1 line

HPCToolkit, TAU PerfExplorer. It supports proper

per-domain and per-thread

Quoted 1 line

virtualization. It is light-weight, supports wide

range of CPUs, does not

Quoted 1 line

require save-and-restore for accumulative mode of

counting (it uses counter

Quoted 1 line

offsetting), avoids expensive hypercalls and counter

re-programming in certain

Quoted 1 line

circumstances (when threads are counting the same type

of events). In

Quoted 1 line

addition, some techniques are employed to account for

the overhead caused by

Quoted 1 line

the framework itself. This makes measurements quite

accurate.

Quoted 2 lines

Perfctr-Xen consists of series of patches that need to

be applied to Xen,

Quoted 4 lines

Linux, perfctr. There are available at:
http://people.cs.vt.edu/~rnikola/

The code is available under LGPL. It would be great to

discuss if and how it

Quoted 1 line

can be integrated into Xen.

Could it reasonably replace the oprofile stuff we have already? I wouldn't
want yet another perfctr subsystem/interface unless it supplants an existing
one. We need a revolving door policy here I think.

-- Keir

Quoted 10 lines

The publication regarding Perfctr-Xen is at:
http://portal.acm.org/citation.cfm?id=1952687

Thanks,
Ruslan Nikolaev

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#3 lore raw
Quoted 1 line · Ruslan Nikolaev

Well, at least it can peacefully coexist with oprofile. AFAIK, XenOProf has some limitations (system wide monitoring only), and works only with OProfile. Many people would also prefer to use PAPI/HPCToolkit/PerfExplorer. HPCToolkit itself is quite sophisticated framework with elaborated functionality. It is quite comparable to OProfile. PerfExplorer is also a very interesting project. PAPI is used by developers to do wide range of measurements which are not necessarily possible with OProfile. The key feature of Perfctr-Xen is that it allows to do all levels of performance monitoring, it does not restrict to profiling.

xenoprof enables the normal Linux oprofile, which can be used on processes, as well as on domains and on Xen itself. I don't remember if oprofile allows collection of performance counters on individual processes though; I suspect not.

I'm a bit torn -- if people are used to using oprofile under Linux, it may be advantageous to keep that, rather than replacing it outright with a new tool. But as you said about the scheduler, Keir, oprofile gets little enough love as it is...

-George

Quoted 95 lines

This framework and xenoprof provide orthogonal solutions which both can be used in different circumstances.

Thanks,
Ruslan Nikolaev

Quoted 76 lines · Keir Fraser

From: Keir Fraser <[email protected]>
Subject: Re: [Xen-devel] Perfctr-Xen framework for permonace analysis
To: "Ruslan Nikolaev" <[email protected]>, [email protected]
Date: Friday, May 13, 2011, 12:09 AM

Quoted 3 lines · Ruslan Nikolaev

Hi

I want to make an announcement about new perfomance

monitoring framework.

Quoted 2 lines

Perfctr-Xen framework that enables per-thread

performance analysis in Xen.

Quoted 1 line

Current version is capable of properly virtualizing

counters in both

Quoted 1 line

paravirtualized and HVM modes. It is based on perfctr

(which is a library and

Quoted 1 line

kernel module for non-virtualized guests), ported to

Xen, and extended to work

Quoted 1 line

properly in virtualized environment. Both accumulative

and interrupt modes

Quoted 3 lines

counting (profiling) are supported.

The advantage of Perfctr-Xen is that it does not

require specific HVM

Quoted 1 line

extensions which are needed for vpmu driver, can work

in paravirtualized mode,

Quoted 1 line

and it also quite universal: works with many common

tools such as PAPI,

Quoted 1 line

HPCToolkit, TAU PerfExplorer. It supports proper

per-domain and per-thread

Quoted 1 line

virtualization. It is light-weight, supports wide

range of CPUs, does not

Quoted 1 line

require save-and-restore for accumulative mode of

counting (it uses counter

Quoted 1 line

offsetting), avoids expensive hypercalls and counter

re-programming in certain

Quoted 1 line

circumstances (when threads are counting the same type

of events). In

Quoted 1 line

addition, some techniques are employed to account for

the overhead caused by

Quoted 1 line

the framework itself. This makes measurements quite

accurate.

Quoted 2 lines

Perfctr-Xen consists of series of patches that need to

be applied to Xen,

Quoted 4 lines

Linux, perfctr. There are available at:
http://people.cs.vt.edu/~rnikola/

The code is available under LGPL. It would be great to

discuss if and how it

Quoted 1 line

can be integrated into Xen.

Could it reasonably replace the oprofile stuff we have already? I wouldn't
want yet another perfctr subsystem/interface unless it supplants an existing
one. We need a revolving door policy here I think.

 -- Keir

Quoted 10 lines

The publication regarding Perfctr-Xen is at:
http://portal.acm.org/citation.cfm?id=1952687

Thanks,
Ruslan Nikolaev

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Quoted 5 lines

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#4 lore raw
In reply to Ruslan Nikolaev
Quoted 8 lines · Ruslan Nikolaev

Hi

I want to make an announcement about new perfomance monitoring framework.

Perfctr-Xen framework that enables per-thread performance analysis in Xen. Current version is capable of properly virtualizing counters in both paravirtualized and HVM modes. It is based on perfctr (which is a library and kernel module for non-virtualized guests), ported to Xen, and extended to work properly in virtualized environment. Both accumulative and interrupt modes counting (profiling) are supported.

The advantage of Perfctr-Xen is that it does not require specific HVM extensions which are needed for vpmu driver, can work in paravirtualized mode, and it also quite universal: works with many common tools such as PAPI, HPCToolkit, TAU PerfExplorer. It supports proper per-domain and per-thread virtualization. It is light-weight, supports wide range of CPUs, does not require save-and-restore for accumulative mode of counting (it uses counter offsetting), avoids expensive hypercalls and counter re-programming in certain circumstances (when threads are counting the same type of events). In addition, some techniques are employed to account for the overhead caused by the framework itself. This makes measurements quite accurate.

Quoted 7 lines

Perfctr-Xen consists of series of patches that need to be applied to Xen, Linux, perfctr. There are available at:
http://people.cs.vt.edu/~rnikola/

The code is available under LGPL. It would be great to discuss if and how it can be integrated into Xen.

The publication regarding Perfctr-Xen is at:
http://portal.acm.org/citation.cfm?id=1952687

Do you have this paper, or perhaps a pre-print, posted somewhere not behind a paywall? Or a different document describing the library in detail? Most of us don't have subscriptions to ACM...

-George

#5 lore raw
Quoted 47 lines · George Dunlap

From: George Dunlap <[email protected]>
Subject: Re: [Xen-devel] Perfctr-Xen framework for permonace analysis
To: "Ruslan Nikolaev" <[email protected]>
Cc: [email protected]
Date: Friday, May 13, 2011, 5:59 PM
On Thu, May 12, 2011 at 8:36 PM,
Ruslan Nikolaev
<[email protected]>

Quoted 3 lines · wrote:

Hi

I want to make an announcement about new perfomance

monitoring framework.

Quoted 2 lines

Perfctr-Xen framework that enables per-thread

performance analysis in Xen. Current version is capable of properly virtualizing counters in both paravirtualized and HVM modes. It is based on perfctr (which is a library and kernel module for non-virtualized guests), ported to Xen, and extended to work properly in virtualized environment. Both accumulative and interrupt modes counting (profiling) are supported.

Quoted 2 lines

The advantage of Perfctr-Xen is that it does not

require specific HVM extensions which are needed for vpmu driver, can work in paravirtualized mode, and it also quite
universal: works with many common tools such as PAPI, HPCToolkit, TAU PerfExplorer. It supports proper per-domain and per-thread virtualization. It is light-weight, supports wide range of CPUs, does not require save-and-restore for accumulative mode of counting (it uses counter offsetting), avoids expensive hypercalls and counter re-programming in certain circumstances (when threads are counting the same type of events). In addition, some techniques are employed to account for the overhead caused by the framework itself. This makes measurements quite accurate.

Quoted 2 lines

Perfctr-Xen consists of series of patches that need to

be applied to Xen, Linux, perfctr. There are available at:

Quoted 3 lines

http://people.cs.vt.edu/~rnikola/

The code is available under LGPL. It would be great to

discuss if and how it can be integrated into Xen.

Quoted 3 lines

The publication regarding Perfctr-Xen is at:
http://portal.acm.org/citation.cfm?id=1952687

Quoted 6 lines

Do you have this paper, or perhaps a pre-print, posted somewhere not
behind a paywall?  Or a different document describing the library in
detail?  Most of us don't have subscriptions to ACM...

Ok. I will post a link.

Ruslan.

Quoted 8 lines

-George

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#6 lore raw
In reply to George Dunlap

The author's paper is available on my website:

http://people.cs.vt.edu/~rnikola/?page_id=159

Please, let me know what you think.

Thanks,
Ruslan Nikolaev

Quoted 61 lines · George Dunlap

From: George Dunlap <[email protected]>
Subject: Re: [Xen-devel] Perfctr-Xen framework for permonace analysis
To: "Ruslan Nikolaev" <[email protected]>
Cc: [email protected]
Date: Friday, May 13, 2011, 5:59 PM
On Thu, May 12, 2011 at 8:36 PM,
Ruslan Nikolaev
<[email protected]>

Quoted 3 lines · wrote:

Hi

I want to make an announcement about new perfomance

monitoring framework.

Quoted 2 lines

Perfctr-Xen framework that enables per-thread

performance analysis in Xen. Current version is capable of properly virtualizing counters in both paravirtualized and HVM modes. It is based on perfctr (which is a library and kernel module for non-virtualized guests), ported to Xen, and extended to work properly in virtualized environment. Both accumulative and interrupt modes counting (profiling) are supported.

Quoted 2 lines

The advantage of Perfctr-Xen is that it does not

require specific HVM extensions which are needed for vpmu driver, can work in paravirtualized mode, and it also quite
universal: works with many common tools such as PAPI, HPCToolkit, TAU PerfExplorer. It supports proper per-domain and per-thread virtualization. It is light-weight, supports wide range of CPUs, does not require save-and-restore for accumulative mode of counting (it uses counter offsetting), avoids expensive hypercalls and counter re-programming in certain circumstances (when threads are counting the same type of events). In addition, some techniques are employed to account for the overhead caused by the framework itself. This makes measurements quite accurate.

Quoted 2 lines

Perfctr-Xen consists of series of patches that need to

be applied to Xen, Linux, perfctr. There are available at:

Quoted 3 lines

http://people.cs.vt.edu/~rnikola/

The code is available under LGPL. It would be great to

discuss if and how it can be integrated into Xen.

Quoted 3 lines

The publication regarding Perfctr-Xen is at:
http://portal.acm.org/citation.cfm?id=1952687

Do you have this paper, or perhaps a pre-print, posted somewhere not
behind a paywall?  Or a different document describing the library in
detail?  Most of us don't have subscriptions to ACM...

-George

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#7 lore raw
In reply to Ruslan Nikolaev
Quoted 4 lines · Ruslan Nikolaev

Hi

I want to make an announcement about new perfomance monitoring framework.

Quoted 8 lines

Perfctr-Xen framework that enables per-thread performance analysis in Xen. Current version is capable of properly virtualizing counters in both paravirtualized and HVM modes. It is based on perfctr (which is a library and kernel module for non-virtualized guests), ported to Xen, and extended to work properly in virtualized environment. Both accumulative and interrupt modes counting (profiling) are supported.

The advantage of Perfctr-Xen is that it does not require specific HVM extensions which are needed for vpmu driver, can work in paravirtualized mode, and it also quite universal: works with many common tools such as PAPI, HPCToolkit, TAU PerfExplorer. It supports proper per-domain and per-thread virtualization. It is light-weight, supports wide range of CPUs, does not require save-and-restore for accumulative mode of counting (it uses counter offsetting), avoids expensive hypercalls and counter re-programming in certain circumstances (when threads are counting the same type of events). In addition, some techniques are employed to account for the overhead caused by the framework itself. This makes measurements quite accurate.

Perfctr-Xen consists of series of patches that need to be applied to Xen, Linux, perfctr. There are available at:
http://people.cs.vt.edu/~rnikola/

The code is available under LGPL. It would be great to discuss if and how it can be integrated into Xen.

So I read your guys paper and found it interesting. But I am bit confused about the baremetal state of perf monitoring tool. Which one is in the upstream kernel (3.0) that runs when you use 'perftop' and like?

Quoted 11 lines

The publication regarding Perfctr-Xen is at:
http://portal.acm.org/citation.cfm?id=1952687

Thanks,
Ruslan Nikolaev

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel