Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spy中的SelfCallerBarrier的锁的优化 #109

Closed
Ryuhayabusa opened this issue Nov 5, 2018 · 1 comment
Closed

Spy中的SelfCallerBarrier的锁的优化 #109

Ryuhayabusa opened this issue Nov 5, 2018 · 1 comment
Assignees

Comments

@Ryuhayabusa
Copy link

在Spy.SelfCallerBarrier中,会维护一个线程链表,起到避免sandbox自我观察而进入死循环,这个链表中是元素,是线程的hashcode取模,然后线程进入该链表或从链表中移除时,会使用synchronized加锁,这个操作对性能有一定损耗,在压测时会导致机器负载上升(生产环境单机TPS约等于200时,load接近20)

这里需要进行一下锁的优化

image

@dongchenxu
Copy link
Collaborator

已在1.2.0版本优化Spy的锁机制

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants