Tuesday, November 27, 2012

Benchmark CPU performance

Build CoreMark
For x86 platform:
[ ] # make compile XCFLAGS="-g -DMULTITHREAD=8 -DUSE_FORK=1 -DPERFORMANCE_RUN=1"

[ ] # make compile XCFLAGS="-g -DMULTITHREAD=4 -DUSE_FORK=1 -DPERFORMANCE_RUN=1"

[ ] # make compile XCFLAGS="-g -DPERFORMANCE_RUN=1"

For ARM platform:
[ ] # make compile CC=arm-linux-gcc XCFLAGS="-g -DPERFORMANCE_RUN=1"

Execute CoreMark
[ ]# ./coremark.exe  0x0 0x0 0x66 0 7 1 2000

Sketch the scores
Data format in "coremark.gnuplot_x86.data"
1       7526.256372
2       15053.542714
3       16116.625765
4       20295.202952

[ ] # gnuplot
set xlabel "Core"
set ylabel "Iterations/Sec"
set xzeroaxis
set yzeroaxis
set xrange [0:5]
set yrange [0:30000]
set term png size 600, 400
set title "CoreMark with different x86 core number"
set output "x86-MP.CoreMark.png"

plot "coremark.gnuplot_x86.data" using 1:2 title "4 Processes" with linespoint




Other Example:
gnuplot> plot "coremark.gnuplot_x86.data" using 1:2 title "1 Process" with linespoint, "coremark.gnuplot.data" using 1:3 title "4 Processes" with linespoint, "coremark.gnuplot.data" using 1:4 title "8 Processes" with linespoint

