[ 
https://issues.apache.org/jira/browse/MESOS-3082?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15101208#comment-15101208
 ] 

Till Toenshoff commented on MESOS-3082:
---------------------------------------

My test results...

VM emulating a CPU without perf support (Ubuntu 14.04 - kernel 3.13.0-32):
{noformat}
$ perf list hw
  ref-cycles                                         [Hardware event]
{noformat}

So we have a functioning perf binary with kernel support but without CPU cycle 
processor support in the above VM.

Now let's look at your platform validation;
1. perf needs to be available as a frontend tool
2. perf needs to list anything matching "cycles"
-> the above environment matches your criterea but the tests still fail.

{noformat}
[==========] Running 7 tests from 7 test cases.
[----------] Global test environment set-up.
[----------] 1 test from MesosContainerizerSlaveRecoveryTest
[ RUN      ] MesosContainerizerSlaveRecoveryTest.CGROUPS_ROOT_PerfRollForward
I0114 20:49:33.270757 31625 exec.cpp:134] Version: 0.27.0
I0114 20:49:33.287257 31639 exec.cpp:208] Executor registered on slave 
cc7aa759-58dd-4f35-8375-b8c7b8f186f3-S0
Registered executor on ubuntu
Starting task bc702f06-e65b-4569-93ec-67830158cbcd
sh -c 'sleep 1000'
Forked command at 31648
../../src/tests/slave_recovery_tests.cpp:3378: Failure
containerizer2: Could not create isolator 'cgroups/perf_event': Perf is not 
supported
../../3rdparty/libprocess/include/process/gmock.hpp:404: Failure
Actual function call count doesn't match EXPECT_CALL(filter->mock, 
filter(testing::A<const DispatchEvent&>()))...
    Expected args: dispatch matcher (1-byte object <21>, 16-byte object <21-00 
00-00 00-00 00-00 00-00 00-00 00-00 00-00>)
         Expected: to be called once
           Actual: never called - unsatisfied and active
[  FAILED  ] MesosContainerizerSlaveRecoveryTest.CGROUPS_ROOT_PerfRollForward 
(476 ms)
[----------] 1 test from MesosContainerizerSlaveRecoveryTest (476 ms total)
{noformat}

Same VM with perf cycle counting enabled for the emulated CPU features;
{noformat}
$ perf list hw
  cpu-cycles OR cycles                               [Hardware event]
  instructions                                       [Hardware event]
  cache-references                                   [Hardware event]
  cache-misses                                       [Hardware event]
  branch-instructions OR branches                    [Hardware event]
  branch-misses                                      [Hardware event]
  bus-cycles                                         [Hardware event]
  ref-cycles                                         [Hardware event]
{noformat}

Physical box with perf support enabled:
{noformat}
$  perf list hw

List of pre-defined events (to be used in -e):

  branch-instructions OR branches                    [Hardware event]
  branch-misses                                      [Hardware event]
  bus-cycles                                         [Hardware event]
  cache-misses                                       [Hardware event]
  cache-references                                   [Hardware event]
  cpu-cycles OR cycles                               [Hardware event]
  instructions                                       [Hardware event]
  ref-cycles                                         [Hardware event]
  stalled-cycles-frontend OR idle-cycles-frontend    [Hardware event]
{noformat}

> Perf related tests rely on 'cycles' which might not always be present.
> ----------------------------------------------------------------------
>
>                 Key: MESOS-3082
>                 URL: https://issues.apache.org/jira/browse/MESOS-3082
>             Project: Mesos
>          Issue Type: Bug
>         Environment: Ubuntu 14.04 (in a virtual machine)
>            Reporter: Benjamin Hindman
>            Assignee: Jan Schlicht
>              Labels: mesosphere
>
> When running the tests on Ubuntu 14.04 the 'cycles' value collected by perf 
> is always 0, meaning certain tests always fail. These lines in the test have 
> been commented out for now and a TODO has been attached which links to this 
> JIRA issue, since the solution is unclear. In particular, 'cycles' might not 
> properly be counted because it is a hardware counter and this particular 
> machine was a virtual machine. Either way, we should determine the best 
> events to collect from perf in either VM or physical settings.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to