Skip to content

Commit 9d32282

Browse files
GSI: Nvme test
Change-Id: I4bc6fdff71cd42d3aa2a53ccbae53fd6ddf7e655 Reviewed-on: https://review.couchbase.org/c/perfrunner/+/189426 Tested-by: Build Bot <[email protected]> Reviewed-by: vikas chaudhary <[email protected]>
1 parent 202776d commit 9d32282

File tree

9 files changed

+305
-36
lines changed

9 files changed

+305
-36
lines changed

cloud/infrastructure/cloud.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ worker_list
1010
[all:vars]
1111
ansible_user=root
1212
ansible_ssh_pass=couchbase
13-
ansible_ssh_common_args='-o StrictHostKeyChecking=no'
13+
ansible_ssh_common_args='-o StrictHostKeyChecking=accept-new -o UserKnownHostsFile=/dev/null'
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
[infrastructure]
2+
provider = gcp
3+
type = gce
4+
5+
[clusters]
6+
couchbase1 =
7+
gce.gce_cluster_1.gce_node_group_1.1:kv
8+
gce.gce_cluster_1.gce_node_group_1.2:kv
9+
gce.gce_cluster_1.gce_node_group_1.3:kv
10+
gce.gce_cluster_1.gce_node_group_2.1:index,n1ql
11+
gce.gce_cluster_1.gce_node_group_2.2:index,n1ql
12+
13+
[clients]
14+
workers1 =
15+
gce.gce_cluster_1.gce_node_group_3.1
16+
17+
[utilities]
18+
brokers1 = gce.gce_cluster_1.gce_node_group_4.1
19+
20+
[gce]
21+
clusters = gce_cluster_1
22+
23+
[gce_cluster_1]
24+
node_groups = gce_node_group_1,gce_node_group_2,gce_node_group_3,gce_node_group_4
25+
storage_class = pd-ssd
26+
27+
[gce_node_group_1]
28+
instance_type = n2-highmem-16
29+
instance_capacity = 3
30+
volume_size = 2000
31+
volume_type = pd-ssd
32+
33+
[gce_node_group_2]
34+
instance_type = n2-highmem-32
35+
instance_capacity = 2
36+
volume_size = 1000
37+
volume_type = pd-ssd
38+
39+
[gce_node_group_3]
40+
instance_type = n2-standard-32
41+
instance_capacity = 1
42+
volume_size = 500
43+
volume_type = pd-ssd
44+
iops = 20000
45+
46+
[gce_node_group_4]
47+
instance_type = n2-standard-32
48+
instance_capacity = 1
49+
50+
[storage]
51+
data = /data
52+
backup = gs://perftest-gcp-backup
53+
54+
[credentials]
55+
rest = Administrator:password
56+
ssh = root:couchbase
57+
58+
[parameters]
59+
OS = CentOS 7
60+
CPU = 8vCPU
61+
Memory = 64GB
62+
Disk = pd-ssd 1TB 21000 IOPS
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
[infrastructure]
2+
provider = gcp
3+
type = gce
4+
5+
[clusters]
6+
couchbase1 =
7+
gce.gce_cluster_1.gce_node_group_1.1:kv
8+
gce.gce_cluster_1.gce_node_group_1.2:kv
9+
gce.gce_cluster_1.gce_node_group_1.3:kv
10+
gce.gce_cluster_1.gce_node_group_2.1:index,n1ql
11+
gce.gce_cluster_1.gce_node_group_2.2:index,n1ql
12+
13+
[clients]
14+
workers1 =
15+
gce.gce_cluster_1.gce_node_group_3.1
16+
17+
[utilities]
18+
brokers1 = gce.gce_cluster_1.gce_node_group_4.1
19+
20+
[gce]
21+
clusters = gce_cluster_1
22+
23+
[gce_cluster_1]
24+
node_groups = gce_node_group_1,gce_node_group_2,gce_node_group_3,gce_node_group_4
25+
storage_class = pd-ssd
26+
27+
[gce_node_group_1]
28+
instance_type = n2-highmem-8
29+
instance_capacity = 3
30+
volume_size = 700
31+
volume_type = pd-ssd
32+
33+
[gce_node_group_2]
34+
instance_type = n2-highmem-32
35+
instance_capacity = 2
36+
volume_size = 1000
37+
volume_type = pd-ssd
38+
39+
[gce_node_group_3]
40+
instance_type = n2-standard-64
41+
instance_capacity = 1
42+
volume_size = 500
43+
volume_type = pd-ssd
44+
iops = 20000
45+
46+
[gce_node_group_4]
47+
instance_type = n2-standard-32
48+
instance_capacity = 1
49+
50+
[storage]
51+
data = /data
52+
backup = gs://perftest-gcp-backup
53+
54+
[credentials]
55+
rest = Administrator:password
56+
ssh = root:couchbase
57+
58+
[parameters]
59+
OS = CentOS 7
60+
CPU = 8vCPU
61+
Memory = 64GB
62+
Disk = pd-ssd 1TB 21000 IOPS

perfrunner/helpers/worker.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -331,9 +331,9 @@ def __init__(self, cluster_spec: ClusterSpec, test_config: TestConfig,
331331
result_serializer='pickle',
332332
task_serializer='pickle',
333333
task_protocol=1,
334-
broker_connection_timeout=5,
334+
broker_connection_timeout=60,
335335
broker_connection_retry=True,
336-
broker_connection_max_retries=2)
336+
broker_connection_max_retries=100)
337337
self.workers = cycle(self.cluster_spec.workers)
338338
self.terminate()
339339
self.start()
@@ -413,7 +413,10 @@ def run_tasks(self, phase):
413413
def wait_for_workers(self):
414414
logger.info('Waiting for all tasks to finish')
415415
for async_result in self.async_results:
416-
async_result.get()
416+
try:
417+
async_result.get()
418+
except Exception as e:
419+
logger.info("Exception while getting result {}".format(e))
417420
logger.info('All tasks are done')
418421

419422
def download_celery_logs(self):

perfrunner/tests/secondarycloud.py

Lines changed: 51 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -436,43 +436,40 @@ def _rebalance(self, services):
436436

437437
def create_indexes(self):
438438
logger.info('Creating and building indexes')
439-
if not self.test_config.index_settings.couchbase_fts_index_name:
440-
create_statements = []
441-
build_statements = []
439+
create_statements = []
440+
build_statements = []
442441

443-
for statement in self.test_config.index_settings.statements:
444-
check_stmt = statement.replace(" ", "").upper()
445-
if 'CREATEINDEX' in check_stmt \
446-
or 'CREATEPRIMARYINDEX' in check_stmt:
447-
create_statements.append(statement)
448-
elif 'BUILDINDEX' in check_stmt:
449-
build_statements.append(statement)
442+
for statement in self.test_config.index_settings.statements:
443+
check_stmt = statement.replace(" ", "").upper()
444+
if 'CREATEINDEX' in check_stmt \
445+
or 'CREATEPRIMARYINDEX' in check_stmt:
446+
create_statements.append(statement)
447+
elif 'BUILDINDEX' in check_stmt:
448+
build_statements.append(statement)
450449

451-
queries = []
452-
for statement in create_statements:
453-
logger.info('Creating index: ' + statement)
454-
queries.append(threading.Thread(target=self.execute_index, args=(statement,)))
450+
queries = []
451+
for statement in create_statements:
452+
logger.info('Creating index: ' + statement)
453+
queries.append(threading.Thread(target=self.execute_index, args=(statement,)))
455454

456-
for query in queries:
457-
query.start()
455+
for query in queries:
456+
query.start()
458457

459-
for query in queries:
460-
query.join()
458+
for query in queries:
459+
query.join()
461460

