阿里雲1 C 2 G性能基準試験

9907 ワード

CPU
システム情報
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                1
On-line CPU(s) list:   0
Thread(s) per core:    1
Core(s) per socket:    1
 :                 1
NUMA   :         1
   ID:           GenuineIntel
CPU   :          6
  :              79
    :        Intel(R) Xeon(R) CPU E5-2682 v4 @ 2.50GHz
  :              1
CPU MHz:             2494.222
BogoMIPS:            4988.44
      :  KVM
     :       
L1d   :          32K
L1i   :          32K
L2   :           256K
L3   :           40960K
NUMA   0 CPU:    0
Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch ibrs ibpb stibp fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm rdseed adx smap xsaveopt spec_ctrl intel_stibp

データムテスト
sysbench --events=5000 --cpu-max-prime=10000 cpu run

Running the test with following options:
Number of threads: 1
Initializing random number generator from current time


Prime numbers limit: 10000

Initializing worker threads...

Threads started!

CPU speed:
    events per second:   946.17

General statistics:
    total time:                          5.2826s
    total number of events:              5000

Latency (ms):
         min:                                    1.04
         avg:                                    1.06
         max:                                    8.10
         95th percentile:                        1.08
         sum:                                 5278.34

Threads fairness:
    events (avg/stddev):           5000.0000/0.00
    execution time (avg/stddev):   5.2783/0.00

5000回の素数計算(素数上限10000)を実行し、総実行時間は5.2783秒で、1本あたり946.17回の素数計算を完了し、平均1回の素数計算完了時間は1.06 msで、95%の素数計算は1.08 ms以内に完了した.
メモリ
システム情報
free -h
              total        used        free      shared  buff/cache   available
Mem:           1.8G        831M        764M        1.2M        241M        843M
Swap:          1.0G          0B        1.0G

データムテスト
[root@izuf62iqgz8u2rtutismxez mem]# sysbench --memory-block-size=8K --memory-total-size=100G  --threads=1 memory run
sysbench 1.0.17 (using system LuaJIT 2.0.4)

Running the test with following options:
Number of threads: 1
Initializing random number generator from current time


Running memory speed test with the following options:
  block size: 8KiB
  total size: 102400MiB
  operation: write
  scope: global

Initializing worker threads...

Threads started!

Total operations: 13107200 (1322607.28 per second)

102400.00 MiB transferred (10332.87 MiB/sec)


General statistics:
    total time:                          9.9082s
    total number of events:              13107200

Latency (ms):
         min:                                    0.00
         avg:                                    0.00
         max:                                    1.37
         95th percentile:                        0.00
         sum:                                 7924.22

Threads fairness:
    events (avg/stddev):           13107200.0000/0.00
    execution time (avg/stddev):   7.9242/0.00

メモリ転送速度は約10 G/sであることがわかる.
ディスク
システム情報
cat /sys/block/vda/queue/rotational
1

fdisk -l
   /dev/vda:42.9 GB, 42949672960   ,83886080    
Units =    of 1 * 512 = 512 bytes
    (  /  ):512    / 512   
I/O   (  /  ):512    / 512   
      :dos
     :0x0008de3e
      Boot      Start         End      Blocks   Id  System
/dev/vda1   *        2048    83884031    41940992   83  Linux

***
データムテスト
sysbench --file-total-size=10G --num-threads=8  --file-test-mode=rndrw fileio run

Running the test with following options:
Number of threads: 8
Report intermediate results every 1 second(s)
Initializing random number generator from current time

Extra file open flags: (none)
128 files, 80MiB each
10GiB total file size
Block size 16KiB
Number of IO requests: 0
Read/Write ratio for combined random IO test: 1.50
Periodic FSYNC enabled, calling fsync() each 100 requests.
Calling fsync() at the end of test, Enabled.
Using synchronous I/O mode
Doing random r/w test
Initializing worker threads...

Threads started!

File operations:
    reads/s:                      2070.20
    writes/s:                     1379.63
    fsyncs/s:                     4508.38

Throughput:
    read, MiB/s:                  32.35
    written, MiB/s:               21.56

General statistics:
    total time:                          10.0206s
    total number of events:              78735

Latency (ms):
         min:                                    0.00
         avg:                                    1.02
         max:                                   97.11
         95th percentile:                        2.18
         sum:                                79952.87

Threads fairness:
    events (avg/stddev):           9841.8750/79.75
    execution time (avg/stddev):   9.9941/0.00

128*80 M=10 Gのファイルのランダム読み書きテストでは、ランダム読み書きiopsが2070、ランダム書き込みiopsが1379、読み取りスループットが32.35 M、書き込みスループットが21.56 M、平響が1.02 ms、95パーセントの要求が2.18 msで完了していることがわかります.
POSIXスレッド
データムテスト
sysbench --threads=64 --thread-yields=1000 --thread-locks=8 threads run

Running the test with following options:
Number of threads: 64
Initializing random number generator from current time

Initializing worker threads...

Threads started!

General statistics:
    total time:                          10.1310s
    total number of events:              5139

Latency (ms):
         min:                                    1.40
         avg:                                  125.23
         max:                                 1603.01
         95th percentile:                      475.79
         sum:                               643542.67

Threads fairness:
    events (avg/stddev):           80.2969/12.13
    execution time (avg/stddev):   10.0554/0.04

64スレッドで「ロック・アウト・ロック解除」操作を行い、この操作の平均応答時間は125.23 msであり、95%の操作は475.79で完了することができる.
反発ロック
データムテスト
sysbench --mutex-num=4096 --mutex-locks=50000 --mutex-loops=10000 mutex run

sysbench 1.0.17 (using system LuaJIT 2.0.4)

Running the test with following options:
Number of threads: 1
Initializing random number generator from current time


Initializing worker threads...

Threads started!


General statistics:
    total time:                          0.1862s
    total number of events:              1

Latency (ms):
         min:                                  186.02
         avg:                                  186.02
         max:                                  186.02
         95th percentile:                      186.54
         sum:                                  186.02

Threads fairness:
    events (avg/stddev):           1.0000/0.00
    execution time (avg/stddev):   0.1860/0.00


操作全体を完了するのにかかる時間は186.02 msである.
MySQL
データムテスト
sysbench --table-size=1000000 --mysql-db=test --mysql-user=root --mysql-password=xxx --mysql-host=127.0.0.1 --mysql-port=3306 --db-driver=mysql oltp_read_write prepare

mysql [email protected]:test> show create table sbtest1;
+---------+----------------------------------------------------------------+
| Table   | Create Table                                                   |
+---------+----------------------------------------------------------------+
| sbtest1 | CREATE TABLE `sbtest1` (                                       |
|         |   `id` int(11) NOT NULL AUTO_INCREMENT,                        |
|         |   `k` int(11) NOT NULL DEFAULT '0',                            |
|         |   `c` char(120) NOT NULL DEFAULT '',                           |
|         |   `pad` char(60) NOT NULL DEFAULT '',                          |
|         |   PRIMARY KEY (`id`),                                          |
|         |   KEY `k_1` (`k`)                                              |
|         | ) ENGINE=InnoDB AUTO_INCREMENT=1000001 DEFAULT CHARSET=utf8mb4 |
+---------+----------------------------------------------------------------+

sysbench --threads=8 --table-size=1000000 --mysql-db=test --mysql-user=root --mysql-password=1fba8913b066a8b9 --mysql-host=127.0.0.1 --mysql-port=3306 --db-driver=mysql oltp_read_write run


Running the test with following options:
Number of threads: 8
Initializing random number generator from current time

Initializing worker threads...

Threads started!

SQL statistics:
    queries performed:
        read:                            33208
        write:                           9486
        other:                           4743
        total:                           47437
    transactions:                        2371   (236.69 per sec.)
    queries:                             47437  (4735.51 per sec.)
    ignored errors:                      1      (0.10 per sec.)
    reconnects:                          0      (0.00 per sec.)

General statistics:
    total time:                          10.0154s
    total number of events:              2371

Latency (ms):
         min:                                   14.89
         avg:                                   33.77
         max:                                   84.55
         95th percentile:                       40.37
         sum:                                80072.17

Threads fairness:
    events (avg/stddev):           296.3750/1.32
    execution time (avg/stddev):   10.0090/0.00

試験により,8スレッドではTPSが236.69,QPSが4735.51,平均応答時間が33.77 ms,95%応答時間が40.37 msであることが分かった.
参考資料:
  • Sysbench
  • を使用