More efficient lock/unlock operation in locking

Registered by Jedrzej Nowak

Currently on concurrent locking we sleep(1) and retry until given retries reached.

(times for hosts example)
With sleep(1):
Total Delta: 19.2853975296
Total Time: 11.1652331352

With sleep(0.5):
Total Delta: 12.0467472076
Total Time: 6.78053498268

With sleep(0.1):
Total Delta: 5.13619017601
Total Time: 2.99174499512

With sleep(0.05):
Total Delta: 4.25722360611
Total Time: 2.56225085258

Also in more concurrent environment the difference would be even higher.

It's clearly visible that smarter locking wait is needed.

Blueprint information

Status:
Complete
Approver:
None
Priority:
Undefined
Drafter:
Jedrzej Nowak
Direction:
Needs approval
Assignee:
Jedrzej Nowak
Definition:
Approved
Series goal:
None
Implementation:
Implemented
Milestone target:
milestone icon 0.2.0
Started by
Jedrzej Nowak
Completed by
Łukasz Oleś

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/more-efficient-locking-lock-unlock,n,z

Addressed by: https://review.openstack.org/277915
    Added waiters instead of sleep in Lock

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.