462-
queries = []
463-
for statement in build_statements:
464-
logger.info('Building index: ' + statement)
465-
queries.append(threading.Thread(target=self.execute_index, args=(statement,)))
461+
queries = []
462+
for statement in build_statements:
463+
logger.info('Building index: ' + statement)
464+
queries.append(threading.Thread(target=self.execute_index, args=(statement,)))
466465

467-
for query in queries:
468-
query.start()
466+
for query in queries:
467+
query.start()
469468

470-
for query in queries:
471-
query.join()
469+
for query in queries:
470+
query.join()
472471

473-
logger.info('Index Create and Build Complete')
474-
else:
475-
self.create_fts_index_n1ql()
472+
logger.info('Index Create and Build Complete')
476473

477474
def execute_index(self, statement):
478475
self.rest.exec_n1ql_statement(self.query_nodes[0], statement)
@@ -503,3 +500,28 @@ def run(self):
503500
self.rebalance_indexer(services="index,n1ql")
504501
logger.info("Rebalance time: {}".format(self.rebalance_time))
505502
self.report_kpi(rebalance_time=True)
503+
504+
505+
class CloudSecondaryInitalBuildTest(CapellaSecondaryRebalanceOnlyTest):
506+
507+
@timeit
508+
@with_stats
509+
@with_profiles
510+
def build_index(self):
511+
self.create_indexes()
512+
self.wait_for_indexing()
513+
514+
def _report_kpi(self, time_elapsed, index_type, unit="min"):
515+
self.reporter.post(
516+
*self.metrics.get_indexing_meta(value=time_elapsed,
517+
index_type=index_type,
518+
unit=unit,
519+
update_category=False)
520+
)
521+
522+
def run(self):
523+
self.load()
524+
self.wait_for_persistence()
525+
build_time = self.build_index()
526+
logger.info("index build time: {}".format(build_time))
527+
self.report_kpi(build_time, 'Initial')

perfrunner/utils/install.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ def install_package(self):
524524

525525
def upload_couchbase(to_host, to_user, to_password, package):
526526
client = paramiko.SSHClient()
527-
client.set_missing_host_key_policy(paramiko.WarningPolicy())
527+
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
528528
client.connect(to_host, username=to_user, password=to_password)
529529
sftp = client.open_sftp()
530530
sftp.put(package, "/tmp/{}".format(package))
@@ -608,7 +608,7 @@ def upload(self):
608608

609609
def upload_couchbase(to_host, to_user, to_password, package):
610610
client = paramiko.SSHClient()
611-
client.set_missing_host_key_policy(paramiko.WarningPolicy())
611+
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
612612
client.connect(to_host, username=to_user, password=to_password)
613613
sftp = client.open_sftp()
614614
sftp.put(package, "/tmp/{}".format(package))