Other Benchmark Tools:


  • Linpack
  • Quadrant
  • Geekbench 2
  • Vellamo
  • Andebench
  • Antutu Benchmark-59
  • Caffeine mark (example)
  • Nbench
  • GLBenchmark 2.1.4-10

  • Reference:
    Tegra II vs. TI OMAP PandaBoard

    Friday, November 16, 2012

    IPv6 over IPv4

    IPv6 tunneling provides a way to encapsulate IPv6 packets into IPv4 packets. That can be used to connect two IPv6 networks over an IPv4-only path.

    SIT
    This SIT driver implements encapsulation of IPv6 into IPv4 packets, so it can provide IPv6 service over the IPv4 network environment.


    Setup and Configuration Script
    ipv6_sit_dut.sh
    ipv6_sit_linux.sh

    6RD
    Setup and Configuration Script
    ipv6_6rd_dut.sh
    ipv6_6rd_linux.sh

    Monday, November 12, 2012

    ARMvisor

    ARMvisor is a Kernel-based virtual machine on ARM architecture.

    The Blog of ARMvisor.

    The presentation of ARMvisor in Linux Symposium 2012.


    Friday, November 9, 2012

    IPv6

    IPv6

    IPv6 NAT

    Why IPv6 NAT

  • Load Balancing
  • Multi-homing (Uplink Balance, Failover)

  • NAT is demanded by enterprises for multi-homing.
    Multi-homing is a situation that describes a single computer host that makes use of several IP addresses associated with various connected networks. Within this scenario, the multihomed computer host is physically linked to a variety of data connections or ports. These connections or ports may all be associated with the same network or with a variety of different networks. Depending on the exact configuration, multi-homing may allow a computer host to function as an IP router.













  • Dynamic IPv6 prefixes


  • Implementations

  • NF NAT66 (1:1, N:1): NAT66:A first implementation
  •     http://sourceforge.net/projects/nfnat66/


  • MAP66 (1:1):
  •     http://sourceforge.net/projects/map66/


  • RAWNAT (Xtables Addons): 


  • Standard
    RFC6296 - IPv6-to-IPv6 Network Prefix Translation, NPTv6

    Reference:
    Multi-homing: http://www.wisegeek.com/what-is-multi-homing.htm

    Wednesday, November 7, 2012

    Java Benchmark - CaffeineMark


    1. Install Oracle’s Java SE-E 7 JVM (The size of JVM is around 32MB)
    ejre-7u4-fcs-b20-linux-arm-vfp-client_headful-12_apr_2012.tar.gz

    2. CaffeineMark-3.0

    After enter Linux prompt,
    Setup your PATH environment variable on your target filesystem to point to the location of the "java".
    [ ]# PATH=$PATH:/mnt/ejre1.7.0_04/bin

    [ ]# cd /mnt/CaffeineMark-3.0
    [/mnt/CaffeineMark-3.0] # java CaffeineMarkEmbeddedApp
    Sieve score = 1231 (98)
    Loop score = 2787 (2017)
    Logic score = 2312 (0)
    String score = 596 (708)
    Float score = 1702 (185)
    Method score = 1619 (166650)
    Overall score = 1533

    Sunday, October 14, 2012

    CPU affinity

    taskset - retrieve or set a process's CPU affinity

    Usage: taskset [-p] [MASK] [PID | PROG ARGS]
       Set or get CPU affinity
          -p Operate on an existing PID


    Description
    MASK:
       The CPU affinity is represented as a bitmask, with the lowest order bit corresponding to the first logical CPU and the highest order bit corresponding to the last logical CPU.

    For example:
       * 1 is CPU core #0 (1st processor)
       * 3 is CPU core #0 and #1
       * 4 is CPU core #2 (3rd processor)

    To set the processor affinity of process 112 to CPU core #0 type following command:
       [ ]# taskset -p 1 112
    To set the processor affinity of process 112 to CPU core #1 type following command:
       [ ]# taskset -p 2 112
    To set the processor affinity of process 112 to CPU core #2 type following command:
       [ ]# taskset -p 4 112
    To set the processor affinity of process 112 to CPU core #3 type following command:
       [ ]# taskset -p 8 112

    Example:


    [ ]# ./stress -c 2
    [ ]# ps aux
     ......
     188 root       0:00 ./stress -c 2
     189 root       0:05 ./stress -c 2
     190 root       0:06 ./stress -c 2
     192 root       0:00 ps aux

    [ ]# htop
     1  [################100.0%] Tasks: 10, 0 thr, 39 kthr; 3 running
     2  [################100.0%] Load average: 2.06 1.44 1.10
     3  [                  0.0%] Uptime: 01:10:55
     4  [##**             14.3%]
     Mem[||******       5/122MB]
     Swp[                 0/0MB]

    # taskset -p 8 189
    pid 189's current affinity mask: f
    pid 189's new affinity mask: 8
    # taskset -p 8 190
    pid 190's current affinity mask: f
    pid 190's new affinity mask: 8

    [ ]# htop
     1  [                  0.0%] Tasks: 10, 0 thr, 39 kthr; 3 running
     2  [                  0.0%] Load average: 1.47 1.08 0.95
     3  [##**             12.7%] Uptime: 01:13:26
     4  [################100.0%]
     Mem[||******       5/122MB]
     Swp[                 0/0MB]     

    Tuesday, August 28, 2012

    Serial ATA AHCI

    AHCI 1.3 Specification (Download PDF)

    U-boot AHCI Driver

    U-boot Synopsys AHCI Driver

    Linux AHCI Driver

    Linux Synopsys AHCI Driver


    Linux Block I/O Layer

    Linux Block I/O Layer





    Performance
    Access Time = Command Overhead + Seek Time + Settle Time + Rotational Latency
    • Command Overhead: Disk controller process the disk request, that includes translating the LBA number into the CHS tuple.
    • Seek Time: Moving the disk arms so the heads are aligned with the correct cylinder.
    • Settle Time: To stabilize the disk heads before reading or writing data.
    • Rotational Latency: Waiting for the requested sector to arrive at the location of the disk heads.
    Performance Metrics
    • Throughput
    • Latency
    Tuning I/O Performance


    Benchmark Tools
    IOZone:

    For example:
    [ ]# /ust/bin/iozone -a > /root/iozone.log
    [ ]# /usr/bin/iozone/Generate_Graphs /root/iozone.log

    Fileop: Filesystem IO benchmarking tool










    It looks like "NOOP" is the best one in this case.

    Reference:
    1.Linux SCSI Subsystem
    2. 10 iozone Examples for Disk I/O Performance Measurement on Linux
    3. Measuring & Optimizing I/O Performance

    Tuesday, August 14, 2012

    Protocol Analyser

    PCI Express
    Summit T2-16 PCI Express Protocol Analyzer
    Summit Z2-16 PCI Express Multi-Lane Exerciser

    USB

    SATA
       LeCroy Sierra M6-2 SAS/SATA Protocol Analyzer

    SD/SDIO/MMC
       Finisar Bus Doctor SD/SDIO/MMC Protocol Analyzer

    Wednesday, June 27, 2012

    The way to copy memory on a Cortex-A9

    Word by Word memory copy

    Load-Multiple memory copy

    NEON memory copy

    Word by Word memory copy with preload

    Load-Multiple memory copy with preload

    NEON memory copy with preload


    NEONCopyPLD
       PLD [r1, #0xC0]
       VLDM r1!,{d0-d7}
       VSTM r0!,{d0-d7}
       SUBS r2,r2,#0x40 
       BGE NEONCopyPLD


    Mixed ARM and NEON memory copy with preload



    Tuesday, June 19, 2012

    [YouTube] Aalto Talk with Linus Torvalds

    Linus really doesn't like nVidia.

     

    Friday, January 27, 2012

    HOWTO MediaWiKi

    How to install MediaWiKi
    1. Install mediawiki

    http://www.mediawiki.org/wiki/Manual:Running_MediaWiki_on_Fedora_Core

    How to install MySQL
    1. Install MySQL
    yum install mysql-server php-mysql

    How to configure MySQL
    1. Set the MySQL service to start on boot
    [ ]# chkconfig --levels 235 mysqld on
    2. Start the MySQL service
    [ ]# service mysqld start
    3. Log into MySQL
    [ ]# mysql -u root
    4. Set the root user password for all local domains
    mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('your-password');
    mysql> SET PASSWORD FOR 'root'@'hostname' = PASSWORD('your-password');
    mysql> SET PASSWORD FOR 'root'@'127.0.0.1' = PASSWORD('your-password');
    5. Drop the Any user
    mysql> DROP USER ''@'localhost';
    mysql> DROP USER ''@'hostname';
    mysql> DROP USER ''@'%';
    6. Drop the test database
    mysql> DROP DATABASE test;
    7. Exit MySQL
    [ ]# exit

    Reference:
    1. Professional Wikis, Mark Choate, 2008, Wiley Publishing, Inc.
    2. Wikipatterns, Stewart Mader, 2008, Wiley Publishing, Inc.

    Sunday, January 15, 2012

    802.1X

    802.1X Port-Based Authentication