Gilad Chaplik has posted comments on this change. Change subject: Numa feature database patch ......................................................................
Patch Set 15: (11 comments) reviewed only one file for now. will continue in next patch-set http://gerrit.ovirt.org/#/c/26996/15/packaging/dbscripts/upgrade/03_05_0330_add_numa_tables_and_columns.sql File packaging/dbscripts/upgrade/03_05_0330_add_numa_tables_and_columns.sql: Line 4: BEGIN Line 5: -- Numa nodes table Line 6: CREATE TABLE numa_node Line 7: ( Line 8: numa_node_id UUID NOT NULL, pk? Line 9: vm_or_vds_guid UUID NOT NULL, Line 10: numa_node_index INTEGER, Line 11: mem_total BIGINT, Line 12: cpu_count INTEGER, Line 5: -- Numa nodes table Line 6: CREATE TABLE numa_node Line 7: ( Line 8: numa_node_id UUID NOT NULL, Line 9: vm_or_vds_guid UUID NOT NULL, 2 columns. you need to have FK with delete cascade for this field. Line 10: numa_node_index INTEGER, Line 11: mem_total BIGINT, Line 12: cpu_count INTEGER, Line 13: mem_free BIGINT, Line 6: CREATE TABLE numa_node Line 7: ( Line 8: numa_node_id UUID NOT NULL, Line 9: vm_or_vds_guid UUID NOT NULL, Line 10: numa_node_index INTEGER, smallint Line 11: mem_total BIGINT, Line 12: cpu_count INTEGER, Line 13: mem_free BIGINT, Line 14: usage_mem_percent INTEGER, Line 8: numa_node_id UUID NOT NULL, Line 9: vm_or_vds_guid UUID NOT NULL, Line 10: numa_node_index INTEGER, Line 11: mem_total BIGINT, Line 12: cpu_count INTEGER, smallint Line 13: mem_free BIGINT, Line 14: usage_mem_percent INTEGER, Line 15: cpu_sys numeric(18,0), Line 16: cpu_user numeric(18,0), Line 13: mem_free BIGINT, Line 14: usage_mem_percent INTEGER, Line 15: cpu_sys numeric(18,0), Line 16: cpu_user numeric(18,0), Line 17: cpu_idle numeric(18,0), can you please elaborate on why you selected (18,0) all over? Line 18: usage_cpu_percent INTEGER, Line 19: CONSTRAINT pk_numa_node PRIMARY KEY(numa_node_id) Line 20: ); Line 21: Line 26: CREATE TABLE vds_cpu_statistics Line 27: ( Line 28: vds_cpu_id UUID NOT NULL, Line 29: vds_id UUID NOT NULL, Line 30: cpu_core_id INTEGER, smallint Line 31: cpu_sys numeric(18,0), Line 32: cpu_user numeric(18,0), Line 33: cpu_idle numeric(18,0), Line 34: usage_cpu_percent INTEGER, Line 45: id UUID NOT NULL, Line 46: vm_numa_node_id UUID NOT NULL, Line 47: vds_numa_node_id UUID NOT NULL, Line 48: CONSTRAINT pk_vm_vds_numa_node_map PRIMARY KEY(id), Line 49: CONSTRAINT fk_vm_vds_numa_node_map_vds_numa_node FOREIGN KEY(vds_numa_node_id) REFERENCES numa_node(numa_node_id) ON DELETE CASCADE, no delete cascade here. the vm node can be pinned without any pnode. Line 50: CONSTRAINT fk_vm_vds_numa_node_map_vm_numa_node FOREIGN KEY(vm_numa_node_id) REFERENCES numa_node(numa_node_id) ON DELETE CASCADE Line 51: ); Line 52: Line 53: -- Create partial index for numa node map Line 47: vds_numa_node_id UUID NOT NULL, Line 48: CONSTRAINT pk_vm_vds_numa_node_map PRIMARY KEY(id), Line 49: CONSTRAINT fk_vm_vds_numa_node_map_vds_numa_node FOREIGN KEY(vds_numa_node_id) REFERENCES numa_node(numa_node_id) ON DELETE CASCADE, Line 50: CONSTRAINT fk_vm_vds_numa_node_map_vm_numa_node FOREIGN KEY(vm_numa_node_id) REFERENCES numa_node(numa_node_id) ON DELETE CASCADE Line 51: ); where is the runtime/pinned boolean notion? Line 52: Line 53: -- Create partial index for numa node map Line 54: CREATE INDEX IDX_vm_vds_numa_node_map_vm_numa_node_id ON vm_vds_numa_node_map(vm_numa_node_id); Line 55: CREATE INDEX IDX_vm_vds_numa_node_map_vds_numa_node_id ON vm_vds_numa_node_map(vds_numa_node_id); Line 61: numa_node_id UUID NOT NULL, Line 62: cpu_core_id INTEGER, Line 63: CONSTRAINT pk_numa_node_cpu_map PRIMARY KEY(id), Line 64: CONSTRAINT fk_numa_node_cpu_map_numa_node FOREIGN KEY(numa_node_id) REFERENCES numa_node(numa_node_id) ON DELETE CASCADE Line 65: ); FK to cpu stats id? Line 66: Line 67: -- Create partial index for numa node cpu map Line 68: CREATE INDEX IDX_numa_node_cpu_map_numa_node_id ON numa_node_cpu_map(numa_node_id); Line 69: Line 75: to_numa_node_index INTEGER, Line 76: distance INTEGER, Line 77: CONSTRAINT pk_numa_node_distance PRIMARY KEY(id), Line 78: CONSTRAINT fk_numa_node_distance_numa_node FOREIGN KEY(numa_node_id) REFERENCES numa_node(numa_node_id) ON DELETE CASCADE Line 79: ); I think we discussed on a field (csv in numa node) and not having a table for it Line 80: Line 81: -- Create partial index for numa node distance Line 82: CREATE INDEX IDX_numa_node_distance_numa_node_id ON numa_node_distance(numa_node_id); Line 83: Line 98: Line 99: -- Add columns in table vds_dynamic Line 100: PERFORM fn_db_add_column('vds_dynamic', 'auto_numa_balancing', 'integer'); Line 101: PERFORM fn_db_add_column('vds_dynamic', 'vds_numa_node_count', 'integer'); Line 102: missing is_numa_supported in vds_static? Line 103: END; $procedure$ Line 104: LANGUAGE plpgsql; Line 105: Line 106: select __temp_add_numa_columns(); -- To view, visit http://gerrit.ovirt.org/26996 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2507c084aa214bcfb65e860b11ed7dcf02af50cc Gerrit-PatchSet: 15 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Xiaolei Shi <xiao-lei....@hp.com> Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com> Gerrit-Reviewer: Jason Liao <chuan.l...@hp.com> Gerrit-Reviewer: Xiaolei Shi <xiao-lei....@hp.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches