[Sheepdog] Sheepdog client library
Chris Webb
chris at arachsys.com
Sat Dec 5 13:45:21 CET 2009
MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp> writes:
> On 12/04/2009 10:22 PM, Chris Webb wrote:
> >I wonder how expensive it actually is to take and release the lock now?
> >Potentially it could already be quite cheap if corosync performs well and
> >given that dog is now in C...
>
> According to a corosync document, we can take 30,000 locks per second
> though it depends on the number of nodes, machine spec, etc.
> ftp://openais.org/presentations/inside-cpg.pdf
>
> I think locking performance is not a problem because we take a lock
> only when first opening VDI.
The reason for my question is that when I come to implement a GET/PUT
interface to VDIs (that aren't in use by a VM), I could either take a simple
approach and claim the lock briefly for each GET/PUT (which might only be a
few tens of MB of data), releasing it immediately, or I could do something
more sophisticated and hold onto the lock speculatively for a while in case
another GET/PUT comes in, only relinquishing it if I need to to start a VM.
Sounds like for sensible GET/PUT chunk sizes, there's no harm in just
claiming it for every operation: the lock-claiming work is tiny compared to
the work of actually reading/writing the data itself.
Cheers,
Chris.
More information about the sheepdog
mailing list