[bind10-dev] Suboptimal way of splitting XFR-out to messages

Michal 'vorner' Vaner michal.vaner at nic.cz
Thu Dec 1 09:41:03 UTC 2011


Hello

During review of #1389, it was discovered, that xfrout splits the stream into
messages in an suboptimal way. Currently, it keeps a sum of RR sizes and if this
overflows, it renders the message and starts a new one.

But, the rendering compresses names. This means few more RRs could fit in, if we
are lucky and there are lots of similar names (which there usually are, at last
the names of the RRs, if not inside the real data).

This is not really a big deal, it doesn't break anything. But it generates more
messages and can increase the size of the whole stream, as we can't compress
names across message boundary. Having less messages mean having less boundaries
and more compression.

So, I'd like to ask, is it worth fixing? There surely are ways to do it
completely right and fill the messages up to the edge. One would be like this:
message = <empty message>
* Iterate over the RRs to transfer:
  * new_message = message
  * new_message.add(rr)
  * try to render
  * if it overflows:
    * send out message
    * message = <empty message>
    * message.add(rr)
  * else:
    * message = new_message

That is, of course, slow. However, if we could save the renderer state and could
„continue“ with another rr added to the message, it could be made fast (it
wouldn't make the counts in the headers right, but otherwise, we add RRs to the
end of message).

So, do you think, is it worth fixing?

With regards

-- 
I'm reading your disk
		-- General Failure

Michal 'vorner' Vaner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <https://lists.isc.org/pipermail/bind10-dev/attachments/20111201/11d36869/attachment.bin>


More information about the bind10-dev mailing list