Combine tables associated with compute_nodes into it to remove DB join

Registered by Shane Wang

Through the initial test with DB joins, it is found the performance to call compute_node_get_all() is bad.

When we have 10K compute nodes, and each compute node has 20 corresponding records in the table compute_node_stats, the time to read all the compute nodes from DB is about 16.89 seconds.

That significantly affects the scalability of compute node. The bp is try to combine compute_node_stats into compute_nodes, to improve the performance of the above function by removing "joinedload".

We also did some tests. When we have 10K compute nodes, and there doesn't exist compute_node_stats table but a JSON encoded python dictionary (with 20 <key, value> pairs for a dictionary), the time to read all the compute nodes from DB and decode the dictionary is about 1.32 seconds, which is huge difference!

Blueprint information

Status:
Complete
Approver:
None
Priority:
Undefined
Drafter:
Shane Wang
Direction:
Needs approval
Assignee:
Shane Wang
Definition:
Superseded
Series goal:
None
Implementation:
Needs Code Review
Milestone target:
None
Started by
Shane Wang
Completed by
John Garbutt

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/db-compute-node-stats-remove,n,z

Addressed by: https://review.openstack.org/38802
    Removed compute_node_stats table to reduce join

An alternative has been done for this now.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.