Results 1 to 8 of 8

Thread: 12.04 kernel performance

  1. #1
    Join Date
    May 2012
    Beans
    7

    12.04 kernel performance

    Hi forum,

    I recently deployed two Ubuntu 12.04 virtual servers, one using the virtual kernel and one with the default generic/server kernel. I also deployed two 10.10 servers. All are running on our Xenserver host and are have only SSH installed.

    To compare the performance of 12.04 and 10.10 and the virtual and server kernels I wrote a simple bash script that loops 5 million times calculating a square root. The problem is it takes the 10.10 servers running 2.6.35-32 half the time it takes the 12.04 servers to complete the loops - 4 hours compared to 8!

    I also notice that when idle the 12.04 server 1 minute CPU load average jumps around while the 10.10 server load averages sit steady on 0.

    Any thoughts on why there should be such a huge difference between the two kernel performance?

  2. #2
    Join Date
    Feb 2011
    Location
    Coquitlam, B.C. Canada
    Beans
    2,608
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: 12.04 kernel performance

    Any tests I have done between 10.10, 11.10 and 12.04 only show similar or improved results, although I haven't done the exact test you described. I have a 10.10 server and 2 12.04 servers (one 12.04 is pathetic and one 12.04 is a recent i7 based computer). If you post your bash script I will try it on my servers. (I could write my own bash script, but I want to do exactly what you are doing.)

    About load averages: There was a change in the load average calculation code just prior to the final 12.04 release. Yes, the 1 miniute reported load average is noisey and sometimes reports high now under light actual loads. Previously it reported low, under many conditions.
    References:
    https://bugs.launchpad.net/ubuntu/+s...ux/+bug/838811
    https://bugs.launchpad.net/ubuntu/+s...ux/+bug/995284
    https://bugs.launchpad.net/ubuntu/+s...ux/+bug/985661
    http://www.smythies.com/~doug/networ...age/index.html

    Oh, by the way, welcome to Ubuntu forums.

  3. #3
    Join Date
    Feb 2011
    Location
    Coquitlam, B.C. Canada
    Beans
    2,608
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: 12.04 kernel performance

    I made a file, sqrt_loop with this:
    Code:
    #!/bin/bash
    echo "square root loop - begin"
    echo
    COUNTER=1000
    until [ $COUNTER -lt 1 ]; do
      echo COUNTER $COUNTER
    #  python -c 'import math; print math.sqrt(3)'
      perl -e 'print sqrt(3), "\n"'
      let COUNTER-=1
    done
    echo "square root loop - end"
    And ran it with:
    Code:
    time sqrt_loop
    On my 10.10 server it took 3.129 seconds (would have been 4.34 hours for 5 million loops).
    On my good 12.04 server it took 2.287 seconds.
    I realize I am not comparing properly because the hardware is different between the two, but that difference is very approximately what I would expected based on those hardware differences.

  4. #4
    Join Date
    May 2012
    Beans
    7

    Re: 12.04 kernel performance

    Hi Doug,

    Thanks for the reply. I've attached the script and as you can see it's pretty simple, a single process, no forks etc. The sync and write just add a little disk load but can significantly increase the execution time. 2000000 iterations takes an hour or so and the longer the tests run the bigger the difference between the 10.10 and 12.04 servers. The stock virtual kernels appear marginally faster than the generic/server kernel but nothing worth writing home about.

    For our application there probably wouldn't be any noticeable difference between the 10.10 & 12.04 results but it would be good to know if the difference is specific to this test, our installation, the position of Venus or phase of the the moon.

    Your Linux load averages site is great, you certainly put some work into it and it seems to explain our load averages. What were the trends created with?
    Attached Files Attached Files

  5. #5
    Join Date
    Feb 2011
    Location
    Coquitlam, B.C. Canada
    Beans
    2,608
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: 12.04 kernel performance

    Results from your script on my Ubuntu 10.10 server:
    Code:
    Started at  Sun May 20 23:49:56 PDT 2012
    2000000       -  23:49:56
    1800000       -  23:55:25
    1600000       -  00:00:49
    1400000       -  00:06:02
    1200000       -  00:11:16
    1000000       -  00:16:29
    800000       -  00:21:43
    600000       -  00:26:57
    400000       -  00:32:11
    200000       -  00:37:25
    Finished at  Mon May 21 00:42:40 PDT 2012
    Completed in 52 minutes
    doug@doug-64:~/scripts$ cat /proc/version
    Linux version 2.6.35-32-server (buildd@crested) (gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5) ) #67-Ubuntu SMP Mon Mar 5 21:13:25 UTC 2012
    It will be about 10 hours before I can run your script on my good 12.04 server, as it has that long left on a 52.5 hour reported load average data aquisition experiment.

    By the way, these scripts (either yours or mine (with a much larger initial loop counter)) are good examples of the reported load averages issues. On my 10.10 server the reported load average during script execution was always 0.0, but was really about 1. The reported load average will be much better on my 12.04 server.

    Thanks for the comment about my reported load averages web notes. They need some updating, and I am trying to get to it. I wrote a program specifically for reported load average work, and I use it to aquire the trend data. When I update my notes, I will write up my experiments and post all the data and programs and scripts used.
    Last edited by Doug S; May 21st, 2012 at 04:09 PM.

  6. #6
    Join Date
    Sep 2011
    Location
    Behind you!
    Beans
    1,005
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: 12.04 kernel performance

    Quote Originally Posted by Doug S View Post
    I made a file, sqrt_loop with this:
    Code:
    #!/bin/bash
    echo "square root loop - begin"
    echo
    COUNTER=1000
    until [ $COUNTER -lt 1 ]; do
      echo COUNTER $COUNTER
    #  python -c 'import math; print math.sqrt(3)'
      perl -e 'print sqrt(3), "\n"'
      let COUNTER-=1
    done
    echo "square root loop - end"
    And ran it with:
    Code:
    time sqrt_loop
    On my 10.10 server it took 3.129 seconds (would have been 4.34 hours for 5 million loops).
    On my good 12.04 server it took 2.287 seconds.
    I realize I am not comparing properly because the hardware is different between the two, but that difference is very approximately what I would expected based on those hardware differences.
    ----------------------------------------------

    Linux srv-wiki 3.2.0-24-generic #37-Ubuntu SMP Wed Apr 25 08:43:22 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
    On my 12.04 LTS 64-bit server running on top of ESXi 4.1, I got these results:

    Code:
    real    0m1.371s
    user    0m0.056s
    sys     0m0.088s
    Code:
    real    0m1.379s
    user    0m0.052s
    sys     0m0.092s
    Code:
    real    0m1.384s
    user    0m0.056s
    sys     0m0.092s
    ----------------------------------------------

    Linux srv-mail 2.6.32-41-server #89-Ubuntu SMP Fri Apr 27 22:33:31 UTC 2012 x86_64 GNU/Linux
    On my 10.04.4 LTS 64-bit server running on top of ESXi 4.1, I got these results:

    Code:
    real    0m1.717s
    user    0m9.410s
    sys     0m0.730s
    Code:
    real    0m1.748s
    user    0m9.430s
    sys     0m0.720s
    Code:
    real    0m1.737s
    user    0m9.340s
    sys     0m0.810s
    Both are running on the same kind of hardware under similar load...but different hardware.

    ----------------------------------------------

    EDIT #1: I ran another test on my offsite ESXi server in which both VMs are on the exact same hardware (same blade)

    ----------------------------------------------------

    Linux srv-mc 3.2.0-24-generic #37-Ubuntu SMP Wed Apr 25 08:43:22 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

    Code:
    real    0m1.599s
    user    0m0.060s
    sys     0m0.064s
    Code:
    real    0m1.574s
    user    0m0.052s
    sys     0m0.076s
    Code:
    real    0m1.547s
    user    0m0.048s
    sys     0m0.076s
    ----------------------------------------------------

    Linux srv-mailtest 2.6.32-40-server #87-Ubuntu SMP Tue Mar 6 02:10:02 UTC 2012 x86_64 GNU/Linux

    Code:
    real    0m2.674s
    user    0m9.470s
    sys     0m0.670s
    Code:
    real    0m1.561s
    user    0m9.370s
    sys     0m0.770s
    Code:
    real    0m1.572s
    user    0m9.390s
    sys     0m0.750s
    EDIT #2: For this simplistic CPU test, I don't see where 12.04 has any kind of significant disadvantage.

    --------------------------------------------------

    EDIT #3: I installed hardinfo benchmark program by typing aptitude install hardinfo on both servers and ran this command to generate the reports:
    hardinfo --generate-report --report-format=html > /srv/samba/share/out.htm

    Here are the results for each VM:

    Linux srv-mc 3.2.0-24-generic #37-Ubuntu SMP Wed Apr 25 08:43:22 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

    CPU Blowfish 12.260
    CPU CryptoHash 112.720
    CPU Fibonacci 2.678
    CPU N-Queens 8.532
    FPU FFT 5.987
    FPU Raytracing 6.046

    Linux srv-mailtest 2.6.32-40-server #87-Ubuntu SMP Tue Mar 6 02:10:02 UTC 2012 x86_64 GNU/Linux

    CPU Blowfish 10.374
    CPU CryptoHash 130.532
    CPU Fibonacci 2.205
    CPU N-Queens 7.654
    FPU FFT 5.205
    FPU Raytracing 5.533
    Last edited by LHammonds; May 21st, 2012 at 04:32 PM.

  7. #7
    Join Date
    Feb 2011
    Location
    Coquitlam, B.C. Canada
    Beans
    2,608
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: 12.04 kernel performance

    The results for your script on my 12.04 server:
    Code:
    Started at  Mon May 21 16:32:42 PDT 2012
    2000000       -  16:32:42
    1800000       -  16:38:32
    1600000       -  16:44:21
    1400000       -  16:50:11
    1200000       -  16:56:01
    1000000       -  17:01:50
    800000       -  17:07:40
    600000       -  17:13:29
    400000       -  17:19:19
    200000       -  17:25:08
    Finished at  Mon May 21 17:30:57 PDT 2012
    Completed in 58 minutes
    doug@s15:~/scripts$ cat /proc/version
    Linux version 3.2.0-24-generic (root@s15) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #37 SMP Mon May 7 07:24:21 PDT 2012
    While I have compiled the kernel myself, this one is unmodified from the stock kernel.
    I think LHammonds results are interesting.

  8. #8
    Join Date
    May 2012
    Beans
    7

    Re: 12.04 kernel performance

    Hi guys,

    Thanks for your replies. The time command is a revelation and certainly speeds testing up. Also interesting was how much slower python is compared to perl when used in Dougs script- something I'll have to keep in mind for other applications.
    I installed hardinfo and also found sysbench which can test CPU, memory, I/O among others and for all cpu tests my 10.10 2.6.35-32 kernel is outperforming the 12.04 3.2.0-24 kernel.

    As all my 12.04 VM's were created from the same template I've decided to build a new set of VM's from scratch and try again......

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •