liufuyang / KVRawClientTest

A Test for Java Raw TiKV-Client
0 stars 0 forks source link

Hackweek - TiKV vs Bigtable on GCP #1

Open liufuyang opened 5 years ago

liufuyang commented 5 years ago

Simple comparison between TiKV and Bigtable on GCP

TiKV is in k8s cluster, 4 nodes, each is a standard v4 node. Bigtable is a standard 3 node cluster.

Result: Bigtable left, Tikv right

(read and write count is print out every seconds) image Seems Bigtable is faster on write, TiKV is faster on read, in this test setup.

Test client is this java main file running

Other info:

image CPU load on test node

image image image TiKV load while testing (above)

image image Bigtable load while testing (above)

c4pt0r commented 5 years ago

Awesome job! Does TiKV run on persistent disk? or local SSD?

liufuyang commented 5 years ago

Round 3 - key, value corrected

Bigtable write

11:52:16,474 [main]  INFO MainBT:130 - [Bigtable Write]   4058 total actions, avg time = 15801 μs
11:52:17,475 [main]  INFO MainBT:130 - [Bigtable Write]   4011 total actions, avg time = 15922 μs
11:52:18,477 [main]  INFO MainBT:130 - [Bigtable Write]   4004 total actions, avg time = 15937 μs
11:52:19,478 [main]  INFO MainBT:130 - [Bigtable Write]   4020 total actions, avg time = 15951 μs
11:52:20,479 [main]  INFO MainBT:130 - [Bigtable Write]   3426 total actions, avg time = 18385 μs
11:52:21,480 [main]  INFO MainBT:130 - [Bigtable Write]   2710 total actions, avg time = 23395 μs
11:52:22,481 [main]  INFO MainBT:130 - [Bigtable Write]   3778 total actions, avg time = 16974 μs
11:52:23,482 [main]  INFO MainBT:130 - [Bigtable Write]   3830 total actions, avg time = 16684 μs
11:52:24,483 [main]  INFO MainBT:130 - [Bigtable Write]   3823 total actions, avg time = 16770 μs

image image image image

TiKV write

11:53:15,629 [main]  INFO MainTiKV:112 - [TiKV Write]   3966 total actions, avg time = 16157 μs
11:53:16,630 [main]  INFO MainTiKV:112 - [TiKV Write]   4530 total actions, avg time = 14015 μs
11:53:17,632 [main]  INFO MainTiKV:112 - [TiKV Write]   4782 total actions, avg time = 12821 μs
11:53:18,633 [main]  INFO MainTiKV:112 - [TiKV Write]   2581 total actions, avg time = 23983 μs
11:53:19,635 [main]  INFO MainTiKV:112 - [TiKV Write]   4630 total actions, avg time = 13757 μs
11:53:20,636 [main]  INFO MainTiKV:112 - [TiKV Write]   3152 total actions, avg time = 20406 μs
11:53:21,637 [main]  INFO MainTiKV:112 - [TiKV Write]   3201 total actions, avg time = 19963 μs
11:53:22,638 [main]  INFO MainTiKV:112 - [TiKV Write]   4349 total actions, avg time = 14621 μs
11:53:23,640 [main]  INFO MainTiKV:112 - [TiKV Write]   3281 total actions, avg time = 19634 μs
11:53:24,641 [main]  INFO MainTiKV:112 - [TiKV Write]   3886 total actions, avg time = 16189 μs
11:53:25,642 [main]  INFO MainTiKV:112 - [TiKV Write]   4159 total actions, avg time = 15751 μs

image image image image image

With sync-log off. Both Bigtable and TiKV reaches 15K write request per second.

With sync-log on TiKV reaches 10K write request per second. image

liufuyang commented 5 years ago

BigTable read vs TiKV read

Bigtable and TiKV both around 3K read scan query per second

image image

image image

Looks TiKV and Bigtable are more or less the same on simple key range scans. Noticing TiKV are using much cheaper 4 core standard CPUs.

liufuyang commented 5 years ago

@c4pt0r haha thanks :D It was on persistent disk not local SSD :)