linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* perf memory metrics on ec2 instance
@ 2018-01-03 14:50 Dmitry Dolgov
  2018-01-03 23:36 ` Andi Kleen
  0 siblings, 1 reply; 5+ messages in thread
From: Dmitry Dolgov @ 2018-01-03 14:50 UTC (permalink / raw)
  To: linux-perf-users

Hi,

I have a question, maybe a stupid one. I'm experimenting with perf
on ec2 instances, a dedicated m4.16xlarge, that should support some
hardware counters. But so far when I'm trying to get something memory
related, I'm getting this error (the same for `perf mem -t load record
-- sleep 10`):

$ perf c2c record -- sleep 10
event syntax error: '..ads,ldlat=30/P'
                                  \___ unknown term

valid terms: pc,inv,edge,cmask,event,umask,config,config1,config2,name,period,freq,branch_type,time,call-graph,stack-size,no-inherit,inherit,max-stack,no-overwrite,overwrite,driver-config
Run 'perf list' for a list of valid events

 Usage: perf record [<options>] [<command>]
    or: perf record [<options>] -- <command> [<options>]

    -e, --event <event>   event selector. use 'perf list' to list
available events


$ perf -v
perf version 4.15.rc6.g30a7a

$ uname -a
Linux ip-172-30-2-208 4.4.0-1041-aws #50-Ubuntu SMP Wed Nov 15
22:18:17 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

It's quite confusing for me, because the same works fine on my local machine,
but this error I've got is not about something being not supported. Can you tell
me what I'm doing wrong?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: perf memory metrics on ec2 instance
  2018-01-03 14:50 perf memory metrics on ec2 instance Dmitry Dolgov
@ 2018-01-03 23:36 ` Andi Kleen
  2018-01-07 15:37   ` Dmitry Dolgov
  2018-01-07 21:59   ` Brendan Gregg
  0 siblings, 2 replies; 5+ messages in thread
From: Andi Kleen @ 2018-01-03 23:36 UTC (permalink / raw)
  To: Dmitry Dolgov; +Cc: linux-perf-users

Dmitry Dolgov <9erthalion6@gmail.com> writes:
>
> It's quite confusing for me, because the same works fine on my local machine,
> but this error I've got is not about something being not supported. Can you tell
> me what I'm doing wrong?

perf mem requires PEBS.  PEBS is currently not supported in VMs. You
should let Amazon know that you need it though, so it could be possibly
implemented.

-Andi

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: perf memory metrics on ec2 instance
  2018-01-03 23:36 ` Andi Kleen
@ 2018-01-07 15:37   ` Dmitry Dolgov
  2018-01-08  5:09     ` Andi Kleen
  2018-01-07 21:59   ` Brendan Gregg
  1 sibling, 1 reply; 5+ messages in thread
From: Dmitry Dolgov @ 2018-01-07 15:37 UTC (permalink / raw)
  To: Andi Kleen; +Cc: linux-perf-users

> On 4 January 2018 at 00:36, Andi Kleen <ak@linux.intel.com> wrote:
>
> perf mem requires PEBS.  PEBS is currently not supported in VMs. You
> should let Amazon know that you need it though, so it could be possibly
> implemented.

Thanks for the explanation. Is there any alternative way to get memory
counters? If I need to know only how many times an event appeared, can I do
more or less the same with perf stat -e 'counter_name' without PEBS support?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: perf memory metrics on ec2 instance
  2018-01-03 23:36 ` Andi Kleen
  2018-01-07 15:37   ` Dmitry Dolgov
@ 2018-01-07 21:59   ` Brendan Gregg
  1 sibling, 0 replies; 5+ messages in thread
From: Brendan Gregg @ 2018-01-07 21:59 UTC (permalink / raw)
  To: Andi Kleen; +Cc: Dmitry Dolgov, linux-perf-use.

On Wed, Jan 3, 2018 at 3:36 PM, Andi Kleen <ak@linux.intel.com> wrote:
>
> Dmitry Dolgov <9erthalion6@gmail.com> writes:
> >
> > It's quite confusing for me, because the same works fine on my local machine,
> > but this error I've got is not about something being not supported. Can you tell
> > me what I'm doing wrong?
>
> perf mem requires PEBS.  PEBS is currently not supported in VMs. You
> should let Amazon know that you need it though, so it could be possibly
> implemented.

Right. Clouds like AWS have millions of customers asking for various
things. Relatively speaking, those of us asking for PMCs, PEBS, BTS,
etc (which was hopefully more than just me), are a speck of dust. But
they do listen, and they did ship architectural PMCs on many large
instance types early last year (eg, m4.16xl). Since late last year,
most/all PMCs are now available on the Nitro hypervisor instances (c5,
m5, etc), and now everything is available on the new bare metal
instance type (preview only).

If anyone wants PEBS right now in EC2, get on the public preview of
the bare metal instance type.

Brendan

>
>
> -Andi
> --
> To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: perf memory metrics on ec2 instance
  2018-01-07 15:37   ` Dmitry Dolgov
@ 2018-01-08  5:09     ` Andi Kleen
  0 siblings, 0 replies; 5+ messages in thread
From: Andi Kleen @ 2018-01-08  5:09 UTC (permalink / raw)
  To: Dmitry Dolgov; +Cc: linux-perf-users

Dmitry Dolgov <9erthalion6@gmail.com> writes:

>> On 4 January 2018 at 00:36, Andi Kleen <ak@linux.intel.com> wrote:
>>
>> perf mem requires PEBS.  PEBS is currently not supported in VMs. You
>> should let Amazon know that you need it though, so it could be possibly
>> implemented.
>
> Thanks for the explanation. Is there any alternative way to get memory
> counters? If I need to know only how many times an event appeared, can I do
> more or less the same with perf stat -e 'counter_name' without PEBS support?

Counting these events should work if the PMU is enabled. I believe you
need a special setup in AWS to get the PMU enabled though.

-Andi

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-01-08 21:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-03 14:50 perf memory metrics on ec2 instance Dmitry Dolgov
2018-01-03 23:36 ` Andi Kleen
2018-01-07 15:37   ` Dmitry Dolgov
2018-01-08  5:09     ` Andi Kleen
2018-01-07 21:59   ` Brendan Gregg

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).