playbooks/ec2_nvme_setup_gcp.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
---
2+
- hosts: couchbase_servers
3+
vars:
4+
data_dir: /data
5+
ebs: /dev/sdb
6+
lvm: /dev/nvme0n1
7+
8+
tasks:
9+
- name: memory available
10+
shell: free -m
11+
register: memory_output
12+
- debug:
13+
var: memory_output.stdout_lines
14+
15+
- name: Install lvm2 dependency
16+
package:
17+
name: lvm2
18+
state: present
19+
20+
- name: list block
21+
shell: lsblk
22+
register: command_output
23+
- debug:
24+
var: command_output.stdout_lines
25+
26+
- name: "Create PV from instance store"
27+
command: pvcreate {{ lvm }}
28+
29+
- name: "Create PV from EBS volums"
30+
command: pvcreate {{ ebs }}
31+
32+
- name: "Create volume group ‘vg’ containing both"
33+
command: vgcreate vg {{ lvm }} {{ ebs }}
34+
ignore_errors: yes
35+
36+
- name: "Create LV from origin EBS volume"
37+
command: lvcreate --extents 100%PVS -n cb_data_ebs vg {{ ebs }}
38+
39+
- name: "Create cache-pool LV from instance storage"
40+
command: lvcreate --type cache-pool --extents 100%PVS -n cb_data_cache_pool vg {{ lvm }}
41+
42+
- name: "Create a cached logical volume by associating the cache pool with EBS"
43+
command: lvconvert --yes --type cache --cachepool cb_data_cache_pool vg/cb_data_ebs
44+
45+
- name: "Create filesystem on cached volume"
46+
command: mkfs.xfs /dev/vg/cb_data_ebs
47+
48+
- name: "creating new 'couchbase' group"
49+
group: name=couchbase
50+
51+
- name: "creating new 'couchbase' user"
52+
user: name=couchbase group=couchbase
53+
54+
- name: "create /data dir if not available"
55+
file:
56+
path: /data
57+
state: directory
58+
59+
- name: ensuring ownership of "{{ data_dir }}" directory
60+
file: path={{ data_dir }} owner=couchbase group=couchbase
61+
62+
- name: "mount partition"
63+
command: mount /dev/vg/cb_data_ebs {{ data_dir }}
64+
65+
- name: list block
66+
shell: lsblk
67+
register: command_output2
68+
- debug:
69+
var: command_output2.stdout_lines
70+
71+
- name: LVM setup
72+
shell: lvs -a
73+
register: command_output3
74+
- debug:
75+
var: command_output3.stdout_lines
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
[test_case]
2+
test = perfrunner.tests.secondarycloud.CloudSecondaryInitalBuildTest
3+
4+
[showfast]
5+
title = inital build (min), 3 -> 3, 1 bucket x 1.6B x 230B , 3 index, 18 index instances
6+
component = secondarycloud
7+
sub_category = PlasmaDGM
8+
9+
[cluster]
10+
mem_quota = 54000
11+
index_mem_quota = 123000
12+
initial_nodes = 5
13+
num_buckets = 1
14+
enable_cpu_cores = false
15+
ui_http = disabled
16+
enable_n2n_encryption = all
17+
18+
[bucket]
19+
eviction_policy = fullEviction
20+
backend_storage = magma
21+
22+
[collection]
23+
config = collections/1bucket_1scope_3collections.json
24+
25+
[load]
26+
items = 1600000000
27+
size = 230
28+
workers = 80
29+
key_fmtr = hash
30+
doc_gen = yubo
31+
ssl_mode = capella
32+
33+
[secondary]
34+
indexer.settings.storage_mode = plasma
35+
36+
[index]
37+
statements =
38+
CREATE INDEX `adv_linked_uidDESC_swipe_dateDESC_uid` ON `bucket-1`.`users`.`swipes`(`linked_uid` DESC,`swipe_date` DESC,`uid`) PARTITION BY hash(`linked_uid`) WITH {"defer_build":true, "num_replica":1, "num_partition":3 };
39+
CREATE INDEX `adv_linked_uid_countDESC_last_seenDESC_uid` ON `bucket-1`.`users`.`views`(`linked_uid`, `count` DESC,`last_seen` DESC,`uid`) PARTITION BY hash(`linked_uid`) WITH { "defer_build":true, "num_replica":1, "num_partition":3 };
40+
CREATE INDEX `adv_uid_swipe_dateDESC_linked_uidDESC` ON `bucket-1`.`users`.`swipes`(`uid`, `swipe_date` DESC,`linked_uid` DESC) PARTITION BY hash(`uid`) WITH { "defer_build":true, "num_replica":1, "num_partition":3 };
41+
BUILD INDEX on `bucket-1`.`users`.`swipes`(adv_linked_uidDESC_swipe_dateDESC_uid,adv_uid_swipe_dateDESC_linked_uidDESC)
42+
BUILD INDEX on `bucket-1`.`users`.`views`(adv_linked_uid_countDESC_last_seenDESC_uid)
43+
44+
[clients]
45+
python_client = 3.2.7

0 commit comments

Comments
 (0)