Xiaolei Shi has posted comments on this change.

Change subject: db: Numa support database implementation
......................................................................


Patch Set 15:

(5 comments)

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 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,
> maybe this can help:
2 columns are ok. This solution is simple.
Line 10:         numa_node_index INTEGER,
Line 11:         mem_total BIGINT,
Line 12:         cpu_count INTEGER,
Line 13:         mem_free BIGINT,


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,
> incase you delete a host the pNodes are deleted. but vNode can still be pin
This fk is on vds_numa_node_id. That means if a host is deleted, all the pnodes 
of this host will be removed also, and then all the pin info that with the 
removed pnodes will be cascade deleted. Now the vNodes which were previous 
pinned on these removed pnodes should be pinned to other pnodes, new rows will 
be inserted in this table.
Is this process right?
Actually i still don't know why no delete cascade on vds_numa_node_id.
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:     );
> why not now?
Done
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 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:     );
> you are right, but don't think it's needed in db level. cpu mapping (commen
ok, i will remove this table, and add a field in numa node to represent 
distance.
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: 
> why we need to know the count at VDS level?
ok, i will add it in vds_dynamic as other vds numa fields. The entity object 
VdsDynamic and VDS need to be modified accordingly to add this field(VdsDynamic 
needs to add this field and related get/set methods, VDS need to add get/set 
methods about this field)
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 <[email protected]>
Gerrit-Reviewer: Doron Fediuck <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: Jason Liao <[email protected]>
Gerrit-Reviewer: Martin Sivák <[email protected]>
Gerrit-Reviewer: Xiaolei Shi <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to