[Barrelfish-users] About CPU performance

tomsun.0.7 tomsun.0.7 at gmail.com
Thu Feb 5 14:35:51 CET 2015


I made some progress on this problem.

It seems like the performance on bare-metal is exactly a half of running on
QEMU even I wrote another application which calculated Fibonacci sequence.
But when I *turned off hyper-threading* in BIOS, and got better
performance. However it is still worse than the performance in QEMU. The
detailed performance and platform information is here:

CPU: Intel(R) Xeon(R) CPU E3-1230 V2 @ 3.30GHz

QEMU execution time:           5509153 us
Bare-metal execution time: 10802345 us
w/o hyper-threading:              6065235 us

code:

#include <stdio.h>
#include <sys/time.h>
long fib(long a, long b, long depth)
{
    if (depth > 0) {
        return fib(b, a + b, depth - 1);
    }
    return b;
}
int main(void)
{
    struct timeval start;
    gettimeofday(&start, NULL);
    printf("fib: %ld\n", fib(1, 1, 10000000000));
    struct timeval end;
    gettimeofday(&end, NULL);
    printf("time: %ld us\n", end.tv_usec - start.tv_usec + (end.tv_sec -
start.tv_sec) * 10000\00);
    return 0;
}

So, is it possible that Barrelfish missed some necessary configurations to
initialize CPUs?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.inf.ethz.ch/pipermail/barrelfish-users/attachments/20150205/fa71c541/attachment.html 


More information about the Barrelfish-users mailing list