[ENBD] Doubled requests

Peter T. Breuer ptb at it.uc3m.es
Tue Jan 13 04:50:47 MST 2004


"Also sprach Arne Wiebalck:"
> in my setup I observed that from time to time there are more requests
> received by the resource than written by the application to the enbd
> device.

I believe it's an accounting error. If it isn't, I would be very
interested.

> for instance, if I write 1000 1k blocks to the enbd device on the client
> side, the server resource sees 1001 or 1002 requests. I think these
> additional requests are triggered by a timeout somewhere inside enbd.
> why else should a request be done twice? someone thinks the request has
> failed and retransmits/reissues it, but it has already been successful!
> there is no wrong data, but some requests are simply carried out multiple
> times.

Yes - the server maintains a cache of requests seen in order to avoid
the possiblilty, and replies using the old error value instead of doing
the write again.

It is quite possible that a timeout will occur and then the server
sends the ack. This will indeed cause a request to be sent twice. The
server should catch the second transmission. But I agree, the cache is
probably too small, and the semantics needs tweaking so that it
preferentially retains records of requests which took a long time to
process, in case they are retransmitted.


> this is of course no problem for a standard setup, since one doesn't care
> whether data is written once or multiple times. my resource however does
> an XOR with the data already on the resource, and with multiple writes of
> the same data I have a problem then, because the effect is zero in this
> case ...

So the retransmit is real?

> do you know what/who could trigger the additional requests/writes? and in
> the best case: is there a way to avoid them, by increasing timeouts, for
> instance?

If there is a retransmit, kernel dmesg should say. It will record a
"rollback", at least.

You can avoid them by not allowing rollback (show_errs=1).

Very interesting.

Peter


More information about the ENBD mailing list