[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] [RFC]Drop unused plock resource when no other plock request comes



Hello,

Currently, it seems that dlm_controld won't drop an unused plock resource (which has exceed the timeout) when there is no another plock request for other resource comes. I found this issue when I run the pingpong test case http://junkcode.samba.org/ftp/unpacked/junkcode/ping_pong.c
In the pingpong, it just uses fcntl(F_SETLKW) to lock/unlock a file repeatedly to see the lock performance. Now, my test case is:
Step 1: start pingpong on node A, then stop it.
Step 2: after a while(more than 10 seconds), start pingpong on node B.
I haven't run the pingpong concurrently on the two nodes, but the lock performance in node A is much higher than in node B.
The user might be confused about why the performance on the two nodes seems so different.

After some investigating, I found the reason is when running pingpong on node A, r->owner == A, so all the plock requests operates locally. When pingpong stops on node A, there is no other plock request comes from node A, so the drop_resources won't be triggered even if it has exceed the timeout.
Then, pingpong on node B and it found r->owner == A so eventually it turned into the state r->owner == 0. This is the distributed mode, so the performance is decreasing.

It seems no chance to trigger the drop_resources to work if there is no other plock requests (which are requesting for another lock resource) come from node A.
But I still wonder if there is a way to improve this?

Thanks,
Jiaju  
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]