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

Rinaldo DiGiorgio commented on MESOS-5589:
------------------------------------------

g++ Program


#include <iostream>
#include <sys/time.h>
#include <ctime>
#include <unistd.h>

using namespace std;

int main() {
        for (int i = 0; i < 100; i++) {
    cout << "i is " << i << endl;
                struct timeval tp;
                gettimeofday(&tp, NULL);
                long int start = tp.tv_sec * 1000 + tp.tv_usec / 1000;
                usleep(10*1000);
                gettimeofday(&tp, NULL);
                long int end = tp.tv_sec * 1000 + tp.tv_usec / 1000;
                long diff = end - start;
                cout<<"Elapsed time is :  "<<  diff <<" ms "<<endl;
        }
        return 0;
}

Sample Output

Received SUBSCRIBED event
Subscribed executor on 192.168.0.128
Received LAUNCH event
Starting task SleepLatency
Forked command at 1922
sh -c 'cd /tmp && ./sleep'
i is 0
Elapsed time is :  110 ms 
i is 1
Elapsed time is :  100 ms 
i is 2
Elapsed time is :  104 ms 
i is 3

Running the same application without mesos is what is expected by convention -- 
not by spec.

Elapsed time is :  12 ms
i is 93
Elapsed time is :  12 ms
i is 94
Elapsed time is :  10 ms
i is 95
Elapsed time is :  11 ms
i is 96
Elapsed time is :  13 ms
i is 97
Elapsed time is :  10 ms
i is 98
Elapsed time is :  12 ms
i is 99


> mesos OSX Agent creates an environment where scheduling latency is 10x worse 
> than without mesos
> -----------------------------------------------------------------------------------------------
>
>                 Key: MESOS-5589
>                 URL: https://issues.apache.org/jira/browse/MESOS-5589
>             Project: Mesos
>          Issue Type: Bug
>    Affects Versions: 1.0.0, 0.28.1, 0.28.2
>            Reporter: Rinaldo DiGiorgio
>
> Two applications were written, one in Java and another in C++ to measure 
> latency after a sleep.   In both cases the latency is often 10X the time 
> without running in the mesos agent.
> This behavior was verified  on mesos1.0.0, 0.28.2 and 0.28.1
> A loop is executed that delays for 10ms, the actual amoutn of time is between 
> 10 and several hundred ms. There is no gurantee of this time being in a 
> range. On Linux it works well, 1-3 ms more on average.  On OSX it is anywhere 
> from 2 to several hundred ms.  Can we make the performance equivalent to 
> Linux for the same type of machine.  Some members of the mesos staff have 
> reported that they do not see this issue.  I have included all the version 
> numbers
> OSX 10.11.4
> java 1.8 and 1.7
> g++
> Mesos 1.0.0 and 0.28.2



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

Reply via email to